Skip to main content
GET
TypeScript

Autorisationer

Authorization
string
header
påkrævet

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:read

Sti-parametre

id
string
påkrævet

Media asset ID, prefixed media_.

Svar

Media asset retrieved.

amount_charged
number | null
påkrævet

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

Eksempel:

2.5

completed_at
string | null
påkrævet

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

Eksempel:

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

created_at
string
påkrævet

ISO 8601 timestamp when the generation was requested.

Eksempel:

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

currency
string
påkrævet

Currency of amount_charged. Always usd.

Eksempel:

"usd"

error_message
string | null
påkrævet

Why generation failed. null unless status is failed.

Eksempel:

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

file
object | null
påkrævet

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

generation
object
påkrævet

The inputs the asset was generated from.

id
string
påkrævet

Media asset ID, prefixed media_.

Eksempel:

"media_xxxxxxxxxxxxxx"

media_type
enum<string>
påkrævet

The kind of media this asset holds.

Tilgængelige muligheder:
video,
image
Eksempel:

"video"

source
enum<string>
påkrævet

How the asset was created. Always generated.

Tilgængelige muligheder:
generated
Eksempel:

"generated"

status
enum<string>
påkrævet

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

Tilgængelige muligheder:
processing,
ready,
failed
Eksempel:

"ready"