Upload a file from this machine
upload_mediaUpload media for use in generation. Returns presigned URLs for clients that can upload bytes themselves; run the returned curl_template or POST the upload.fields form to upload.url, then call confirm_upload. Default path for user-attached image/video/audio whose bytes your code environment can read (e.g. /mnt/user-data/uploads in Claude): call this, run the curl_template with curl, then confirm_upload — do not ask the user to re-upload. Fall back to upload_media_widget only when the file is unreadable or the POST fails.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"content_type": "<content_type>",
"bytes": "<bytes>"
},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | Yes | The file's real size in bytes, read off disk: signed as the upload's hard limit. | |
| file_name | No | Single filename for upload | |
| content_type | Yes | MIME type for single file upload, e.g. 'image/jpeg', 'image/png', or 'video/mp4'. |