latestOpenAPI 3.1.12026-08-22330162.7 KB
35448566f143
Uploads
Upload a media file
Gets a media file into your AITuber library and returns an assetId you can pass to other endpoints. Every upload has a purpose that says what the file is for; the purpose decides the validation rules and where the asset can be used.
Two ways to upload:
1. From a URL (easiest, works from AI agents): pass sourceUrl and we download the file for you. Only available for small image purposes (not video).
2. Direct upload (for local files): pass contentType and fileSizeBytes and you get back an uploadUrl. PUT your file bytes to that URL within 1 hour (set the same Content-Type header), then use the assetId.
Supported purposes:
- clip-reference-image, clip-reference-video, clip-reference-audio: input files for standalone clip generation. Images allow JPEG, PNG, or WebP up to 25MB. Videos allow MP4, MOV, or WebM up to 200MB. Audio allows MP3, WAV, M4A, AAC, OGG, or WebM up to 50MB. Direct upload only.
- element-image: a reference photo for an element (a person, product, or place). JPEG, PNG, or WebP, max 25MB. URL upload allowed. Use the assetId in POST /elements.
- ugc-demo: a product demo video for a UGC hook video. MP4, MOV, or WebM, max 200MB, up to 3 minutes. Direct upload only. Use the assetId as demoVideoAssetId in POST /ugc/videos.
- music: an audio track to score a music video. MP3, WAV, M4A, or AAC, max 50MB. Direct upload only, and durationSeconds is REQUIRED. Use the assetId as musicAssetId in POST /music-videos.
- voice-sample: an audio sample for voice cloning. MP3, WAV, M4A, AAC, OGG, or WebM, max 11MB. Direct upload only. Pass the assetId to the voice clone endpoint.
Uploads that are never attached to anything are deleted after 7 days.
post/uploads
Request body
Response
OK