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.

5 min readSume
All posts

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.

Check outcomes for a video-filter program, read 2026-10-03
MistakeRefusal codenext_action
Crop box leaves the framevideo_filter_crop_out_of_boundsfix_program_and_recheck
Dim amount above 1 or 0video_filter_amount_out_of_rangefix_program_and_recheck
Malformed filtergraphinvalid_filtergraphfix_program_and_recheck
Valid programnone, valid is truesubmit_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

All Media tools posts

Written by Sume