Skip to main content
GET
TypeScript

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

Media asset ID, prefixed media_.

Réponse

Media asset retrieved.

amount_charged
number | null
requis

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

Exemple:

2.5

completed_at
string | null
requis

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

Exemple:

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

created_at
string
requis

ISO 8601 timestamp when the generation was requested.

Exemple:

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

currency
string
requis

Currency of amount_charged. Always usd.

Exemple:

"usd"

error_message
string | null
requis

Why generation failed. null unless status is failed.

Exemple:

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

file
object | null
requis

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

generation
object
requis

The inputs the asset was generated from.

id
string
requis

Media asset ID, prefixed media_.

Exemple:

"media_xxxxxxxxxxxxxx"

media_type
enum<string>
requis

The kind of media this asset holds.

Options disponibles:
video,
image
Exemple:

"video"

source
enum<string>
requis

How the asset was created. Always generated.

Options disponibles:
generated
Exemple:

"generated"

status
enum<string>
requis

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

Options disponibles:
processing,
ready,
failed
Exemple:

"ready"