x_media_upload
Upload local images, GIFs, or videos via chunked upload, returning a media_id to attach to posts. Optionally add accessibility alt text and poll status until processing succeeds.
Instructions
X (Twitter): upload a local image, GIF, or video via the chunked v2 flow and return a media_id to attach with x_post_create. The file must live inside the operator-configured media directory. Videos and GIFs may keep processing after upload — poll x_media_status until processing_state is succeeded before posting. Optional alt_text adds an accessibility description. (disabled by policy read-only)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path of the media file to upload (image, GIF, or video). Must be inside the operator-configured media directory; relative paths resolve against it. | |
| alt_text | No | Accessibility description attached to the media after upload (max 1000 chars). | |
| media_category | No | Upload category for the composer. Defaults to the one implied by the file’s actual content (image -> tweet_image, GIF -> tweet_gif, video -> tweet_video). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| meta | Yes | ||
| summary | No |