Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Seedance 2.5 Image-to-Video: First and Last Frame Control (2026)

Description and use

Automation recipe for generating a video that starts and ends with specified images using Seedance 2.5, covering image preparation, request construction, error handling, and polling.

Problem

Users need to generate a video that starts and ends with specific images using Seedance 2.5, but the API has strict requirements for frame ordering, aspect ratio handling, and error responses.

Outcome

The recipe enables developers to reliably generate videos that start and end with specified images, avoiding common pitfalls such as incorrect frame_type usage and aspect_ratio errors.

Workflow

  • 1. Prepare two images (first and last frames).
  • 2. Encode each image as a data URI or provide a public URL.
  • 3. Build the JSON body: set model to "bytedance/seedance-2.5", include prompt, duration, resolution, and a frame_images array with one object for each frame, specifying frame_type as "first_frame" or "last_frame" and type as "image_url".
  • 4. Do NOT include an aspect_ratio field; if omitted, the API derives it from the first frame. If you need a different ratio, use "adaptive".
  • 5. POST to https://api.ofox.ai/v1/videos with Authorization header.
  • 6. On 202 response, note the polling_url.
  • 7. Poll the polling_url until status is terminal (e.g., "completed" or "failed").
  • 8. Retrieve the final video URL from the response.
  • 9. Handle 400 errors: ensure only one first_frame and one last_frame, and that last_frame is not sent without a first_frame.
  • 10. Verify the output by comparing opening and closing frames if needed.

Evidence

Seedance 2.5 treats the last frame as a destination, not a hint.

Source

Data URIs work, which matters more than it sounds: it means you can test first-last-frame generation without standing up a public image host first.

Source

POST /v1/videos {model: bytedance/seedance-2.5, resolution: 480p, aspect_ratio: "16:9", frame_images: [first, last]} 400 invalid_request "The parameter ratio specified in the request is not valid."

Source

  • Record date: 2026-09-05T15:44:55.153Z