OmwAIOmwAI
API GuideAPI ReferenceProgramming Tools
Seedance Video

Video Generation

Seedance asynchronous video generation endpoint

The Doubao video plugin serves every Seedance model through the same asynchronous POST /v1/video/generations endpoint. The model field must use a configured model name. The models that declare a capability profile in the plugin, with the output resolutions each one offers, are:

ModelResolutionsReference video inputSeparately priced audio output
doubao-seedance-1-0-pro-250528480p, 720p, 1080pNoNo
doubao-seedance-1-0-lite-t2v480p, 720p, 1080pNoNo
doubao-seedance-1-0-lite-i2v480p, 720p, 1080pNoNo
doubao-seedance-1-5-pro-251215480p, 720p, 1080pNoYes (generate_audio defaults to true)
doubao-seedance-2-0-260128480p, 720p, 1080p, 4kYesNo
doubao-seedance-2-0-fast-260128480p, 720pYesNo
doubao-seedance-2-0-mini-260615480p, 720pYesNo
doubao-seedance-2-5-260628480p, 720p, 1080pYesNo

A resolution tier the model does not offer is rejected: doubao-seedance-2-0-mini-260615 and doubao-seedance-2-0-fast-260128 do not accept 1080p or above, and doubao-seedance-2-5-260628 does not accept 4k. When resolution is omitted, the quota reservation uses the model's highest available tier up to 1080p, and settlement uses the resolution the upstream actually returns.

Which models are callable also depends on the channel configuration of the deployment; use GET /v1/models to see what the site currently exposes.

A successful response means that the task was accepted. Poll the Query Result endpoint with the returned id (also available as the legacy task_id). The corresponding model must be configured on a channel before it can be used.

Request parameters

  • model: required; use one of the model names listed by the code above;
  • prompt: required text prompt;
  • seconds: optional duration, accepted as a numeric string; the gateway validates 0–3600 seconds, while the upstream model may impose a narrower range;
  • metadata: optional Seedance parameters are passed through this object, such as resolution, ratio, frames, seed, generate_audio, watermark, camera_fixed, draft, callback_url, and service_tier.

Reference content

Pass Seedance image and video references through metadata.content so the required upstream role is preserved. Image items must set role: "reference_image" and video items must set role: "reference_video". If the native Seedance model supports start/end-frame references, use role: "first_frame" and role: "last_frame" for the corresponding image entries. Each item may use type image_url, video_url, or audio_url, with its URL in the corresponding url field. The gateway accepts up to 9 images, 3 videos, and 3 audio references, and rejects audio-only references. Reference video input is only supported by Seedance 2.x.

Text-to-video example

Text-to-video does not need metadata.content; provide the model and prompt:

curl https://www.omwai.xyz/v1/video/generations \
  -H "Authorization: Bearer $OMWAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "prompt": "A ginger cat runs down a rain-soaked city street, cinematic and stable camera",
    "seconds": "5",
    "metadata": {
      "resolution": "1080p",
      "ratio": "16:9"
    }
  }'

Image-to-video example

Place a single image reference in metadata.content and set role: "reference_image":

curl https://www.omwai.xyz/v1/video/generations \
  -H "Authorization: Bearer $OMWAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "prompt": "Have the person turn naturally and smile while preserving their appearance",
    "seconds": "5",
    "metadata": {
      "content": [
        {
          "type": "image_url",
          "role": "reference_image",
          "image_url": {
            "url": "https://example.com/reference.png"
          }
        }
      ],
      "resolution": "720p",
      "ratio": "16:9"
    }
  }'

First-frame video example

If the native Seedance model supports a first-frame reference, pass it as an image item with role: "first_frame" inside metadata.content:

curl https://www.omwai.xyz/v1/video/generations \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "prompt": "Use the first frame as the visual anchor and generate a dynamic video that continues its lighting, framing, and subject pose",
    "seconds": "6",
    "metadata": {
      "content": [
        {
          "type": "image_url",
          "role": "first_frame",
          "image_url": {
            "url": "https://example.com/first-frame.png"
          }
        }
      ],
      "resolution": "720p",
      "ratio": "16:9"
    }
  }'

First/last-frame video example

When the upstream model supports both starting and ending key frames, include both image entries in the same metadata.content array with role: "first_frame" and role: "last_frame":

curl https://www.omwai.xyz/v1/video/generations \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "prompt": "Keep the subject appearance and color balance consistent from the start frame to the end frame while creating a smooth transition",
    "seconds": "8",
    "metadata": {
      "content": [
        {
          "type": "image_url",
          "role": "first_frame",
          "image_url": {
            "url": "https://example.com/start-frame.png"
          }
        },
        {
          "type": "image_url",
          "role": "last_frame",
          "image_url": {
            "url": "https://example.com/end-frame.png"
          }
        }
      ],
      "resolution": "720p",
      "ratio": "16:9"
    }
  }'

Multi-reference video example

The following structure has been verified against the live endpoint. It combines two reference images, one reference video, and a text prompt:

curl https://www.omwai.xyz/v1/video/generations \
  -H "Authorization: Bearer $OMWAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "prompt": "Naturally combine the subjects from both images with the motion from the video, using cinematic lighting and a stable camera",
    "metadata": {
      "content": [
        {
          "type": "image_url",
          "role": "reference_image",
          "image_url": {
            "url": "https://example.com/reference-1.png"
          }
        },
        {
          "type": "image_url",
          "role": "reference_image",
          "image_url": {
            "url": "https://example.com/reference-2.png"
          }
        },
        {
          "type": "video_url",
          "role": "reference_video",
          "video_url": {
            "url": "https://example.com/reference.mp4"
          }
        }
      ],
      "resolution": "720p",
      "ratio": "16:9",
      "generate_audio": true
    }
  }'
POST
/v1/video/generations

Authorization

BearerAuth

AuthorizationBearer <token>

使用 OmwAI API Key 认证。

In: header

Request Body

application/json

model*string
Value in"doubao-seedance-1-0-pro-250528" | "doubao-seedance-1-0-lite-t2v" | "doubao-seedance-1-0-lite-i2v" | "doubao-seedance-1-5-pro-251215" | "doubao-seedance-2-0-260128" | "doubao-seedance-2-0-fast-260128" | "doubao-seedance-2-0-mini-260615" | "doubao-seedance-2-5-260628"
prompt*string

视频内容描述,不能为空。

seconds?string

视频时长;网关允许的校验上限为 3600 秒。

duration?integer

视频时长的整数形式。

Range0 <= value <= 3600
metadata?

视频分辨率等 Seedance 上游参数透传对象。各模型支持的 resolution 档位不同:2-0 支持到 4k,2-5 支持到 1080p,2-0-fast 与 2-0-mini 仅支持 480p、720p。metadata.content 中的图片通常使用 role=reference_image,视频使用 role=reference_video;如果原生 Seedance 模型支持首帧/尾帧参考,也可使用 role=first_frame / last_frame。其他参数包括 resolution、ratio、frames、seed、generate_audio、watermark、camera_fixed、draft、callback_url 和 service_tier。

Response Body

application/json

curl -X POST "https://www.omwai.xyz/v1/video/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "doubao-seedance-2-0-260128",    "prompt": "一只橘猫在雨后的城市街道上奔跑,电影感镜头",    "seconds": "5",    "metadata": {      "resolution": "1080p",      "ratio": "16:9"    }  }'
{
  "id": "string",
  "task_id": "string",
  "object": "video",
  "model": "string",
  "status": "queued",
  "progress": 0,
  "created_at": 0
}
Empty

Async flow

  1. Submit with POST /v1/video/generations;
  2. Poll GET /v1/video/generations/{task_id} with the returned id;
  3. When data.status=SUCCESS, read the video URL from data.result_url; when the task fails, inspect data.fail_reason.

How is this guide?

Last updated on