Generate

Video

One endpoint for video models, lip-sync and captions. Video takes from about a minute to several, so plan to poll slowly or use a webhook.

POSThttps://api.sume.com/v1/video-router/generate

Request

Same headers as images, Idempotency-Key included. Durations, resolutions and inputs differ by model; check the model's capabilities in Models before you send.

NameTypeRequiredDescription
modelstringYesModel id, such as seedance-2.5 or kling-3.
promptstringNoWhat happens in the shot. Most models need it; a few edit and lip-sync models do not take it.
durationintegerNoSeconds, within the model's duration_seconds range.
resolutionstringNoOne the model lists, such as 480p, 720p, 1080p.
aspect_ratiostringNo16:9, 9:16, 1:1 and others, where listed.
image_urlstringNoFirst frame for image to video, or the face for image lip-sync.
end_image_urlstringNoLast frame. Needs image_url.
video_urlstringNoSource clip for video to video, video lip-sync and captions.
audio_urlstringNoSpeech for lip-sync models. To give Seedance 2.5 a voice, music or sound to use, send reference_audio_urls.
reference_image_urlsstring[]NoReference images, where the model takes them: up to 30 on Seedance 2.5, 9 on most others.
reference_video_urlsstring[]NoReference clips, where the model takes them: up to 10 on Seedance 2.5, 5 on Kling 4.0 Omni, 3 on most others.
reference_audio_urlsstring[]NoReference audio for the voice, music or sound of a new clip: up to 10 MP3 or WAV files on Seedance 2.5, each 1.8–30.2 s, 30.2 s in all, sent with at least one reference image or clip.
generate_audiobooleanNoAsk for a soundtrack, on models that make one.
keep_original_soundbooleanNoKling 4.0 Omni with a reference clip: true keeps the first clip's own sound instead of making new sound.
modestringNoasync (default), webhook, sync or subscribe.
webhook_urlstringNoPublic HTTPS URL called when the job ends.
metadataobjectNoYour own key-value data, stored on the job.

Text to video

curl -X POST https://api.sume.com/v1/video-router/generate \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "model": "seedance-2.5",
    "prompt": "Steam rises from a coffee cup as the camera slowly pushes in",
    "duration": 5,
    "resolution": "480p",
    "aspect_ratio": "16:9"
  }'

Image to video

Put the first frame in image_url. Upload a local picture first with File uploads.

JSON body
{
  "model": "kling-4",
  "prompt": "The kite drifts gently in the wind, waves roll in",
  "image_url": "https://media.sume.com/assets/asset_6f1d0c2b/source.png",
  "duration": 5
}

References

Seedance 2.5 takes up to 30 reference_image_urls, 10 reference_video_urls and 10 reference_audio_urls, 50 files in all. Clips and audio each run at most 30.2 s in all, and every file at least 1.8 s. Name them in the prompt in list order: @Image1, @Video1, @Audio1. Reference audio sets the voice, music or sound of the new clip; it is not lip-sync. Image and audio references are free. A reference clip is billed with the output: its seconds, at least two thirds of the output, are added at the reference rate. References cannot be combined with image_url or end_image_url.

JSON body
{
  "model": "seedance-2.5",
  "prompt": "@Image1 holds the bottle from @Image2 and says the line in @Audio1; @Video1 sets the camera move",
  "reference_image_urls": [
    "https://media.sume.com/assets/asset_person/source.jpg",
    "https://media.sume.com/assets/asset_product/source.png"
  ],
  "reference_video_urls": ["https://media.sume.com/assets/asset_move/source.mp4"],
  "reference_audio_urls": ["https://media.sume.com/assets/asset_voice/source.wav"],
  "duration": 8,
  "resolution": "720p"
}

Kling 4.0 Omni (kling-4-omni) takes up to 10 reference_image_urls and 5 reference_video_urls, named @image_1 and @video_1 in the prompt. A reference clip gives the new video its motion, camera move or style; each clip runs 3–30 s, 30 s in all. With a clip, Kling bills its seconds plus the output seconds, at least twice the output, at its video-input rate. keep_original_sound: true keeps the first clip's sound.

JSON body
{
  "model": "kling-4-omni",
  "prompt": "A red pickup truck drifts across a frozen lake, filmed with the camera move of @video_1",
  "reference_video_urls": ["https://media.sume.com/assets/asset_move/source.mp4"],
  "duration": 5,
  "resolution": "720p"
}

Lip-sync and captions

Lip-sync models make a face say an audio track: image_url or video_url for the face, audio_url for the speech, and usually a duration as long as the audio. Captions models take a video_url.

JSON body
{
  "model": "veed-fabric-1.0",
  "image_url": "https://media.sume.com/assets/asset_face/source.jpg",
  "audio_url": "https://media.sume.com/assets/asset_voice/source.wav",
  "duration": 8,
  "resolution": "480p"
}

Long jobs

A video can still be running after your own deadline. Check it again later with the same job id; do not submit again, which starts and charges a second job.

Response

202 Accepted
{
  "data": {
    "request_id": "job_7513b52d-3669-4ffe-b317-8b02000715eb",
    "job": {
      "id": "job_7513b52d-3669-4ffe-b317-8b02000715eb",
      "type": "video_generation",
      "status": "queued",
      "model": "seedance-2.5",
      "created_at": "2026-10-21T02:31:52.075Z",
      "result": null,
      "error": null
    },
    "status_url": "https://api.sume.com/v1/jobs/job_7513b52d-3669-4ffe-b317-8b02000715eb/status",
    "result_url": "https://api.sume.com/v1/jobs/job_7513b52d-3669-4ffe-b317-8b02000715eb/result",
    "events_url": "https://api.sume.com/v1/jobs/job_7513b52d-3669-4ffe-b317-8b02000715eb/events",
    "cancel_url": null,
    "cancelable": false,
    "next_action": "poll_status",
    "next_poll_after_seconds": 2,
    "terminal": false,
    "idempotency_hit": false
  }
}

Errors

StatuscodeWhen
400invalid_requestA field is missing, unknown for the model or out of range.
401unauthorizedNo key, or the key is wrong or revoked.
402insufficient_fundsThe workspace balance does not cover the price.
409idempotency_conflictThe Idempotency-Key was used for a different request.
429queue_fullThe workspace has as many jobs in flight as it may.
429rate_limitedToo many requests for this key right now.