Upload an image
upload_mediaUpload an image, with alt text and a title per locale, into the "AI uploads" folder. Up to 3 MB. Locale codes must be ones the website has (see list_scopes). PNG and JPEG images are converted to WebP: the answer then gives convertedFrom with the type you sent. Returns the image's id, to use in image fields, with its address and text.
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": {
"filename": "<filename>",
"mimeType": "<mimeType>",
"dataBase64": "<dataBase64>",
"alt": "<alt>"
},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | Yes | Alt text by locale code, such as {"de-DE": "…"}: what the image shows, for people who can't see it. | |
| title | No | Title by locale code, such as {"de-DE": "…"}. | |
| filename | Yes | The file name to show in the media library, such as lofoten-ridge.jpg. | |
| mimeType | Yes | The image's type. | |
| dataBase64 | Yes | The image file, base64 encoded, at most 3 MB before encoding. |