x-twitter.create_post
Publish a post to a connected X account via the official X API (POST /2/tweets).
Call x-twitter.connected_accounts first. If accounts is empty, the user must connect an X account at https://vee3.io/dashboard/connections before posting. Agents cannot complete OAuth; ask the user to connect, then call x-twitter.connected_accounts again.
Pass user_id or user_name to target a specific account, not both. Omit both to use the default connected account.
At least one of text, poll, media, or card_uri is required.
Supports text, polls, media attachments, reply settings, paid partnership disclosure, AI-generated labels, super-follower exclusivity, nullcast posts, cards, communities, and direct-message deep links.
To attach media, upload files with files.upload_file and the @vee3/upload CLI, then pass file_name values returned by files.list_uploaded_files in the media array (up to 4 files). Only files listed by list_uploaded_files can be attached. poll, media, and card_uri are mutually exclusive in the X API.
Token pricing: 60 tokens base for text posts. Posts whose text includes a URL are billed 1000 tokens base instead. Attaching only media (an image or video) without a URL in the text does not trigger the URL rate. Each attached image adds 50 tokens. Each attached video adds 150 tokens plus 50 tokens per 5 MB of video size.
X rate limit: 100 POST /2/tweets requests per connected user per 15 minutes. Wait and retry if posting is temporarily blocked.
If X authorization fails, reconnect the account in the Vee3 dashboard. Read the error message when X rejects a post and adjust the request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| poll | No | Poll object with options (2-4 strings) and duration_minutes (5-10080). | |
| text | No | Post text content. At least one of text, poll, media, or card_uri is required. | |
| media | No | File names from files.list_uploaded_files to attach (up to 4). Upload with files.upload_file and @vee3/upload first, then list_uploaded_files to get the stored file_name values. | |
| user_id | No | Numeric X user id from x-twitter.connected_accounts. Pass user_id or user_name to target a specific account, not both. Omit both to use the default account. | |
| card_uri | No | Card URI for the post. Mutually exclusive with poll and media. | |
| nullcast | No | Whether the post is promoted-only and hidden from the public timeline. | |
| user_name | No | X handle from x-twitter.connected_accounts, with or without a leading @. Pass user_id or user_name to target a specific account, not both. Omit both to use the default account. | |
| community_id | No | Community id when posting to an X community. | |
| made_with_ai | No | Whether the post contains AI-generated media. | |
| reply_settings | No | Who can reply to the post. | |
| paid_partnership | No | Whether the post is a paid partnership. | |
| share_with_followers | No | Whether to share a community post with followers too. | |
| direct_message_deep_link | No | Deep link that moves the conversation into Direct Messages. | |
| for_super_followers_only | No | Whether the post is exclusive to super followers. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Post text returned by the X API. | |
| user_id | No | Numeric X user id of the connected account that published the post. | |
| tweet_id | No | Numeric id of the created or edited post. | |
| user_name | No | X handle of the connected account that published the post. |