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
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"}application/json- body
content_type*Content TypeMIME 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*FilenameFile name. Its extension must match content_type.
length <= 255display_name?Display Namelength <= 80purpose?PurposeAsset 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.
^(input|api_input|voice_reference|emotion_reference|audio_material|image_reference|video_image|video_clip|video_audio)$"input"rights_confirmed?Rights ConfirmedConfirms that you have permission to use the works, likenesses and voices in the asset. When true, the confirmation time is recorded.
falsesize_bytes*Size BytesActual 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.
1 <= value <= 104857600Request succeeded
application/json- response
asset_id*Asset Iddelete_after*|When an unconfirmed upload will be deleted.
expires_in*Expires InLifetime of the upload URL in seconds (300). Confirm the upload within one hour of the request.
upload_url*Upload Urlheaders*Every header to send unchanged with the PUT upload. Content-Length is the declared size; browsers set it automatically.