Home / Servers / X (Twitter) API / initialize_media_upload

Initialize Media Upload

An MCP tool from the X (Twitter) API server, hosted on mcp.hjlabs.in.

Initialize Media Upload Initializes a media upload. [POST /2/media/upload/initialize]

Name on the gateway: x_api__initialize_media_upload · may change things.

Parameters

NameTypeDescription
additional_ownersarrayUser ids granted access to the uploaded media.
media_categoryamplify_video | tweet_gif | tweet_image | tweet_video | dm_gif | dm_image | dm_video | subtitlesThe media category of the upload.
media_typevideo/mp4 | video/webm | video/mp2t | video/quicktime | text/srt | text/vtt | image/jpeg | image/gif | image/bmp | image/png | image/webp | image/pjpeg | image/tiff | model/gltf-binary | model/vnd.usdz+zipThe type of media.
sharedbooleanWhether this media is shared or not.
total_bytesintegerThe total size of the media upload in bytes.

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:

call_tool arguments
{
  "name": "x_api__initialize_media_upload",
  "arguments": {}
}

Or connect the X (Twitter) API server directly, which lists 258 tools including this one:

Run in your terminal
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 initialize media upload tool with additional_owners set to ….

More from X (Twitter) API