video-filter order of operations: ops first, then filtergraph
In Sume video-filter, ops[] (dim, crop; max 8) run before the filtergraph, which has its own 2048-character and 32-filter caps. Order matters for a crop.

In POST /v1/video-filter, the ordered ops[] list (at most 8 entries of dim or crop) runs first, and the filtergraph runs after it on the result. A program needs at least one op or a non-empty filtergraph.
This is from the Video filter docs, read 2026-09-30.
Why does the order matter?
A crop op is a rectangle in fractions of the source frame. Any geometry filter in the filtergraph then acts on the cropped frame, not the original. Put your crop in ops[] and the resize or blur after it in the graph, and think in the cropped frame's coordinates.
curl -X POST https://api.sume.com/v1/video-filter/check \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4",
"ops": [
{ "op": "crop", "x": 0, "y": 0.1, "width": 1, "height": 0.8 },
{ "op": "dim", "amount": 0.8 }
]
}'What are the filtergraph limits?
Up to 2048 characters and 32 named filters. No inputs, outputs or paths: the server wraps the graph as [0:v]...[vout]. Internal labels such as split[a][b] are fine; stream specifiers like [0:v] are not. Names must be on the allowlist; trim, setpts, drawtext, subtitles, movie and lut3d are not.
How do I test a program before paying?
Send it to POST /v1/video-filter/check first. It is unbilled, needs no Idempotency-Key, and answers object: video_filter_check with valid, diagnostics[], the compiled filter names and a next_action. The encode itself costs $0.02 per job.
| Part | Limit |
|---|---|
| ops[] | Max 8, applied first |
| filtergraph length | 2048 characters |
| Named filters | 32 |
| Source clip | Up to 300 s |
| Encode price | $0.02 per job |
Sources
Related posts
More in Developers
- Move from /v1/video-router/generate to /v1/videos: field map
Video Router still works, but new integrations should use /v1/videos. Same catalog and job ids; the wire and image fields change. What the docs say changes.
- Trim an H.265 or AV1 clip by API: which codec comes out?
DaVinci Resolve 21 lists H.265, MV-HEVC and AV1. Sume's exact trim re-encodes to libx264 yuv420p; keyframe trim copies the stream. Input support is not listed.
- waitForRun family: agent, action or format for a run id?
In @sume-com/sdk, waitForRun needs family: format, action or agent because a run id does not say which surface it belongs to. Use agent for Agent Completions.
- Wan 3.0 reference video requirements: 15 seconds and 16 fps
On Sume, wan-3.0 reference videos total 15 seconds or less and need 16 fps or more, up to 5 clips. Check each clip with video inspect and trim to fit.
Written by Sume