Postato Docs
MCP ToolsTools

Upload Media

Upload media for use in posts. Two modes: 1. URL mode: provide a public URL — file is downloaded and stored. Best for images/videos from AI generators (DALL-E,

upload_media

Upload media for use in posts. Two modes:

  1. URL mode: provide a public URL — file is downloaded and stored. Best for images/videos from AI generators (DALL-E, Runway, etc).
  2. Base64 mode: provide base64-encoded data + mimeType — decoded and stored. Best for small generated images (<10MB). Returns a media ID (med_...) to pass in publish_post media array. Supported types: image/, video/, application/pdf.

Parameters

ParameterTypeRequiredDescription
urlstringnoPublic URL to download media from. The file will be downloaded and stored in our CDN.
base64stringnoBase64-encoded file content. Use for small files only (<10MB). Requires mimeType.
mimeTypestringnoMIME type of the file (e.g. "image/png", "video/mp4"). Required when using base64.
filenamestringnoOriginal filename for reference.
workspaceIdstringnoWorkspace ID. Required if your API key accesses multiple workspaces.

When to use

Inline upload path: encode the file as base64 and send it in the tool call. Use this for small files (≤ 5 MB) where the convenience of "one call" outweighs the bandwidth overhead of base64 (~33% larger than raw).

For anything bigger, use create_upload_url — it's faster, cheaper, and doesn't hit JSON payload size limits.

Example

{
  "workspaceId": "wks_01H...",
  "filename": "avatar.png",
  "mimeType": "image/png",
  "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAA..."
}

data is base64-encoded without the data:image/png;base64, prefix.

Response

{
  "id": "med_01H...",
  "type": "image",
  "mimeType": "image/png",
  "status": "uploaded",
  "url": "https://..."
}

Use id in a subsequent publish_post call.

Gotchas

  • Agents have token budgets — a single 5 MB base64 blob is ~7 MB of input tokens. Measure before committing to this path at scale.
  • The returned url is a Postato-hosted URL. Do not expose it to end users directly; it's for the publishing pipeline.
  • Content-type sniffing: if the mimeType disagrees with the actual bytes, publishing to the target network may reject the media with a confusing error. Trust the source.

On this page