Seedance API return_last_frame and last_frame_url
Use return_last_frame to retrieve a generated video's final frame, then pass last_frame_url into a continuous Seedance video workflow.
Parameter
- Name
return_last_frame- Type
- boolean
- Required
- No
- Default
false- Upstream field
return_last_frame- Local validation
- Boolean and model field support
Supported models
- Seedance 2.0
- Seedance 2.0 Fast
- Seedance 2.0 Mini
- Seedance 1.5 Pro
- Seedance 1.0 Pro
- Seedance 1.0 Pro Fast
Request example
bash
curl https://api.seedanceapi.app/v1/videos/generations \ -H "Authorization: Bearer sk_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2-0", "prompt": "A slow aerial move over a green valley", "duration": 5, "resolution": "720p", "return_last_frame": true }'Task result
Poll the local task ID. When generation returns a last frame, the API persists it and includes it with the video URL.
json
{ "id": "vid_01jx...", "object": "video.generation", "model": "seedance-2-0", "status": "succeeded", "result": { "url": "https://example.com/generated-video.mp4", "last_frame_url": "https://example.com/generated-last-frame.png" }, "created_at": 1783900000, "completed_at": 1783900120}Continuous-video workflow
- Create the first task with
return_last_frame=true. - Poll until the task succeeds and save
result.last_frame_url. - Use that URL as
first_frame_urlin the next request. - Keep the prompt, ratio, and visual direction consistent across segments.
jsonNext segment
{ "model": "seedance-2-0", "prompt": "Continue the same camera movement toward the waterfall", "first_frame_url": "https://example.com/generated-last-frame.png", "duration": 5, "return_last_frame": true}Common errors
unsupported_parameter: the selected registry model does not expose the field.invalid_request: the field is not a boolean or another request constraint failed.- A succeeded task may omit
last_frame_urlif generation did not return it. - A retryable polling error does not remove a previously persisted last-frame URL.