POST /create-asset

Changed on

Upload an image or audio asset. Audio is normalized to headerless mono PCM16 at 24 kHz and can be referenced by custom_on_hold_music_asset_id on warm and agentic-warm transfer options. Accepted audio formats are MP3, WAV, WebM, OGG, M4A, AAC, and FLAC. The maximum upload size is 10 MB and audio duration is limited to 210 seconds.

Request

  • Base URL
    https://api.retellai.com
  • Auth
    HTTP bearer

Request body multipart/form-data

filestring binary required

Image or audio file to upload. Images support PNG, JPEG, GIF, WebP, and SVG. Audio supports MP3, WAV, WebM, OGG, M4A, AAC, and FLAC. Maximum size is 10 MB; audio is limited to 210 seconds.

Response

Successfully created asset.

asset_idstring

Unique identifier for the asset.

file_namestring

Stored file name. Uploaded audio is normalized to headerless PCM and uses a .pcm extension.

content_typestring

MIME type of the asset.

file_sizenumber

File size in bytes.

urlstring

CDN URL to access the asset.

created_timestampnumber

Unix timestamp of when the asset was created.

Example response

{
  "asset_id": "asset_abc123def456",
  "file_name": "screenshot.png",
  "content_type": "image/png",
  "file_size": 204800,
  "url": "https://cdn.example.com/asset/org_123/asset_abc123def456/screenshot.png",
  "created_timestamp": 1710000000000
}

Changes