Skip to main content
POST
TypeScript

인증

Authorization
string
header
필수

An Account API key, an App API key, an account access token, an account-scoped user token, or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

Scopes

media:generate

헤더

Idempotency-Key
string

A unique key that makes this request safe to retry. See Idempotent requests.

Maximum string length: 255
예시:

"d9105228-4a08-46b1-8b91-42fed586d383"

본문

application/json
prompt
string
필수

What to generate. Up to 2,000 characters.

예시:

"A 9:16 product showcase of a cordless power scrubber"

type
enum<string>
필수

The kind of media to generate.

사용 가능한 옵션:
video,
image
예시:

"video"

account_id
string

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

예시:

"biz_xxxxxxxxxxxxxx"

duration_seconds
enum<integer>

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

사용 가능한 옵션:
5,
10,
15
예시:

5

reference_media
string[]

Optional reference file IDs (file_ prefixed), up to 4. Images guide the output: for video, a single image seeds the opening frame; multiple images guide subject and style instead. Include one video to remake it: its motion and scene are kept and the images are swapped in. Video only; needs an image and can't be combined with duration_seconds. The output matches the video's length, up to 30 seconds, and is billed on it.

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.

사용 가능한 옵션:
480p,
720p,
1080p,
4k
예시:

"1080p"

응답

Generation started.

amount_charged
number | null
필수

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

예시:

2.5

completed_at
string | null
필수

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

예시:

"2026-01-01T12:00:00.000Z"

created_at
string
필수

ISO 8601 timestamp when the generation was requested.

예시:

"2026-01-01T12:00:00.000Z"

currency
string
필수

Currency of amount_charged. Always usd.

예시:

"usd"

error_message
string | null
필수

Why generation failed. null unless status is failed.

예시:

"The generation provider rejected the prompt. The charge was refunded."

file
object | null
필수

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

generation
object
필수

The inputs the asset was generated from.

id
string
필수

Media asset ID, prefixed media_.

예시:

"media_xxxxxxxxxxxxxx"

media_type
enum<string>
필수

The kind of media this asset holds.

사용 가능한 옵션:
video,
image
예시:

"video"

source
enum<string>
필수

How the asset was created. Always generated.

사용 가능한 옵션:
generated
예시:

"generated"

status
enum<string>
필수

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

사용 가능한 옵션:
processing,
ready,
failed
예시:

"ready"