/omni/media/v1/contents/generations/tasksSeedance video generation
The Seedance family supports text-to-video, image-to-video, first and last frame control, reference images, reference video and reference audio, with optional generated audio. Every Seedance model uses the endpoint and content[] format described in Video generation: create a task, poll until it is terminal, then download content.video_url. If unsure, use seedance-2-0.
Choose a model#
Call GET https://api.atptoken.ai/v1/project/models with the same key you create tasks with; it is the project's complete list (/v1/models lists chat models only). A model missing from a list is not necessarily unusable; without permission, create returns 403 and nothing is billed.
The model ID is seedance-2-0-mini. seedance-2-mini is not an alias for it and returns 400 InvalidParameter.
Generation modes#
First/last frame and references are different operations. A first frame becomes the opening shot of the video; a reference image only supplies a look, style or character and is not used as the opening shot.
Supported media combinations#
Media limits#
Media roles#
Parameters#
Aspect ratio with a first frame#
seedance-2-0family (including fast and mini):ratiosets the output shape, not the first frame.ratiodefaults to16:9, so a portrait first frame without a ratio gives a landscape video (864×496 at 480p), reframed. Sendratio: "adaptive"and the output follows the frame (portrait frame → 496×864).seedance-2-5: with first and last frames, do not sendratio. Without them you can, for exampleratio: "16:9".
Passing media#
content[].image_url.url can hold a public https:// URL, base64, or an asset://… URI (AssetUri) from the asset API. How to register assets, common mistakes and queueing rules are in Video generation under "Passing media".
A /v1/files file id (an_…) is not a media URL and returns 400.
When registering assets for seedance-2-0 or seedance-2-0-mini, a name over 64 characters still gets 200 at registration, but assets/get reports failure (InvalidParameter.Name) and the task gets ATP_ASSET_FAILED. This is not intermittent: shorten name; there is no need to switch to public URLs.
Photos of real people#
A public URL of a photo of a real person can be rejected with 400 … may contain real person. When that happens, register the same image as an asset and pass the AssetUri; no identity verification is needed. seedance-2-0-fast cannot use assets, so real-person photos and -fast do not go together; use seedance-2-0 or seedance-2-5. If your product requires identity verification, the flow is in Video generation under "Photos of real people".
Examples#
Every example below is sent to the same endpoint:
curl https://api.atptoken.ai/omni/media/v1/contents/generations/tasks \
-H "Authorization: Bearer $ATP_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: my-video-job-001" \
--data-binary @request.json
# → 202 { "id": "cgt_..." }Save any of the bodies below as request.json. When you resend the same request after a network failure, reuse the same Idempotency-Key; use a new key for a new piece of work.
Text-to-video#
{
"model": "seedance-2-0",
"content": [
{ "type": "text", "text": "A cinematic tracking shot of Taipei at night, neon reflections, smooth camera motion" }
],
"resolution": "480p",
"ratio": "16:9",
"duration": 4,
"generate_audio": false
}Image-to-video#
{
"model": "seedance-2-0",
"content": [
{ "type": "text", "text": "Animate this product shot with a slow premium studio push-in." },
{ "type": "image_url", "image_url": { "url": "https://example.com/product.jpg" }, "role": "first_frame" }
],
"resolution": "720p",
"ratio": "adaptive",
"duration": 4,
"generate_audio": false,
"return_last_frame": true
}Keep "ratio": "adaptive"; see "Aspect ratio with a first frame" above.
First and last frame (Seedance 2.5)#
{
"model": "seedance-2-5",
"content": [
{ "type": "text", "text": "Create a smooth transition from morning to night with consistent camera framing." },
{ "type": "image_url", "image_url": { "url": "https://example.com/morning.jpg" }, "role": "first_frame" },
{ "type": "image_url", "image_url": { "url": "https://example.com/night.jpg" }, "role": "last_frame" }
],
"resolution": "720p",
"duration": 6,
"generate_audio": false,
"output_format": "mp4"
}ratio is left out on purpose; see "Aspect ratio with a first frame" above.
Reference image plus reference video#
{
"model": "seedance-2-0",
"content": [
{ "type": "text", "text": "The character from the reference image dances with the motion of the reference video." },
{ "type": "image_url", "image_url": { "url": "https://example.com/character.jpg" }, "role": "reference_image" },
{ "type": "video_url", "video_url": { "url": "https://example.com/motion.mp4" }, "role": "reference_video" }
],
"resolution": "480p",
"ratio": "16:9",
"duration": 4,
"generate_audio": false
}Get the result#
curl https://api.atptoken.ai/omni/media/v1/contents/generations/tasks/cgt_xxx \
-H "Authorization: Bearer $ATP_API_KEY"Keep polling until status is succeeded, failed, cancelled or expired. On success, download the video from content.video_url. The URL expires after 24 hours: the status stays succeeded, but video_url becomes null and expired: true appears. Copy the file to your own storage within that window.
Billing#
Video is billed on video tokens, settled on actual usage once the task is terminal:
video_tokens = (in_dur + out_dur) × W × H × fps ÷ 1024in_dur is the input video length in seconds and out_dur the output length. When a model reports its own usage, that figure is used. Failed tasks are not billed. The cheapest end-to-end smoke test is 480p, duration: 4, generate_audio: false.