Upload Reference
upload_reference_assetUpload an image, video, or audio reference into Switch cloud and get an opaque asset_id (never a raw storage URL) to pass in reference fields. Pass kind=image|video|audio. Returns reference_image_urls / reference_video_urls / reference_audio_urls for generate_image and generate_video. Image references are also added to your active Studio reference strip (the same one your desktop uses) unless activate=false; the strip is PHOTOS ONLY — video and audio never touch it. PREFERRED for real files: call with presign=true to get an upload_url, PUT the bytes straight to it (no base64 through the model), then call again with confirm_path to verify and add it — works for image, video, and audio. base64/url is only for tiny inline files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public https URL to fetch server-side. | |
| kind | Yes | Reference type to upload. | |
| mime | No | MIME for base64. Images: jpg/png/webp/gif. Videos: mp4/mov. Audio: mp3/wav/m4a/aac. | |
| base64 | No | Base64 bytes (optionally a data: URL). Best for small files; large video should use presign. | |
| presign | No | Return an upload_url to PUT the file bytes directly to (no base64). Video always; image/audio when enabled. | |
| activate | No | Image only: add to the active Studio reference strip. Default true. The strip is photos only — video and audio never touch it regardless of this flag. | |
| filename | No | Optional source filename for extension/display. | |
| frame_type | No | Image strip label: ref (default), face, body, clothes, scenery, product, typography. Use "face" for a person's face/likeness — face uploads are stored as untouched originals in the private reference bucket and their returned asset_id is the ONLY handle face-capable generation accepts (KYC-verified accounts only). | |
| confirm_path | No | The storage_path from a presign call, after you PUT the file — verifies the object, records it, and adds it to your strip. |