Init media upload
init_media_uploadStarts a direct upload of a local file and returns a pre-signed upload URL valid for one hour. Send the raw file bytes with an HTTP PUT request to upload_url including the upload_headers, then call complete_media_upload with the media_id. Supported extensions: jpg, jpeg, png, gif, webp, heic, avif, pdf, srt, mp4, mov, mpeg, webm, avi, mp3. Maximum size 5 GB. For a file that already has a public URL use upload_media_from_url instead.
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": {
"file_name": "<file_name>",
"size": "<size>"
},
"name": "init_media_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | Exact file size in bytes, it is checked against the uploaded file. | |
| file_name | Yes | File name with extension, e.g. photo.jpg. |