Upload a file to the library
upload_mediaOn one site of the account, named in site. Put a picture into the library before a post shows it. Give the picture's own public address, or base64 with a filename and content type. A web page address gives the page's own picture (og:image), when it has one. Pictures, films, sound and PDF; up to 64 MB. For a file that you hold — one the person gave you, or one you made — use request_upload. Answers the library address and the Markdown to paste (), for create_post, replace_post and edit_post, a cover (set_feature_image) or a block.
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": {
"site": "<site>"
},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | What the picture shows, for the Markdown in the answer | |
| url | No | The picture's own public http(s) address | |
| site | Yes | The site to work on, as list_sites names it | |
| base64 | No | The file's bytes, base64 | |
| filename | No | With base64: the file's name | |
| content_type | No | With base64: the MIME type |