Upload Media
upload_mediaUpload one image into your Switch library in a single call. Pass url (any public https) OR base64 + mime. Switch fetches/decodes it server-side, stores it, and returns a clean public URL plus the new asset id. This is THE way to use a photo the user attached in chat as a reference: pass the returned url directly into generate_image's reference_image_urls, OR into generate_video's image_url (image-to-video) or reference_image_urls (reference / omni video). The returned URL is provider-fetchable as-is — no presigned PUT, no curl, no confirm-upload step. Do NOT call get_my_active_references for a chat-attached photo; that strip only holds Studio-managed refs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Any public https URL — Switch fetches it server-side. | |
| mime | No | MIME type when sending base64. Default image/png. | |
| base64 | No | Base64-encoded image bytes (use this when there is no public URL). |