Get a link to upload a file
media_upload_linkA one-time link that takes one picture or video (PNG, JPEG, WebP or MP4), for a file you made or hold where sending it whole in media_upload is not practical, such as a picture drawn in your own sandbox. Send the bytes to url with PUT and its Content-Type, no sign-in needed; the answer is its media id. Where you cannot reach the web, give the user the file and the link: they open it, pick the file and press Upload; then media_list has it under the name you gave the link. One file per link; it ends after an hour. Nothing is posted. Make a picture a JPEG: every network that takes pictures accepts JPEG, while Instagram refuses PNG and WebP (capabilities lists each network’s mediaTypes).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "media_upload_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | What the picture shows, for people who cannot see it. Kept with the file. | |
| name | No | A file name for the user’s own list. Taken from the file when left out. | |
| brandId | No | The brand this is for, by its id from brands_list. Needed when the login has more than one brand; with one brand it can be left out. |