Common capabilitiesAPI referenceUploadsRequest an upload URL

Request an upload URL

Request an upload URL, valid for 300 seconds. Send the returned headers unchanged with the upload, then call the confirmation endpoint. Each account can make up to 30 requests per minute and upload up to 500 MiB in any rolling 24 hours; beyond that the API returns 429, which may include quota details.

Authentication

API Key: X-API-Key: <API Key> or Authorization: Bearer <API Key>.

Credentials in the examples are placeholders. Replace them and run the examples on your server.

Code examples

curl -X POST 'https://shixux.com/api/v1/uploads' \  -H 'X-API-Key: yb_xxx_yyy' \  -H 'Content-Type: application/json' \  -d '{"filename":"voice.wav","content_type":"audio/wav","size_bytes":1048576,"purpose":"voice_reference","rights_confirmed":true}'
{  "upload_url": "example",  "expires_in": 1,  "asset_id": "example",  "headers": {},  "delete_after": "2026-10-06T10:00:00Z"}

Request Body

application/json
  1. body
content_type*Content Type

MIME type of the file, matching its extension. WAV, MP3, FLAC, M4A, OGG, PNG, JPEG, WebP and MP4 are supported, depending on purpose. Voice and emotion references must be audio/wav.

filename*Filename

File name. Its extension must match content_type.

Lengthlength <= 255
display_name?Display Name
Lengthlength <= 80
purpose?Purpose

Asset purpose: voice_reference (voice reference), emotion_reference (emotion reference), audio_material (sound effect or music for audio composition), image_reference (reference image for image to image), or video_image, video_clip and video_audio (reference image, video and audio for video generation). Generation endpoints check the purpose when they reference the asset.

Match^(input|api_input|voice_reference|emotion_reference|audio_material|image_reference|video_image|video_clip|video_audio)$
Default"input"
rights_confirmed?Rights Confirmed

Confirms that you have permission to use the works, likenesses and voices in the asset. When true, the confirmation time is recorded.

Defaultfalse
size_bytes*Size Bytes

Actual file size in bytes. Voice references, emotion references and images: up to 20 MiB; reference videos: up to 50 MiB; video reference audio: up to 15 MiB; other audio: up to 100 MiB.

Range1 <= value <= 104857600

Response Body

Request succeeded

application/json
  1. response
asset_id*Asset Id
delete_after*|

When an unconfirmed upload will be deleted.

expires_in*Expires In

Lifetime of the upload URL in seconds (300). Confirm the upload within one hour of the request.

upload_url*Upload Url
headers*

Every header to send unchanged with the PUT upload. Content-Length is the declared size; browsers set it automatically.

On this page