Guide
X API: how to create a post, and the simpler way
The API from X, known as Twitter’s API before the rename, creates a post with POST /2/tweets, signed in as the user with the tweet.write scope.
The API call
X’s documentation names the endpoint as POST /2/tweets. Its OAuth 2.0 scheme lists tweet.write and users.read as the scopes.
A request needs text unless it carries media. A good reply is 201 Created with the post’s ID and text.
Media comes first
To attach media you upload it first with the chunked upload endpoints, then pass the returned media_id in media.media_ids. The page says a post can hold up to 4 photos, 1 animated GIF or 1 video.
Other fields worth knowing
The body can also carry a poll with 2 to 4 options and a duration, or a reply with in_reply_to_tweet_id. The documentation says quote_tweet_id requires an Enterprise plan.
Cost, changes and why people look for a wrapper
Running this yourself means an X developer app, a user authorisation flow and your own handling of the media step. For one account it is fine. For a team that also posts elsewhere it is a lot to keep working.
Posting to X through Dripost
Dripost’s API (dripost.com/docs/api) sends text posts to X. Text only is the honest limit: images and video for X are not something Dripost sends.
You connect X in Dripost once. A post that an AI assistant writes through Dripost’s MCP server is held for 10 minutes before it goes, so the owner can cancel it.
Pricing and plans for the API from Twitter
X charges for API access, and the plans and prices have changed more than once, so read X’s developer pricing page before you build. The cost is the reason many people use a scheduler that already holds access.
API cost for Twitter (X) in 2026
The API cost for Twitter, now X, is pay-per-use, with no monthly subscription for new developers. On X's pricing page (read 5 October 2026), creating a post costs $0.015, a post with a link $0.20, and reading a post $0.005, with reads capped at 3 million a month before an Enterprise plan.
API prices for Twitter change, and the legacy Basic and Pro plans have been retired, so check the current numbers in X's developer console. API costs for Twitter only matter if you build on the API yourself; when you post through a scheduler, the scheduler's own developer account makes the calls.
Sources
Questions
What is the endpoint to post on X?
POST /2/tweets, per X’s documentation.
Is the old Twitter developer product the same as the API from X?
X’s documentation uses the X name and lists the create-post endpoint as /2/tweets.
Can Dripost post images to X?
No. Dripost posts text only to X.