Upload an image
upload_imageUpload an image Subo hosts, for any image field. Returns the url Subo hosts the image at; put that in image_url or thumbnail_url of a block, or the invitation image. Two ways in. A link: pass url and Subo downloads it (public https only; KLIPY links are refused, put a KLIPY GIF's link in the field as it is). A link that will last needs no upload at all, but one that expires (a Discord attachment link stops working in a day) does. A file on the person's computer: pass filename and you get a one-time upload_url (15 minutes); send the file there with curl -T <file> "<upload_url>", and that reply carries the hosted url. Use the person's own image this way rather than skip it. PNG, JPEG, GIF or WebP, within the community's plan size limit (too_large names the limit).
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": "upload_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | An https link to a PNG, JPEG, GIF or WebP image on the public internet. Subo downloads it and hosts its own copy. | |
| filename | No | The name of an image file on the person's computer. Returns a one-time `upload_url` to PUT the file to (`curl -T <file> "<upload_url>"`). Send `url` or `filename`, not both. |