Generate Videos and Manage Assets

Generate videos with Kling v4 and Seedance models, and reference authorized assets.

Submit video generation tasks and manage authorized media assets through native video endpoints.

POST/v1/videos

Request Body

FieldTypeRequiredDescription
promptstringYesText description of the desired video scene and motion.
modelstringNoVideo model identifier, such as kling-v4 or doubao-seedance-2-0-260128.
duration_secondsnumberNoVideo duration in seconds (positive number up to 300, or alias duration).
Additional fieldsobjectNoVideo parameters such as resolution, aspect_ratio, first_frame_url, and last_frame_url pass through intact.

Seedance Authorized Assets

POST/v1/seedance/assets
GET/v1/seedance/assets/{asset_id}
  • Asset registration: Send POST /v1/seedance/assets (operationId: seedance_assets.create) with JSON containing required sourceUrl and assetType (image or video), and optional displayName.
  • URI references: Reference registered media directly using asset://{asset_id} in frame URLs or parameters.
  • Tenant isolation: Assets are isolated to the tenant's current asset library and verified against upstream stores.

Task Status and Download

GET/v1/videos/{task_id}
  • Status polling: Query task status via GET /v1/videos/{task_id} (operationId: legacy_media.video.get), supporting statuses queued, submitting, submitted, running, ingesting_artifacts, cancel_requested, completed, failed, and cancelled.
  • Artifact download: Download completed video files via GET /v1/videos/{task_id}/content.
  • Kling v4 support: Supports text-to-video, first-frame image-to-video, and last-frame transitions.

Compatibility Aliases

  • Legacy media alias: POST /openai/v1/videos is a legacy alias of POST /v1/videos (legacy_media.video.create.alias), sharing the same request format.
  • Legacy generation task route: POST /v1/videos/generations accepts CreateVideoGenerationRequest payloads.
  • Unified async pipeline: POST /v1/async-tasks/video-generations provides the standard async task contract.