Skip to main content
GET
TypeScript

Autorisaties

Authorization
string
header
vereist

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

Padparameters

id
string
vereist

Media asset ID, prefixed media_.

Respons

Media asset retrieved.

amount_charged
number | null
vereist

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

Voorbeeld:

2.5

completed_at
string | null
vereist

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

Voorbeeld:

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

created_at
string
vereist

ISO 8601 timestamp when the generation was requested.

Voorbeeld:

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

currency
string
vereist

Currency of amount_charged. Always usd.

Voorbeeld:

"usd"

error_message
string | null
vereist

Why generation failed. null unless status is failed.

Voorbeeld:

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

file
object | null
vereist

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

generation
object
vereist

The inputs the asset was generated from.

id
string
vereist

Media asset ID, prefixed media_.

Voorbeeld:

"media_xxxxxxxxxxxxxx"

media_type
enum<string>
vereist

The kind of media this asset holds.

Beschikbare opties:
video,
image
Voorbeeld:

"video"

source
enum<string>
vereist

How the asset was created. Always generated.

Beschikbare opties:
generated
Voorbeeld:

"generated"

status
enum<string>
vereist

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

Beschikbare opties:
processing,
ready,
failed
Voorbeeld:

"ready"