Upload media (URL or base64)
upload_mediaAdd an image or video to the API key's workspace media library. Returns id and url — pass the url in mediaUrls of create_post. Two modes, exactly one per call: url (direct http(s) link to the file; up to 3 redirects followed; Google Drive "anyone with the link" file links are converted automatically, other share pages such as Dropbox/WeTransfer and large Drive files with a virus-scan page are NOT supported — use create_upload_link or contentBase64 for those) or contentBase64 + mimeType (+ filename) for a file you generated yourself — one file per call (call it once per slide, e.g. 8 calls for an 8-slide carousel), JPEG/PNG/WebP/GIF/MP4/MOV, up to 10 MB decoded; prefer small/compressed files since base64 costs output tokens and hand-copied base64 of large files is error-prone: with shell access use create_upload_link + curl instead. Truncated or checksum-mismatched base64 is rejected with a clear error. Files above the size limit, wrong or mismatched types, private/localhost URLs and a full storage quota are rejected with a clear error. Needs the MEDIA_WRITE scope. If the user wants a post with an image/video but gave no URL or media id, ask first which they prefer: (a) a public link, (a2) a file the AI itself produced: upload_media with contentBase64 (one file per call, up to 10 MB, no manual step), (b) upload via a Flomixy upload link (create_upload_link; with shell access curl the returned uploadEndpoint, no base64), (c) pick from the media library (list_media), (d) a stock photo (search_stock_photos, images only), (e) generate with AI: generate_image (images only, monthly quota), (f) no media, only if the network allows it (see get_channel_capabilities). If media is already provided, do not ask.
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_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Direct http(s) link to a JPEG, PNG, WebP, GIF, MP4 or MOV file (up to 3 redirects are followed). Google Drive file links shared with "anyone with the link" are auto-converted; Dropbox/WeTransfer share pages are not supported. Use this OR contentBase64. | |
| sha256 | No | Optional hex SHA-256 of the file bytes, used with contentBase64; a mismatch returns "checksum mismatch" instead of a generic corrupted-image error. | |
| filename | No | Optional original file name, e.g. slide-1.png (used with contentBase64). | |
| mimeType | No | Required with contentBase64. One of: image/jpeg, image/png, image/webp, image/gif, video/mp4, video/quicktime. | |
| contentBase64 | No | Base64 of the file bytes (no data: prefix needed), up to 10 MB decoded. Use this OR url. |