media tools (scope: mcp:read, credits: ~0)
Upload media to persistent R2 storage.
Upload media to persistent R2 storage. Returns a durable r2_key that can be passed to schedule_post. Three input modes: (1) local file path (stdio mode only), (2) public URL fetched by the server, (3) inline base64 via file_data (remote agents, ≤10MB decoded). AGENT ROUTING GUIDE: If the media was produced by another tool here (generate_image, generate_video, create_carousel, etc.), use the returned job_id or r2_key directly with schedule_post — do NOT download and re-upload. For user-authored files larger than ~1MB, prefer request_upload_session (returns a tokenized Dashboard URL the user uploads through in their browser) so bytes never flow through the agent context. Reserve file_data for small assets (thumbnails, logos, short clips).
Upload media to persistent R2 storage. › Request Body
sourceLocal file path (e.g. "/Users/me/image.png") or public URL (e.g. "https://example.com/photo.jpg"). ' + 'Leave empty when passing file_data instead.
file_dataBase64-encoded file bytes, with or without a "data:
file_nameOptional filename for the upload (e.g. "hero.png"). Path components are stripped — ' + 'only the basename is used.
content_typeMIME type (e.g. "image/png", "video/mp4"). Auto-detected from file extension for ' + 'paths/URLs, or from the data: prefix on file_data. Required when passing raw ' + 'base64 with no prefix.
project_idProject ID for R2 path organization.
response_formatResponse format. Default: text.
Upload media to persistent R2 storage. › Responses
Successful tool execution.
Get a fresh signed URL for an R2 media key.
Get a fresh signed URL for an R2 media key. Use when a previously returned signed URL has expired (they last 1 hour). Pass the r2_key from upload_media or check_status.
Get a fresh signed URL for an R2 media key. › Request Body
r2_keyThe R2 object key (e.g. "org_x/user_y/images/2026-04-03/abc.png").
response_formatResponse format. Default: text.
Get a fresh signed URL for an R2 media key. › Responses
Successful tool execution.