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
| Name | Required | Description | Default |
|---|---|---|---|
| media_data | Yes | Base64-encoded media file data | |
| mime_type | Yes | MIME type (e.g. 'image/png', 'image/jpeg', 'video/mp4') | |
| media_category | No | Category: 'tweet_image', 'tweet_gif', or 'tweet_video' (default: tweet_image) |