Fetch a Sume video output with the content endpoint index query

GET /v1/videos/{jobId}/content takes an index that defaults to 0. When it matters, how it lines up with unsigned_urls, and the curl line that saves a file.

5 min readSume
All posts

Once a /v1/videos job is completed, you download the file from GET /v1/videos/{jobId}/content. The index query parameter defaults to 0, and the docs say it exists for models that generate more than one video output. So ?index=0 is the same call as no query at all, and ?index=1 asks for the second output on a job that produced one.

The docs example shows a single output, so the default is what most integrations use. This note is for the day a model returns more than one output and your saved loop only ever fetched the first.

How index lines up with unsigned_urls

The completed poll response carries unsigned_urls, an array. The docs example shows one entry ending in /content?index=0. Read the array rather than guessing: if the array has two entries, the second ends in index=1, and downloading by looping over the array is safer than counting in your own code.

The URLs are called unsigned because they are not pre-authorised links. Request them with your API key in an Authorization: Bearer header, exactly as the docs' curl example does. OpenRouter's own guide describes the same pattern for its videos API, and Sume follows that guide field for field.

curl "https://api.sume.com/v1/videos/{jobId}/content?index=0" \
  -H "Authorization: Bearer $SUME_API_KEY" \
  --output video.mp4

A loop that does not assume one file

Write the download as a loop over unsigned_urls, name each file with its index, and fail the job in your own system if any download is not a 200. That keeps a single-output model and a future multi-output model on the same code path. The table summarises the three ways you may reach the bytes.

Ways to read a completed video job output (read 2026-10-03)
RouteNeedsGood for
GET /v1/videos/{jobId}/contentAPI key header, optional indexServer-side download
unsigned_urls[n] from the pollAPI key headerLooping over every output
GET /v1/jobs/{id}/resultAPI key header, job must be completedReading the generic job result

What to do on errors

The generic result route answers 409 job_not_completed while a job is still running, so wait for completed before you download. A 404 on a job id usually means the id belongs to another workspace or another member's key; Sume documents that jobs are readable only inside the workspace and, for an API key, only for the member who created them.

Saving files so nothing is overwritten

Name each downloaded file with the job id and the index, for example jobid-0.mp4, so a second output never overwrites the first. Keep the content type from the response rather than assuming .mp4 forever. If you serve the file to end users, copy it to your own storage after download; the docs for the content endpoint describe an authenticated route, not a public link.

Run the download inside the same retry policy as the rest of your pipeline, with a bounded number of attempts, and mark the job as delivered in your own database only after the bytes are on disk. A job that is completed on Sume and not yet downloaded in your system is a state you should be able to query.

Limits

The docs do not list which models can return more than one output, so this post names none. Check the model row from GET /v1/videos/models and test with a short, cheap clip before building a multi-output pipeline.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume