Skip to main content
Glama

upload_media

Upload images or videos to X (Twitter) by providing base64-encoded data, returning a media ID for attaching to posts. Supports formats like PNG, JPEG, and MP4 with specified MIME types.

Instructions

Upload an image or video to X. Returns a media_id that can be attached to posts. Provide the file as base64-encoded data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
media_dataYesBase64-encoded media file data
mime_typeYesMIME type (e.g. 'image/png', 'image/jpeg', 'video/mp4')
media_categoryNoCategory: 'tweet_image', 'tweet_gif', or 'tweet_video' (default: tweet_image)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Infatoshi/x-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server