Create media upload URL
create_upload_urlGet a PUT URL to attach a local media file to a draft post. The response includes max_size_bytes, enforced while uploading for every file and plan. With size_bytes, an oversized file is refused before uploading, and a body of any other size is refused instead of checked as a whole file. The file's bytes go up with the headers in the response, as its note shows; the file is checked as it arrives, and the reply gives the size and sha256 stored. Refused once the post or its chain is scheduled, because the user has approved its media; canceling the post allows more.
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": {
"post_id": "<post_id>",
"mime": "<mime>"
},
"name": "create_upload_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | Yes | media mime type, e.g. image/png or video/mp4 | |
| post_id | Yes | draft post to attach the media to | |
| alt_text | No | accessibility description | |
| size_bytes | No | the file's size in bytes, when known: refuses an oversized file now, and any upload of another size later |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| headers | Yes | ||
| media_id | Yes | ||
| upload_url | Yes | ||
| max_size_bytes | Yes | ||
| expires_in_seconds | Yes |