Seedance 2.0 Mini Serverless API
Fast text-to-video and image-to-video with synchronized audio.
POST /v2/seedance-2.0-mini · 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": "The waterfall cascades powerfully down the moss-covered cliffs, churning white water and swirling mist drifting through the air. Warm golden sunlight rays shimmer and shift through the dense canopy, tropical flowers and ferns sway gently in the breeze, and a small flock of birds glides across the sky in the distance. The camera slowly pushes in toward the falls. Ambient sound of rushing water, a soft forest breeze, and distant birdsong.",
11 "first_frame_url": "https://segmind-resources.s3.amazonaws.com/input/seedance-input-frame.jpg",
12 "reference_images": [],
13 "reference_videos": [],
14 "reference_audios": [],
15 "duration": 5,
16 "resolution": "720p",
17 "aspect_ratio": "16:9",
18 "generate_audio": True,
19 "seed": 42,
20 "return_last_frame": False,
21 "skip_moderation": False,
22}
23job = client.submit_async("seedance-2.0-mini", **payload)
24print(job.request_id) # available immediately
25try:
26 result = job.wait(timeout=900, interval=2.0)
27 print(result["status"]) # COMPLETED
28 print(result.get("output")) # model output (e.g. video URL)
29except InferenceTimeout as e:
30 print("still running:", e.request_id) # re-poll later with this id
31except InferenceFailed as e:
32 print("failed:", e.detail)
33
34# Fast models (<=600s) can use the one-liner instead:
35# result = segmind.run("seedance-2.0-mini", **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": "The waterfall cascades powerfully down the moss-covered cliffs, churning white water and swirling mist drifting through the air. Warm golden sunlight rays shimmer and shift through the dense canopy, tropical flowers and ferns sway gently in the breeze, and a small flock of birds glides across the sky in the distance. The camera slowly pushes in toward the falls. Ambient sound of rushing water, a soft forest breeze, and distant birdsong.",
11 "first_frame_url": "https://segmind-resources.s3.amazonaws.com/input/seedance-input-frame.jpg",
12 "reference_images": [],
13 "reference_videos": [],
14 "reference_audios": [],
15 "duration": 5,
16 "resolution": "720p",
17 "aspect_ratio": "16:9",
18 "generate_audio": True,
19 "seed": 42,
20 "return_last_frame": False,
21 "skip_moderation": False,
22}
23job = client.submit_async("seedance-2.0-mini", **payload)
24print(job.request_id) # available immediately
25try:
26 result = job.wait(timeout=900, interval=2.0)
27 print(result["status"]) # COMPLETED
28 print(result.get("output")) # model output (e.g. video URL)
29except InferenceTimeout as e:
30 print("still running:", e.request_id) # re-poll later with this id
31except InferenceFailed as e:
32 print("failed:", e.detail)
33
34# Fast models (<=600s) can use the one-liner instead:
35# result = segmind.run("seedance-2.0-mini", **payload)API Endpoint
https://api.segmind.com/v1/seedance-2.0-miniParameters
promptrequiredstringText prompt describing the video; cite uploaded assets as image 1, video 1, audio 1. Number shots (Shot 1, Shot 2) for multi-shot sequences.
"The waterfall cascades powerfully down the moss-covered cliffs, churning white water and swirling mist drifting through the air. Warm golden sunlight rays shimmer and shift through the dense canopy, tropical flowers and ferns sway gently in the breeze, and a small flock of birds glides across the sky in the distance. The camera slowly pushes in toward the falls. Ambient sound of rushing water, a soft forest breeze, and distant birdsong."aspect_ratiooptionalstringFrame shape; options 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, adaptive. Use 9:16 for social, 16:9 for landscape.
"16:9""16:9""9:16""1:1""4:3""3:4""21:9""adaptive"durationoptionalintegerClip length in seconds; allowed values 4, 5, 6, 8, 10, 12, 15. Use 5 for drafts, 15 for narratives.
5Range: 4 - 154568101215first_frame_urloptionalstring (uri)Starting frame image URL for image-to-video; real human faces are blocked and it cannot combine with reference_images. Use to animate a still.
"https://segmind-resources.s3.amazonaws.com/input/seedance-input-frame.jpg"generate_audiooptionalbooleanCo-generates synchronized audio (dialogue, SFX, ambient, music) in one pass. Enable for speech, nature, or music scenes.
truelast_frame_urloptionalstring (uri)Ending frame URL; requires first_frame_url and guides the transition between two frames. Use to fix a clip's final composition.
""reference_audiosoptionalstring[]Up to 3 audio URLs for timing or sound; cite as audio 1. Use for beat-sync or voice reference.
reference_imagesoptionalstring[]Up to 9 image URLs for character or style consistency; cite as image 1, image 2. Cannot combine with first_frame_url.
reference_videosoptionalstring[]Up to 3 video URLs for motion transfer; cite as video 1. Use to copy camera movement or action.
resolutionoptionalstringOutput resolution; options 480p, 720p, 1080p. Use 480p for fast drafts, 720p for final short-form.
"720p""480p""720p""1080p"return_last_frameoptionalbooleanReturns the final video frame as an image URL. Enable to chain clips by reusing it as the next first_frame_url.
falseseedoptionalintegerReproducibility seed; range -1 to 2147483647. Use -1 for random output, fix a value to iterate on a scene.
42Range: -1 - 2147483647skip_moderationoptionalbooleanBypasses the content moderation pre-filter; baseline BytePlus safety still applies. Enable for artistic content that triggers false positives.
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.0-miniSubmit — 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