Skip to main content
POST
Submit with POST /v1/videos/generations, read data[0].task_id, then poll GET /v1/tasks/{task_id}.
string
required
Use Authorization: Bearer <token>, where <token> is your APIMart API key.

Request parameters

string
required
Use seedance-2-5-flash. The alias doubao-seedance-2-5-flash is also accepted. The dotted name seedance-2.5-flash is not supported.
boolean
default:"false"
Whether to run content moderation before submitting the video task.
  • true: use omni-moderation-latest to review prompts and input images
  • false or omitted: do not send a moderation request, adding no moderation cost or latency (default)
A match returns HTTP 400 (nsfw_content_detected) without creating a task or charging for generation. Reference video/audio are not reviewed. Requests may proceed if the moderation service fails.
string
required
Required prompt. Refer to media with @图片1 / @视频1 / @音频1; indices start at 1 and follow the order within each media array.
string
default:"720p"
Only 480p / 720p; default 720p. Values such as 1080p, 2k, or 4k return HTTP 400 at submission.
string
default:"adaptive"
Accepts 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, and adaptive (default). Alias: aspect_ratio. First/last-frame, edit, and extend tasks require adaptive.
integer
Integer seconds 4–30; ordinary requests default to 5. Use -1 for automatic duration. Explicit edit only accepts -1 or omission; omission becomes -1 and output duration follows the source. Automatic duration reserves 30 seconds, then settles on actual token usage.
boolean
default:"true"
Generate audio; defaults to true. Alias: audio. This controls output sound, separately from reference input audio_urls.
boolean
default:"false"
Add an AI-generated watermark; default false.
integer
Optional random seed. Reusing a seed does not guarantee identical output.
string
default:"mp4"
Output container: mp4 (default) or mov.
string
default:"auto"
Accepts auto (default), reference, edit, or extend; only for requests with reference media. Explicit types trigger submission-time checks described below.
string[]
Reference image array, all treated as reference_image. At most 10 images combined with image_with_roles. Use image_with_roles for first and last frames.
object[]
Each item has url and role. Roles: reference_image, first_frame (at most 1), or last_frame (at most 1, paired with a first frame). At most 10 images combined with image_urls; avoid conflicting roles. When video_urls / audio_urls are present, first/last frames become reference images for the multimodal task.
string[]
At most 5 reference videos, 2–30 seconds each and at most 30 seconds combined. Source videos for editing must be 4–30 seconds.
string[]
At most 5 audio references, 2–30 seconds each and at most 30 seconds combined. Audio-only reference is supported; images or videos are not required.
boolean
default:"false"
Set true to return a last-frame image after success at data.result.videos[].last_frame_url.
Allow the model to search the web as needed; default false.
object[]
Optional tools, for example [{"type":"web_search"}] for web search.
draft / draft_task_id are not supported; remove them from the request. Draft fields return HTTP 400 at submission. Use Seedance 2.5 for draft mode.

Media requirements

Use publicly accessible http(s) URLs or approved asset:// IDs. Output resolution and input video pixel limits are validated separately.

Task types and constraints

Invalid explicit types or constraints return HTTP 400 before task creation or charging. With auto, the model infers the task from media and prompt, so type constraints may fail asynchronously. Even an explicit type can fail with InvalidParameter.TaskTypeMismatch if it conflicts with the prompt.

Request examples

Multimodal reference

First and last frames

Video editing

Video extension

Private media assets

Submit reference images or videos containing real human faces to the asset library for approval before using asset://. Set the upload model to seedance-2-5-flash as well. See the asset library API and use the Flash model name below.
Poll the asset review task through the unified task API. Once approved, obtain the asset:// ID from the asset list and use it in image_urls, image_with_roles[].url, video_urls, or audio_urls.

Task status and results

Poll the task status API. pending / processing are in progress, completed means success, and failed means failure. Read the video at data.result.videos[0].url[0]; url is an array.

Billing

  • Submission reserves an amount using the per-second rate for the resolution. Reference-video requests use the input tier, with output duration plus total reference-video duration.
  • Ordinary requests without duration reserve 5 seconds of output. duration: -1, or edit with omitted duration, reserves 30 seconds of output.
  • Successful tasks settle using data.usage.completion_tokens: tokens ÷ 1,000,000 × the applicable rate per million tokens, with account discounts. The difference from the reservation is refunded or charged. Reference-video presence selects token or token-input; data.cost is the final charge.
  • Rejected submissions incur no generation charge. Failed generation refunds the reserved amount. See the pricing page for rates and account discounts.

Common errors