Seedance 2.0 Serverless API
Cinematic AI videos with native audio and multi-shot narratives.
POST /v2/seedance-2.0 · submit + poll 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3from segmind import SegmindClient, InferenceFailed, InferenceTimeout
4
5# Async (v2) — recommended for long-running / video models.
6# run() blocks up to 600s; submit_async + job.wait(timeout=...) sets a longer
7# deadline and keeps the request_id so you can re-poll later.
8client = SegmindClient() # reads SEGMIND_API_KEY
9payload = {
10 "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.",
11 "duration": 10,
12 "resolution": "720p",
13 "aspect_ratio": "16:9",
14 "generate_audio": False,
15 "seed": 42,
16}
17job = client.submit_async("seedance-2.0", **payload)
18print(job.request_id) # available immediately
19try:
20 result = job.wait(timeout=900, interval=2.0)
21 print(result["status"]) # COMPLETED
22 print(result.get("output")) # model output (e.g. video URL)
23except InferenceTimeout as e:
24 print("still running:", e.request_id) # re-poll later with this id
25except InferenceFailed as e:
26 print("failed:", e.detail)
27
28# Fast models (<=600s) can use the one-liner instead:
29# result = segmind.run("seedance-2.0", **payload) 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3from segmind import SegmindClient, InferenceFailed, InferenceTimeout
4
5# Async (v2) — recommended for long-running / video models.
6# run() blocks up to 600s; submit_async + job.wait(timeout=...) sets a longer
7# deadline and keeps the request_id so you can re-poll later.
8client = SegmindClient() # reads SEGMIND_API_KEY
9payload = {
10 "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.",
11 "duration": 10,
12 "resolution": "720p",
13 "aspect_ratio": "16:9",
14 "generate_audio": False,
15 "seed": 42,
16}
17job = client.submit_async("seedance-2.0", **payload)
18print(job.request_id) # available immediately
19try:
20 result = job.wait(timeout=900, interval=2.0)
21 print(result["status"]) # COMPLETED
22 print(result.get("output")) # model output (e.g. video URL)
23except InferenceTimeout as e:
24 print("still running:", e.request_id) # re-poll later with this id
25except InferenceFailed as e:
26 print("failed:", e.detail)
27
28# Fast models (<=600s) can use the one-liner instead:
29# result = segmind.run("seedance-2.0", **payload)API Endpoint
https://api.segmind.com/v1/seedance-2.0Parameters
promptrequiredstringText 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.
aspect_ratiooptionalstringOutput aspect ratio. Use 16:9 for landscape, 9:16 for vertical social video, 21:9 for ultrawide cinematic.
"16:9""16:9""9:16""1:1""4:3""3:4""21:9""adaptive"bitrate_modeoptionalstringOutput video encoding bitrate. 'standard' gives smaller files and faster downloads; 'high' produces ~5-6x higher bitrate for better visual fidelity and fewer compression artifacts (larger files). Does not affect price.
"standard""standard""high"durationoptionalintegerVideo length in seconds. Supported values: 4, 5, 6, 8, 10, 12, 15. Use 5s for quick clips, 15s for cinematic narratives.
1045678910111213first_frame_urloptionalstring (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.
generate_audiooptionalbooleanCo-generate synchronized audio (dialogue, SFX, ambient, music) in the same pass. Best for scenes with speech, nature sounds, or music.
falselast_frame_urloptionalstring (uri)Ending frame; requires first_frame_url. Guides transitions between two frames.
reference_audiosoptionalstring[]Up to 3 reference audio files (MP3). Cite as 'audio 1' in your prompt. Cannot be used with text+audio only — include an image or video input too.
reference_imagesoptionalstring[]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_videosoptionalstring[]Up to 3 reference videos (2-15 seconds each) for motion/style transfer. Cite as 'video 1' in your prompt. Requests with reference videos are billed at the video-to-video token rate.
resolutionoptionalstringOutput resolution. Use 480p for drafts and fast iteration, 720p/1080p for final renders, 4k (3840x2160) for maximum detail. Higher resolutions cost more (token-based) and take longer.
"720p""480p""720p""1080p""4k"return_last_frameoptionalbooleanReturns the final video frame as an image URL. Use to chain clip sequences by passing each final frame as the next first_frame_url.
falseseedoptionalintegerReproducibility seed. Use -1 for random output, set a fixed value to iterate on the same scene.
42Range: -1 - 2147483647skip_moderationoptionalbooleanBypass BytePlus content moderation pre-filter. Useful when generating artistic content or faces that may trigger false positives. Baseline BytePlus safety policies still apply.
falseResponse Type
Returns: Video
Asynchronous requests (v2)
Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.
- 1
POST /v2/seedance-2.0Submit — returns request_id, status_url, response_url
- 2
GET /v2/requests/{id}/statusPoll — until COMPLETED or FAILED
- 3
GET /v2/requests/{id}Result — final response body
Status states
- A FAILED request is served as HTTP 422 — the body still carries the error detail.
- An unknown or expired request_id returns HTTP 404.
- Results are retained for 1 hour, then expire.
- Content / RAI blocks surface as FAILED, not a separate state.
- Track completion by polling the status endpoint.
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out