Home / Servers / X (Twitter) API / media_upload
Upload Media
An MCP tool from the X (Twitter) API server, hosted on mcp.hjlabs.in.
Upload Media Uploads a media file for use in posts, direct messages, or ads. The response carries the media identifiers, including the media_key used to reference the asset in later calls. The media field… [POST /2/media/upload]
Name on the gateway: x_api__media_upload · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
additional_owners | string | Comma-separated list of user IDs who can use this media. |
media required | string | The media file to upload: base64-encoded in JSON bodies, raw bytes in… |
media_category required | tweet_image | tweet_video | tweet_gif | dm_image | dm_video | dm_gif | subtitles | The category of the media being uploaded. |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "x_api__media_upload",
"arguments": {
"media": "…",
"media_category": "…"
}
}Or connect the X (Twitter) API server directly, which lists 258 tools including this one:
claude mcp add --transport http hj-x-api https://mcp.hjlabs.in/mcp/x-api \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the upload media tool with additional_owners set to ….