Reframe a video
Turn a landscape video into a 9:16 portrait clip that follows the active speaker, in a single API call.
How it works
You submit a video URL once. Behind the scenes the API runs the full pipeline (ingest → scene detection → face tracking → active speaker → reframe) and exposes it as one job you poll. You never orchestrate the steps yourself.
1. Submit a video
curl -X POST https://naralens.com/api/v2/reframe \
-H "Authorization: Bearer $NARA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/video.mp4"}'
# Response (202)
# { "job_id": "9f1c...", "status": "processing", "step": "ingesting" }Optional fields:
| Field | Type | Default | Description |
|---|---|---|---|
url | string | none | Public or Google Drive video URL (required) |
start_time | number | none | Clip start in seconds (process only a segment) |
end_time | number | none | Clip end in seconds |
llm | boolean | false | Use the hybrid LLM reframe for tricky multi-face scenes |
diarization | boolean | false | Add speaker diarization to improve speaker-face mapping |
2. Poll the job
curl https://naralens.com/api/v2/reframe/{job_id} \
-H "Authorization: Bearer $NARA_API_KEY"
# While processing
# { "status": "processing", "step": "active_speaker" }
# When done
# {
# "status": "completed",
# "video_id": "a1b2c3d4-...",
# "download_url": "/api/v2/download/a1b2c3d4-...?suffix=_reframe"
# }Each poll advances the pipeline by one step, so poll every few seconds.status is one of processing, completed, or failed.
3. Download the result
When completed, fetch the portrait clip from the returned download_url (same API key). The file streams through the API. Your video is never served from a public bucket.
curl -L -o clip.mp4 "https://naralens.com/api/v2/download/{video_id}?suffix=_reframe" \
-H "Authorization: Bearer $NARA_API_KEY"Billing
You are charged once per job, based on the source video duration: 1 credit = 1 second (rounded down). If your balance is too low for the submitted video, the job fails before any heavy processing runs, so you are never charged for work you can't afford. Re-polling and re-downloading are free.