Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Body

application/json
prompt
string
required

What to generate. Up to 2,000 characters.

type
enum<string>
required

The kind of media to generate.

Available options:
video,
image
account_id
string

Account ID, prefixed biz_. Defaults to the account the API key belongs to.

duration_seconds
enum<integer>

Video length in seconds. Video only; defaults to 5.

Available options:
5,
10,
15
reference_media
string[]

Optional reference image file IDs (file_ prefixed), up to 4. For video, a single reference seeds the opening frame; multiple references guide subject and style instead.

resolution
enum<string>

Video resolution. Video only; defaults to 1080p. 1080p is not supported by Seedance 2.0 Fast or Mini; 4k is only supported by Seedance 2.0.

Available options:
480p,
720p,
1080p,
4k

Response

Generation started.

amount_charged
number | null
required

USD amount charged to the account's balance for this generation. null if the generation wasn't billed.

completed_at
string | null
required

ISO 8601 timestamp when the asset reached a terminal state. null while processing.

created_at
string
required

ISO 8601 timestamp when the generation was requested.

currency
string
required

Currency of amount_charged. Always usd.

error_message
string | null
required

Why generation failed. null unless status is failed.

file
object | null
required

The produced file, usable anywhere attachments are accepted. null until the asset is ready.

generation
object
required

The inputs the asset was generated from.

id
string
required

Media asset ID, prefixed media_.

media_type
enum<string>
required

The kind of media this asset holds.

Available options:
video,
image
Example:

"video"

source
enum<string>
required

How the asset was created. Always generated.

Available options:
generated
Example:

"generated"

status
enum<string>
required

Lifecycle state: processing while generation runs, ready when the file is available, failed when generation failed and the charge was refunded.

Available options:
processing,
ready,
failed
Example:

"processing"