Common capabilitiesUploads

Uploads

Voice references, emotion references, reference images, reference videos and other media must be uploaded before audio, image and video generation requests can reference them. Text models do not use uploads.

An upload takes three steps: request an upload URL, upload the file and confirm completion.

1. Request an upload URL

Call POST /v1/uploads with filename, content_type and the actual file size size_bytes, and set purpose to the intended use:

purposeUseFormat and size
voice_referenceVoice reference used as the voice for speech synthesisWAV, up to 20 MiB
emotion_referenceEmotion reference for indextts-2 emotion controlWAV, up to 20 MiB
audio_materialSound effect or music in an audio compositionWAV or MP3, up to 100 MiB
image_referenceReference image for image-to-imagePNG, JPEG or WebP, up to 20 MiB
video_imageReference image or first/last frame for video generationPNG, JPEG or WebP, up to 20 MiB
video_clipReference video for video generationMP4, up to 50 MiB
video_audioReference audio for video generationWAV or MP3, up to 15 MiB

Always send the purpose that matches the actual use; generation endpoints check it when they reference the asset. The filename extension must match content_type.

Make sure you have permission before uploading someone else's voice or likeness. You can send rights_confirmed: true to record your confirmation.

2. Upload the file

Send the raw file content with PUT to upload_url from the response, including every header in the response headers unchanged. The upload URL is valid for 300 seconds. Do not send your API Key to the upload URL.

curl -X PUT "$UPLOAD_URL" \
  -H 'Content-Type: audio/wav' \
  --data-binary '@voice.wav'

3. Confirm the upload

After the upload succeeds, call POST /v1/uploads/{asset_id}/complete. The service checks the file size and format, and only confirmed assets can be used for generation. Confirm within one hour of requesting the URL; unconfirmed uploads are removed after that.

Once confirmed, reference the asset by asset_id in generation requests. For example, use a voice reference as voice_asset_id in speech synthesis, an emotion reference as emo_asset_id, and a reference image in reference_asset_ids for image generation.

Upload allowance

  • All API Keys and the console of one account share the upload allowance: up to 30 upload requests per minute and up to 500 MiB in any rolling 24-hour period. There is no daily limit on the number of uploads.
  • size_bytes counts toward the 24-hour allowance as soon as the upload URL is issued. Failed uploads and deleted assets do not give it back; the allowance recovers as the window moves on.
  • Saving a designed voice does not use the upload allowance.

When the allowance is exceeded, the API returns 429 with the error code UPLOAD_RATE_LIMITED (too many requests) or UPLOAD_QUOTA_EXCEEDED (too many bytes). The quota object in the response contains the limit type kind, the limit limit, the amount used used and the amount requested requested. When a recovery time can be estimated, quota.retry_at gives it as an RFC 3339 timestamp and the Retry-After header gives the seconds to wait. Retry after that time rather than retrying in a loop.

On this page