v8

OpenAPI 3.1.02026-08-033623795.0 MB
Media

Retrieve Media Asset

Retrieves a media asset by ID. Poll this while the asset is processing.

get/media/{id}

Path parameters

idstring required

Media asset ID, prefixed media_.

Response

Media asset retrieved.

amount_chargednumber nullable required

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

completed_atstring nullable required

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

created_atstring required

ISO 8601 timestamp when the generation was requested.

currencystring required

Currency of amount_charged. Always usd.

error_messagestring nullable required

Why generation failed. null unless status is failed.

idstring required

Media asset ID, prefixed media_.

media_type'video' | 'image' required

The kind of media this asset holds.

source'generated' required

How the asset was created. Always generated.

status'processing' | 'ready' | 'failed' required

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

Example response

{
  "generation": {
    "resolution": "480p"
  },
  "media_type": "video",
  "source": "generated",
  "status": "processing"
}