Skip to main content
POST

Authorizations

Authorization
string
header
required

Use Bearer Token authentication. Format: Authorization: Bearer sk-xxxxxx

Body

application/json
model
enum<string>
required

Required, external model name. gemini-omni Can be called via /v1/videos.

Available options:
sora-2,
sora-2-pro,
gemini-omni,
happyhorse-1.1,
happyhorse-1.1-1080p,
wan-3.0-prime,
wan-3.0-prime-1080p,
sd-2-5-4k,
sd-2-5-flash,
sd-2-5-flash-480p,
happyhorse-1.0,
happyhorse-1.0-i2v,
happyhorse-1.0-t2v,
happyhorse-1.0-r2v,
happyhorse-1.0-video-edit,
doubao-seedance-1-0-lite-i2v-250428,
doubao-seedance-1-0-lite-t2v-250428,
doubao-seedance-1-0-pro-250528,
doubao-seedance-1-0-pro-fast-251015,
doubao-seedance-1-5-pro-251215,
doubao-seedance-2-0-260128,
doubao-seedance-2-0-fast-260128,
sd-2-5,
veo3,
veo3-fast,
veo3-fast-frames,
veo3-frames,
veo3-pro,
veo3-pro-frames,
veo3.1,
veo3.1-4k,
veo3.1-components,
veo3.1-fast,
veo3.1-pro,
veo3.1-pro-4k,
kling-4.0,
kling-4.0-1080p,
grok-imagine-1.0-video,
grok-imagine-video-1.5-preview,
grok-video-3,
minimax-h3,
hailuo-2.3,
viduq3-turbo,
viduq2,
vidu2.0,
vidu-q4,
vidu-q4-540p,
magi-2-1080p
Example:

"sora-2"

prompt
string

Video description. Standard OpenAI/Sora requests for Kling 4.0 use prompt directly; when using the standard Seedance format, provide text in the text item of content, without contents/settings/options. For other models, provide text according to their respective format requirements.

image
file

Single image entry point; will be mapped to images in certain compatibility modes.

duration
integer

Unified duration parameter. Some models also accept seconds.

width
integer

Video width

Example:

512

height
integer

Video height

Example:

512

fps
integer

Video frame rate

Example:

30

seed
integer

Random seed

Example:

20231234

n
integer

Number of videos to generate

Example:

1

response_format
string

Response format

Example:

"url"

user
string

User identifier

Example:

"user-1234"

metadata
object

Dynamic extension field container. Numerous model-specific fields are deserialized from here.

tool
string
mode
string

Optional, video generation mode. gemini-omni Supports t2v, r2v, and edit.

Kling 4.0 can use the Seedance format fields content/duration/resolution/ratio/mode directly, or the OpenAI video format fields prompt/seconds/size/input_reference; neither requires additional contents/settings/options. The available mode values are t2v (text only), i2v (single first frame), i2v_first_last (first and last frames), reference_images (standard reference images), and reference_material (all-in-one reference materials; audio requires a route that supports this capability). If mode is omitted and no tool is explicitly specified, reference_material is used by default when reference materials are provided, and t2v when none are provided. Reference modes use standard reference-image roles; explicitly specified first and last frames are not silently treated as reference images. For first and last frames, explicitly select i2v or i2v_first_last and omit the aspect ratio parameter. Kling 4.0 generates audio and video together by default. All-in-one reference mode supports public audio URLs: use audio_urls with /v1/videos and the audio_url item in content with Seedance. Use a route that supports audio assets. The three native dedicated endpoints do not currently accept reference audio fields.

Example:

"reference_material"

images
string[]

Unified multi-image entry point. Used by Vidu, Seedance, Veo, etc.

content
object[]

The Seedance format can also invoke Kling 4.0. Use text for text, and image_url/video_url/audio_url objects for images, videos, and audio. The image role can be first_frame, last_frame, or reference_image; use reference_video for video and reference_audio for audio. Reference audio must use an all-in-one reference route that supports this capability. Do not infer that all routes accept audio input merely because they output audio tracks. Use mode to distinguish generation scenarios.

contents
object[]

Legacy envelope compatibility field for Kling 4.0; not required for standard OpenAI/Sora and Seedance requests.

Minimum array length: 1
settings
object

Legacy envelope compatibility settings; for the standard format, use seconds/size or duration/resolution/ratio directly.

options
object

Legacy envelope compatibility field; not required for the standard format.

size
string

Unified size input, which maps to resolution/aspect_ratio and related fields.

seconds
string

Sora compatibility entry point; at runtime, it falls back to duration.

input_reference
string

Sora/Veo compatible reference image input, can be a multipart file or a compatible object.

parameters
object
audio_urls
string<uri>[]

List of reference audio URLs for standard OpenAI/Sora and Seedance; used only for All-in-One Reference routes that support audio references, and differs from the switch for generating an output audio track.

resolution
string

Output resolution, common values 540p, 720p, and 1080p.

Response

Video task created successfully

id
string
required
object
string
required
model
string
required
status
enum<string>
required

Should use VideoStatus constants: VideoStatusQueued, VideoStatusInProgress, VideoStatusCompleted, VideoStatusFailed

Available options:
queued,
in_progress,
completed,
failed,
video_url,
url,
completed_at
progress
integer
required
created_at
integer
required
task_id
string

Legacy compatibility; to be deprecated

completed_at
integer
expires_at
integer
seconds
string
size
string
remixed_from_video_id
string
error
object
metadata
object
output
object
request_id
string