Video filter limits: 8 ops, 2048 characters, 32 filters, 300 s
Video filter refuses a ninth op, a graph past 2,048 characters or 32 filters, and a source past 300 s. Each has its own code, and the free check catches most.

Video filter has four limits that decide whether a program runs: at most 8 ops, a filtergraph of at most 2,048 characters, at most 32 named filters inside it, and a source of at most 300 seconds. The first three are caught by the free check endpoint, POST /v1/video-filter/check, before any job is created. The 300-second limit is enforced by the worker, so check the clip length yourself.
What fails, where and how
The table lists each limit with the stable code the docs give for it. An encode job costs $0.02, and the check is unbilled.
| Limit | Value | Code or result | Caught by check |
|---|---|---|---|
| Ops per request | 8 | video_filter_too_many_ops | Yes |
| Filtergraph length | 2,048 characters | invalid_filtergraph | Yes |
| Named filters in graph | 32 | invalid_filtergraph | Yes |
| Stream specifiers like [0:v] | not allowed | invalid_filtergraph | Yes |
| dim amount | above 0, at most 1 | video_filter_amount_out_of_range | Yes |
| Source length | 300 s | output_duration_exceeded | No, worker |
Ops and filtergraph together
Ops run first, in order, then the filtergraph. Only two op types exist: dim, which multiplies luma by an amount in (0, 1], and crop, a rectangle in fractions of the frame where x plus width and y plus height stay at most 1. Anything else belongs in the filtergraph, which is filters only, with no inputs, outputs or file paths.
- trim and setpts are not on the allowlist; use video trim for ranges.
- drawtext, subtitles, movie and lut3d are not allowed.
- The server wraps your graph with its own input and output labels.
Check, then encode
A passing check returns valid true, an estimate and next_action submit_video_filter. A program that passes can still fail on the worker for memory or time, and you then get a structured job error.
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.21875, "y": 0, "width": 0.5625, "height": 1 },
{ "op": "dim", "amount": 0.8 }
]
}'Budget
Because the check is free and the encode is $0.02, testing ten program variants costs nothing until you submit the winner. A batch of 500 encodes is $10.00.
A worked example
A program with 8 ops is valid, and a program with 9 is rejected with video_filter_too_many_ops before any job exists. Because dim multiplies luma, two dims of 0.5 and 0.8 combine to 0.4, so there is rarely a reason to chain more than one. Crop fractions follow the same logic: a 16:9 frame cropped to a centered square at 1080 pixels high needs a width of 0.5625 and an x of 0.21875, as in the check request above.
If a check returns fix_program_and_recheck, read diagnostics[] first. It names the token that failed, and for an unknown filter it also gives the allowlist, so you do not need to guess which names are permitted.
Sources
Related posts
More in Media tools
- Video filter limits: 8 ops, 2,048 characters, 32 filters
Video filter takes up to 8 dim/crop ops plus a filters-only graph of 2,048 characters and 32 filters. See what is allowed, what is refused, and the free check.
- Video frames on 300 s: fps 0.08 gives 24 stills, 12.5 s apart
The video-frames route takes clips up to 300 s and 24 frames per call. At fps 0.08 a 300-second clip yields 24 source-size stills, from 6.25 s to 293.75 s.
- Video inspect on a 60 s clip: stills at 3.75 s, then every 7.5 s
With no frames program, video inspect returns 8 mid-bin stills. On a 60-second clip they land at 3.75, 11.25, 18.75 seconds and on, 768 px on the long edge.
- Video inspect with fps 0.4 returns 24 stills from a 60-second clip
The inspect frames program caps at 24 stills and fps at 2. For a 60-second clip, fps 0.4 fills all 24 slots, 2.5 seconds apart, centered in each bin.
Written by Sume