API reference

Generate a video

Create a video job with any model on the Video Router.

POST /v1/video-router/generate

Host https://api.open.sume.com · Auth API key

Starts a video job with the model you name and returns at once. Video takes from about a minute to several, so a webhook is usually better than tight polling.

Request

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer <key>. Or send x-api-key.
Content-TypestringYesapplication/json
Idempotency-KeystringNo1–255 printable ASCII. Makes a retry return the original job. See Idempotency.

Body

NameTypeRequiredDescription
modelstringYesAn id from List video models, such as seedance-2.5 or kling-3, or auto to let Sume pick.
promptstringUsuallyWhat happens in the shot. Optional on auto and on a few edit models.
durationintegerNoSeconds. Each model lists its range in capabilities.duration_seconds (seedance-2.5: 4–30).
resolutionstringNoOne the model lists, such as 480p, 720p, 1080p.
aspect_ratiostringNo16:9, 9:16, 1:1, 4:3, 3:4, 21:9, auto or adaptive, where listed.
image_urlstringNoFirst frame (HTTPS) for image-to-video.
end_image_urlstringNoLast frame. Needs image_url.
video_urlstringNoSource clip for video-to-video models.
audio_urlstringNoSpeech for lip-sync models.
reference_image_urlsstring[]No1–10 reference images, where the model takes them.
reference_video_urlsstring[]No1–5 reference clips, where the model takes them.
generate_audiobooleanNoAsk for a soundtrack, on models that make one.
modestringNoasync (default), webhook, sync or subscribe. See How the API works.
webhook_urlstringNoPublic HTTPS URL for the terminal callback. Used with mode: "webhook".
wait_timeout_secondsintegerNo0–30. How long sync / subscribe waits before answering.
metadataobjectNoYour own key-value data, stored on the job. Not sent to the model.

Example

Generate a video

POST /v1/video-router/generate

Required

Response

202 Accepted

The response has the same shape as Generate an image: request_id, the job (with type: "video_generation"), and status_url, result_url, cancel_url, next_poll_after_seconds.

Errors

StatuscodeWhen
400invalid_requestA field is missing, unknown for the model, or out of range.
400concurrency_limit_reachedYour workspace is at its jobs-in-flight cap.
401unauthorizedNo key, or the key is wrong or revoked.
402insufficient_fundsYour balance cannot cover the price. details has required_usd and available_usd.
409idempotency_conflictThe Idempotency-Key was used for a different request.
429rate_limitedToo many requests for your key in this window.
503database_busyA short overload. Retry after retry-after.

All error codes