Reframe

POST /v1/reframe: the parameters, what a finished job returns, and revisions that correct single scenes.

Reframing crops a horizontal video to a narrower shape. The crop follows the main subject, the person speaking and the action; where the important content cannot fit, it shows the whole frame over a blurred copy of itself. Shots and scenes are detected, and on-screen captions (name supers) are moved into view.

Request

All fields but the input are optional:

{
  "input": {"url": "https://example.com/interview.mp4"},
  "target_aspect": "9:16",
  "strategy": "auto",
  "smoothness": 0.5,
  "output": {"height": 1920, "crf": 20},
  "debug_overlay": false,
  "webhook": {"url": "https://example.com/hooks/vapi", "secret": "a-long-random-secret"}
}
FieldValues
input{"url"} or {"upload_id"}The video. See Jobs.
target_aspect9:16 (default), 1:1, 4:5The output's shape. The source must be wider than it.
strategyauto (default), follow, static, fit_blurauto: follow the main subject, the whole frame over a blur when it cannot fit; follow: always crop on the main subject; static: one fixed crop per shot; fit_blur: always the whole frame.
smoothness0 to 1, default 0.5Higher is calmer camera motion.
output.height320 to 3840Default: the largest standard size that does not upscale the source much (9:16: 1920 or 1280).
output.crf12 to 35, default 20H.264 quality; lower is better and bigger.
debug_overlaytrue or falseAlso produce debug.mp4 with the detections and the crop drawn on it.
webhook{"url", "secret"}Called when the job finishes. See Jobs.
revision_ofjob_...Revise an earlier job instead of giving input. See below.
overridesa listCorrections per scene, for revisions. See below.

Videos up to 10 minutes long. The output is as long as the input, with its audio.

Result

A job that succeeded has:

Revisions

An editor reviewing the result can correct single scenes. A revision takes revision_of instead of input; the earlier job's input and parameters apply unless given again, and the analysis is reused, so a revision takes a fraction of the first run's time. It is charged like any job, per second of output.

{
  "revision_of": "job_...",
  "overrides": [
    {"scene": "f3339", "mode": "fit_blur"},
    {"scene": "f2072", "subject": 331, "zoom": 1.5},
    {"scene": "f1661", "center_x": 0.62},
    {"scene": "f2384", "smoothness": 0.9, "captions": false},
    {"split_at_s": 101.4},
    {"scene": "f2467", "merge": true}
  ]
}

Per scene:

{"split_at_s": 101.4} starts a new scene where the detector missed a cut; {"scene": "f2467", "merge": true} joins a scene with the one before it. Splits apply first, then merges, then the scene corrections. A revision's overrides replace the earlier list as a whole. Scene ids that do not exist are refused with 422 invalid_override.

Probe

POST /v1/probe with an input inspects a video for free: container, length, streams, resolution, rotation, frame rate. Its result.media is what VAPI found. A probed upload's length is remembered, so POST /v1/estimates can price it.