How to Generate Videos with the Seedance API: A Practical Builder Guide

How to Generate Videos with the Seedance API: A Practical Builder Guide

When you are building a product that needs short generated video clips, the hard part is usually not the prompt itself. It is turning a prompt, a reference image, or multimodal inputs into a repeatable API workflow that your app can validate, retry, and observe.

The Seedance Videos API on Ace Data Cloud follows a typed job pattern: send structured content to POST https://api.acedata.cloud/seedance/videos, choose a model, describe the output shape, and read the returned task result.

What you can do

  • Text to video: send a content item with type: "text" and a prompt.
  • Image to video: send an image_url content item, then describe motion with text.
  • First and last frame control: mark images with role: "first_frame" and role: "last_frame".
  • Multimodal reference: Seedance 2.0 models support reference_image, reference_audio, and reference_video.
  • Editing and extension: doubao-seedance-2-5-260628 supports omni_reference_task_type values such as auto, reference, edit, and extend.

How it works

A basic request uses JSON headers: accept: application/json, authorization: Bearer {token}, and content-type: application/json. The main body fields are model, content, resolution, ratio, and duration.

Useful models include doubao-seedance-2-0-fast-260128, doubao-seedance-2-0-260128, doubao-seedance-2-0-mini-260615, and doubao-seedance-2-5-260628. The resolution field can be 480p, 720p, 1080p, or, where supported, 4k. The ratio field can be 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, or adaptive.

Duration is model dependent. Seedance 2.0 supports 4 to 15 seconds, while Seedance 2.5 supports 4 to 30 seconds. Some 1.5 and 2.x workflows also support -1 for automatic length.

Start with text-to-video

Here is the smallest useful request: one text prompt, a fast Seedance 2.0 model, and explicit output controls.

curl -X POST 'https://api.acedata.cloud/seedance/videos' \
  -H 'authorization: Bearer {token}' \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -d '{
    "content": [{"type":"text","text":"A white ceramic coffee mug on a glossy marble countertop with soft morning window light. The camera slowly orbits 360 degrees around the mug, steam gently rising."}],
    "model": "doubao-seedance-2-0-fast-260128",
    "resolution": "720p",
    "ratio": "16:9",
    "duration": 5
  }'

A successful response includes success, task_id, trace_id, and data. Inside data, the API can return status, model, duration, resolution, ratio, and video_url.

{
  "success": true,
  "task_id": "9777f36b-4f44-47ff-962d-45cd2f7aeaa8",
  "trace_id": "ce5da2ca-6695-4459-9d2c-2ef9f86db752",
  "data": {
    "status": "succeeded",
    "model": "doubao-seedance-2-0-fast-260128",
    "duration": 5,
    "resolution": "720p",
    "ratio": "16:9",
    "video_url": "https://platform2.cdn.acedata.cloud/seedance/example.mp4"
  }
}

Prefer structured fields over inline flags

The docs also describe inline prompt parameters such as --rs, --rt, --dur, --seed, --cf, and --wm. They map to resolution, ratio, duration, seed, camerafixed, and watermark. For product code, top-level JSON fields are easier to validate and debug.

Add references when consistency matters

For image-to-video, image_url must be an object, not a string:

{
  "type": "image_url",
  "image_url": {"url": "https://example.com/reference.png"}
}

If you use first and last frame control, use first_frame and last_frame. For Seedance 2.0 multimodal references, use reference_image, reference_audio, or reference_video. The docs note that first/last-frame workflows and full-modal reference workflows should not be mixed in the same request.

Seedance 2.0 supports up to 9 image references, up to 3 audio references, and up to 3 video references. Reference audio supports wav and mp3, each item 2 to 15 seconds, total duration not exceeding 15 seconds, and a single item not exceeding 15 MB. Reference video supports mp4 and mov, each item 2 to 15 seconds and total duration not exceeding 15 seconds.

Use Seedance 2.5 for editing and extension

Seedance 2.5 adds omni_reference_task_type. For editing, the request must include a reference_video, use ratio: "adaptive", and use duration: -1. For extension, use ratio: "adaptive" and choose duration from 4 to 30, or -1.

{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {"type":"text","text":"Replace the sky with a warm golden evening while preserving the subject and camera motion."},
    {"type":"video_url","role":"reference_video","video_url":{"url":"https://cdn.acedata.cloud/input.mp4"}}
  ],
  "resolution": "720p",
  "ratio": "adaptive",
  "duration": -1,
  "omni_reference_task_type": "edit",
  "output_format": "mov"
}

Production notes

If you build this into a product, validate content shapes before sending, store task_id and trace_id for support, and use safety_identifier as a stable anonymous user identifier instead of personal data. For async systems, callback_url can return a task immediately and post results to your service when generation completes.

The Seedance API is most useful when treated as a typed media job interface, not a one-off prompt box. Start with text-to-video or image-to-video, then add reference roles and Seedance 2.5 editing only when your workflow needs them.

Read the full reference in the Seedance Videos API integration guide.

Comments

Popular posts from this blog

Artistic QR Code API Integration Guidance

How to Configure Claude Code with CC Switch and Ace Data Cloud

How to Build a Server-Side Image Editing Workflow with GPT-Image-2