Check a video crop before you pay: free video-filter /check
Validate a crop or dim program with POST /v1/video-filter/check, which is free, then submit the $0.02 encode. Diagnostics, refusal codes and next_action.

POST /v1/video-filter/check validates a Video filter program without encoding anything, and it is free; the encode that follows costs $0.02 (Sume docs, read 2026-10-03). Use it to find a bad crop before a batch: it returns object: video_filter_check with valid, diagnostics, an estimate, and a next_action of submit_video_filter or fix_program_and_recheck. That is the cheapest way to confirm that 100 crops will all be accepted.
What the program can contain
A program is up to 8 ops. dim takes an amount in (0, 1]. crop takes fractions x, y, width, height of the frame, with width and height at least 0.05. A raw filtergraph is capped at 2048 characters and 32 filters. The source video can be up to 300 seconds.
| Mistake | Refusal code | next_action |
|---|---|---|
| Crop box leaves the frame | video_filter_crop_out_of_bounds | fix_program_and_recheck |
| Dim amount above 1 or 0 | video_filter_amount_out_of_range | fix_program_and_recheck |
| Malformed filtergraph | invalid_filtergraph | fix_program_and_recheck |
| Valid program | none, valid is true | submit_video_filter |
A loop that checks first
For a batch, check every program, collect the failures, and only submit the ones that pass. Do not treat valid: true as success of the final file: it says the program is acceptable, not that the output looks right. Look at one real output before submitting the rest.
``python
import asyncio, os, httpx
async def main():
h = {"Authorization": "Bearer " + os.environ["SUME_API_KEY"]}
body = {"video_url": os.environ["VIDEO_URL"],
"ops": [{"op": "crop", "x": 0.2, "y": 0, "width": 0.56, "height": 1}]}
async with httpx.AsyncClient(timeout=60) as c:
r = await c.post("https://api.sume.com/v1/video-filter/check", json=body, headers=h)
print(r.status_code, r.json().get("next_action"))
asyncio.run(main())
``
Limits
The check does not preview pixels. For Content Credentials after a re-encode, see what a re-encode does to provenance.
Sources
Related posts
More in Media tools
- Check an AI clip against Instagram's Reel rules in Python
Instagram's help page gives three Reel limits: 1.91:1 to 9:16, 30 FPS and 720 pixels. This Python check reads Sume's probe and prints PASS or FAIL for each.
- Check the transcript before captions: Scribe v2 error tiers
ElevenLabs lists Scribe v2 error rates by language group. Before burning captions on Sume, pass script_text or your own words so a wrong transcript never ships.
- Children's captions at 17 characters per second: Netflix rule and Sume
Netflix's English style guide sets 20 chars per second for adults and 17 for children. See how to approximate it with Sume caption phrasing overrides.
- Cloudflare Images segment=foreground vs Sume RMBG PNG alpha
Cloudflare Images removes a background with segment=foreground, but its listed output formats lack PNG. Sume RMBG returns PNG artifacts with alpha.
Written by Sume