1. Video (OpenAI compatible)
Ark-Docs
  • Video (Doubao native)
    • Submit a video generation task (Doubao native)
      POST
    • Retrieve a video generation task (Doubao native)
      GET
  • Video (OpenAI compatible)
    • Submit a video generation task (OpenAI compatible)
      POST
    • Retrieve a video generation task
      GET
    • Submit a video generation task (OpenAI Video alias)
      POST
    • Retrieve a video generation task (OpenAI Video alias)
      GET
  • Video content
    • Download the generated video file
      GET
  • Image (Doubao native)
    • Generate an image (Doubao native)
      POST
  • Image (OpenAI compatible)
    • Generate an image (OpenAI compatible)
      POST
    • Edit an image (OpenAI compatible)
      POST
  • Asset library (Doubao native)
    • Manage the asset library (Doubao native)
      POST
  • 数据模型
    • VideoGenerationRequest
    • VideoFormDataRequest
    • VideoMetadata
    • DoubaoNativeVideoRequest
    • DoubaoNativeContentItem
    • VideoTaskResponse
    • DoubaoNativeVideoResponse
    • VideoTaskError
    • DoubaoImageRequest
    • ImageEditFormDataRequest
    • DoubaoImageResponse
    • ErrorResponse
    • DoubaoAssetRequest
    • DoubaoAssetResponse
  1. Video (OpenAI compatible)

Submit a video generation task (OpenAI compatible)

POST
/v1/video/generations
Submit an asynchronous video generation task using the gateway's
OpenAI-compatible request shape.
The response returns a task ID. Poll GET /v1/video/generations/{task_id}
or GET /v1/videos/{task_id} for the result.
Request shape
Top-level: model, prompt, seconds, and an optional image URL.
Extension parameters (ratio, resolution, generate_audio, watermark,
content, ...) go inside the metadata object.
seconds is a string. "-1" lets the model choose the duration.
Supported scenarios
ScenarioFields
Text to videomodel, prompt
Image to video, first framemodel, prompt, image
Image to video, first and last framemodel, prompt, metadata.content with role: first_frame and role: last_frame
Multimodal referencemodel, prompt, metadata.content with several reference items
Edit videomodel, prompt, metadata.content with video_url, plus omni_reference_task_type: edit
Extend videomodel, prompt, metadata.content with video_url, plus omni_reference_task_type: extend
Media references
image and every metadata.content entry take an HTTP(S) URL or a
Base64 data URI such as data:image/png;base64,.... Uploaded files are
rejected; send the reference as a value instead.
Billing
Duration drives the cost. When seconds is "-1" the model picks the length,
and the final duration is reported in the task's duration field.

请求参数

Authorization
JWT Bearer
在 Header 添加参数
Authorization
示例:
Authorization: ********************
or
Body 参数
application/json
必填

示例
{
    "model": "doubao-seedance-2-0-260128",
    "prompt": "An astronaut walks slowly across the lunar surface, Earth hanging in a black sky",
    "seconds": "5",
    "metadata": {
        "ratio": "16:9",
        "resolution": "720p"
    }
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location '/v1/video/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "doubao-seedance-2-0-260128",
    "prompt": "An astronaut walks slowly across the lunar surface, Earth hanging in a black sky",
    "seconds": "5",
    "metadata": {
        "ratio": "16:9",
        "resolution": "720p"
    }
}'

返回响应

🟢200
application/json
Task accepted. The task is queued and status is queued.
Bodyapplication/json

示例
{
    "id": "task_abc123def456",
    "object": "video",
    "model": "doubao-seedance-2-0-260128",
    "status": "queued",
    "progress": 0,
    "created_at": 1712345678
}
🟠400BadRequest
🟠401Unauthorized
🟠402InsufficientQuota
🔴500ServerError
修改于 2026-10-28 04:38:45
上一页
Retrieve a video generation task (Doubao native)
下一页
Retrieve a video generation task
Built with