Seedance 2.0 Serverless API

Cinematic AI videos with native audio and multi-shot narratives.

~163.10s
~$0.261
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/seedance-2.0"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "prompt": "Generate a 16:9 aspect ratio video featuring top attractive Asian male and female leads, created according to the following shot script:\nShot 1 | 0s–1s\nMedium shot, static camera. Camera is stable, no movement. The man and woman sit inside a red convertible, looking forward in profile, expressions cold and composed. No effects. Dark tones dominate, atmosphere heavy and somber.\nShot 2 | 1s–2s\nWide/full shot, static camera. Camera stable, no movement. The woman sits on the car door, the man leans against the car body removing his jacket, gesture bold and dramatic. Hard cut transition. Red and black contrast, full of street rebellious energy.\nShot 3 | 2s–3s\nClose shot, static camera. No movement. The male lead wears sunglasses and stares directly into the camera; the female lead lightly brushes her hair aside. Hard cut transition. Red-black tones, mood cold and fierce.\nShot 4 | 3s–4s\nExtreme close-up, static camera. Fixed position. The car's rearview mirror reflects the female lead's face, her gaze distant and dreamy. Mirror reflection effect. Cool color tones, emphasizing loneliness.\nShot 5 | 4s–5s\nMedium shot, low-angle (upward tilt), static camera. Fixed position. The male lead in a white tank top smokes a cigarette, tilts his head looking into the distance, expression indifferent. No effects. Cool gray background, mood listless and detached.\nShot 6 | 5s–7s\nMedium shot, side tracking shot. Camera moves laterally at the same speed as the vehicle, conveying a sense of motion. Both are on a night drive, the woman turns her head to look at the man, expression natural and relaxed. Background dynamic blur. Night scenery with neon lights, mood relaxed and easy.\nShot 7 | 7s–9s\nMedium shot, front-facing tracking shot. Camera retreats at vehicle speed, strong sense of forward momentum. The female lead steers with one hand and makes a gesture; the male lead lounges casually in his seat. Background car light bokeh blur. Rich colors, mood free and uninhibited.\nShot 8 | 9s–14s\nClose shot, static camera. Fixed position. The female lead tilts her head back against the seat; the male lead wears sunglasses and gazes ahead, expression distant and detached. Subtitles appear at the bottom of the frame. Red-black palette, mood returns to solitude and exhaustion.",
12    "reference_images": [],
13    "reference_videos": [],
14    "reference_audios": [],
15    "duration": 10,
16    "resolution": "720p",
17    "aspect_ratio": "16:9",
18    "generate_audio": true,
19    "seed": 42,
20    "return_last_frame": false
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26    result = response.json()
27    print(json.dumps(result, indent=2))
28else:
29    print(f"Error: {response.status_code}")
30    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/seedance-2.0

Parameters

promptrequired
string

Text describing the video. Use Shot 1:, Shot 2: for multi-shot sequences. Reference uploaded assets as 'image 1', 'video 1', 'audio 1' in your prompt.

Default: ""
aspect_ratiooptional
string

Output aspect ratio. Use 16:9 for landscape, 9:16 for vertical social video, 21:9 for ultrawide cinematic.

Default: "16:9"
Allowed values :
"16:9""9:16""1:1""4:3""3:4""21:9""adaptive"
durationoptional
integer

Video length in seconds. Supported values: 4, 5, 6, 8, 10, 12, 15. Use 5s for quick clips, 15s for cinematic narratives.

Default: 10Range: 4 - 15
Allowed values :
4568101215
first_frame_urloptional
string (uri)

Starting frame image URL for image-to-video. Animates outward from this reference. Note: images with real human faces are blocked by ByteDance content policy. Cannot be used together with reference_images.

Default: ""
generate_audiooptional
boolean

Co-generate synchronized audio (dialogue, SFX, ambient, music) in the same pass. Best for scenes with speech, nature sounds, or music.

Default: true
last_frame_urloptional
string (uri)

Ending frame; requires first_frame_url. Guides transitions between two frames.

Default: ""
reference_audiosoptional
string[]

Up to 3 reference audio files. Cite as 'audio 1' in your prompt.

reference_imagesoptional
string[]

Up to 9 reference images for character/style consistency. Cite as 'image 1', 'image 2' in your prompt. Cannot be used together with first_frame_url.

reference_videosoptional
string[]

Up to 3 reference videos for motion transfer. Cite as 'video 1' in your prompt.

resolutionoptional
string

Output resolution. Use 480p for drafts and fast iteration, 720p for final renders.

Default: "720p"
Allowed values :
"480p""720p"
return_last_frameoptional
boolean

Returns the final video frame as an image URL. Use to chain clip sequences by passing each final frame as the next first_frame_url.

Default: false
seedoptional
integer

Reproducibility seed. Use -1 for random output, set a fixed value to iterate on the same scene.

Default: 42Range: -1 - 2147483647

Response Type

Returns: Video

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out