Seedance 2.5 Extend API
Extend video forward or backward, keeping look and motion.
POST /v2/seedance-2.5-extend · 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 "video": "https://segmind-resources.s3.amazonaws.com/input/seedance-2.5-edit-source-739a4cc6.mp4",
11 "direction": "forward",
12 "prompt": "The wind-up tin robot keeps marching to the end of the bench, reaches the row of colourful wooden building blocks and bumps the stack with its chest; the blocks topple and tumble across the workshop bench as the robot's legs keep ticking. Same stiff clockwork gait, same bench and window light, natural workshop ambience with the clatter of falling blocks.",
13 "duration": 6,
14 "resolution": "720p",
15 "generate_audio": True,
16}
17job = client.submit_async("seedance-2.5-extend", **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.5-extend", **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 "video": "https://segmind-resources.s3.amazonaws.com/input/seedance-2.5-edit-source-739a4cc6.mp4",
11 "direction": "forward",
12 "prompt": "The wind-up tin robot keeps marching to the end of the bench, reaches the row of colourful wooden building blocks and bumps the stack with its chest; the blocks topple and tumble across the workshop bench as the robot's legs keep ticking. Same stiff clockwork gait, same bench and window light, natural workshop ambience with the clatter of falling blocks.",
13 "duration": 6,
14 "resolution": "720p",
15 "generate_audio": True,
16}
17job = client.submit_async("seedance-2.5-extend", **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.5-extend", **payload)API Endpoint
https://api.segmind.com/v1/seedance-2.5-extendParameters
directionrequiredstringWhich way the clip grows: forward continues it after the last frame, backward adds what happens before the first. Use forward to continue a scene, backward for an establishing lead-in.
"forward""forward""backward"promptrequiredstringWhat happens in the new section of @Video 1; the direction is written in for you and the output is only the new footage. Describe one clear beat and cite extra references as @Image 1, @Video 2, @Audio 1.
videorequiredstring (uri)The clip to extend, cited as @Video 1: 2-30 s, mp4 or mov, 480p-4k, up to 200 MB. The output keeps its aspect ratio; real human faces in the source are blocked by the content policy.
auto_resizeoptionalbooleanAutomatically resizes a reference image outside the accepted input range (300-6000px per side, ratio 0.4-2.5, 30 MB) so the request succeeds, preserving aspect ratio. Leave on; set false to have out-of-range images rejected instead.
truebitrate_modeoptionalstringEncoding bitrate: standard for smaller files, high for maximum fidelity. Use high for delivery masters, standard for quick previews.
"standard""standard""high"durationoptionalintegerLength of the new footage in seconds (4-30), or -1 to let the model choose (about 6 s for a 5 s clip). Set a value for a precise beat; the source clip is billed on top.
-1-1456789101112generate_audiooptionalbooleantrue continues sound for the new footage in the clip's own style; false delivers no audio track. Leave on to carry the soundtrack across the join.
trueoutput_codecoptionalstringCodec of the delivered file. 'auto' returns the model's own encode untouched - for seedance-2.5 at 1080p that is 10-bit HEVC, the highest-fidelity master, which Chrome and Firefox on Windows cannot decode and will play as audio over a blank frame. 'h264' re-encodes it to H.264 High 8-bit yuv420p, which plays everywhere, at the cost of one additional generation of compression and half the bit depth; pick it for browser embeds and previews, and leave it on 'auto' when the file goes into an edit or grade. Output that is already H.264 (720p, 480p, the 2.0 series) is never re-encoded either way. Adds a few seconds when it applies, and does not affect price.
"auto""auto""h264"output_formatoptionalstringmp4 for best compatibility; mov (higher colour fidelity) for editing round-trips. Pick mov when the result feeds another edit or grade.
"mp4""mp4""mov"reference_audiosoptionalstring[]Up to 10 MP3s (2-30 s each, 30 s combined), cited as @Audio 1. Use to drive voice, music or beat-matched pacing.
reference_imagesoptionalstring[]Up to 30 images for character or style consistency, cited as @Image 1. Supply reference art to keep a continued subject on-model.
reference_videosoptionalstring[]Up to 9 extra clips besides the source (2-30 s each, 30 s combined), cited as @Video 2 onward. Add for motion or style transfer; billed at the video-input rate.
resolutionoptionalstringOutput resolution: 480p, 720p or 1080p at 24 fps. Use 480p for drafts, 720p for final renders, 1080p (10-bit) for highest fidelity.
"720p""480p""720p""1080p"return_last_frameoptionalbooleanReturns the final frame as an image URL (video.last_frame_url). Enable to chain this extension into the next shot.
falseseedoptionalintegerReproducibility seed (-1 to 2147483647). Use -1 for a random result, fix a value to iterate the same continuation.
42Range: -1 - 2147483647skip_moderationoptionalbooleanBypasses the content pre-filter for false positives. Leave off unless artistic content is wrongly blocked.
trueResponse 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.5-extendSubmit — 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