Video filter /check: submit or fix and recheck

POST /v1/video-filter/check is unbilled and returns valid, diagnostics and a next_action of submit_video_filter or fix_program_and_recheck. Branch on it.

5 min readSume
All posts

The Sume video filter has a free dry run, POST /v1/video-filter/check, and its answer is built to be branched on. The response is object: video_filter_check with valid, encode: "not_run", diagnostics[], the compiled program.filters (names only), an estimate when the program is valid, and a next_action of submit_video_filter or fix_program_and_recheck. A script needs one if on that field.

Auto-cut tools such as Instagram's First Draft hand people a trimmed first pass in under 10 seconds (TechCrunch, read 2026-10-04); the grade pass that follows can be just as quick if you do not pay for failed programs.

What the check does and does not do

Per the video filter docs, the check runs the same schema, op whitelist, filtergraph allowlist and Sume-host / HEAD source preflight as the encode, and returns diagnostics instead of a 400. It does not create a job, reserve credits, boot a box or touch the encoder, and Idempotency-Key is not required. A program that passes can still fail on the box for a bad expression, memory or time; that returns as a structured job error.

Check response fields (video filter docs, read 2026-10-04)
FieldMeaning
validTrue when the program would be accepted
encodeAlways not_run on a check
diagnostics[]What is wrong, as data instead of a 400
program.filtersCompiled filter names, no argv
estimatePresent when valid
next_actionsubmit_video_filter or fix_program_and_recheck

Branch on next_action

This script checks a dim program and only calls the paid encode when the check says to. The encode needs an Idempotency-Key; the check does not. Replace the artifact URL with your own media.sume.com clip.

import os, requests

BASE = "https://api.sume.com/v1/video-filter"
HEAD = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}
body = {
    "video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4",
    "ops": [{"op": "dim", "amount": 0.45}],
}

check = requests.post(BASE + "/check", headers=HEAD, json=body, timeout=60).json()
print("valid:", check.get("valid"), "next:", check.get("next_action"))

if check.get("next_action") == "submit_video_filter":
    job = requests.post(
        BASE,
        headers={**HEAD, "Idempotency-Key": "grade-dim-045-001"},
        json=body,
        timeout=60,
    )
    print("submitted:", job.status_code)
else:
    for item in check.get("diagnostics", []):
        print("fix:", item)

Where the money is

The check is free. The encode is $0.02 per job per the docs (VIDEO_FILTER_PUBLIC_PRICING; confirm in GET /v1/catalog), with no provider inference, only worker ffmpeg. The source must be a clip of up to 300 seconds on media.sume.com, so import first, as the media inputs page describes.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume