POST
Create a video

Authorizations

Authorization
string
header
required

Provide your API key in the Authorization header using Bearer auth

Headers

Idempotency-Key
string

Idempotency key (up to 255 characters): the same key is accepted once per project; repeated submissions return the existing generation

Body

application/json

Video generation request: common fields at the top level, media in input, platform parameters in generation_config

model
string
required

Model ID (author/model), see GET /v1/models?type=video

Minimum string length: 1
Example:

"bytedance/seedance-2.0-mini"

prompt
string
required

Prompt

Maximum string length: 10000
Example:

"aerial shot of a futuristic city at dusk"

duration
integer<int32>

Duration in seconds; allowed values are in the model's generation_config.duration; defaults to the model's default

Required range: x >= 1
Example:

5

resolution
string

Resolution tier: 480p / 720p / 1080p / 4k …, affects price; defaults to the model's default

Example:

"720p"

aspect_ratio
string

Aspect ratio: 16:9 / 9:16 / 1:1 …; defaults to the model's default

Example:

"16:9"

input
object

Input media. Images take either image_url (https URL or data URL) or file_id; videos and audio take https URLs only

generation_config
object

Platform-wide video parameters; see generation_config in GET /v1/models/{model} for what each model supports

metadata
object

Custom key-value pairs returned as-is (up to 16)

Response

OK

Billing record of one call

id
string

Public ID, also the billing ID

Example:

"chatcmpl-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"

object
string

Object type, same as the original response

Example:

"chat.completion"

model
string

Canonical model ID

Example:

"deepseek/deepseek-v4.1-flash"

status
enum<string>

Status: queued / in_progress / completed / failed / cancelled

Available options:
queued,
in_progress,
completed,
failed,
cancelled
Example:

"completed"

created_at
integer<int64>

Creation time (Unix seconds)

completed_at
integer<int64>

Completion time (Unix seconds); null while running

cancel_requested_at
integer<int64>

When cancellation was requested (Unix seconds); null if never requested. A generation already sent upstream follows the upstream outcome after cancellation is requested

latency_ms
integer<int64>

Total latency (ms)

api_key
object

API key reference

project_id
string

Project ID (proj_ prefix)

usage
object

Usage and cost (shape depends on the call type: text or image); null when failed or not charged

billing_status
enum<string>

Billing status: estimated / settled / refunded / adjusted

Available options:
estimated,
settled,
refunded,
adjusted
Example:

"settled"

adjustments
object[]

Refunds, extra charges and compensations

net_cost
number

Net cost (USD) = cost + sum of adjustments

Example:

0.0000081

estimated_cost
number

Estimated cost (USD): while the generation is still queued or running, the amount held for it (from the quote); omitted once finished

Example:

0.08

currency
string

Currency

Example:

"USD"

error_code
string

Error code when failed

metadata
object

Metadata passed with the call

output
object

Outputs of an asynchronous task, grouped by kind

data
object[]

Generated images (image calls); links are re-signed on every query

line_items
object[]

Cost breakdown of a workflow: each sub-call and each workflow fee (only for run_ and wfc_ IDs)