# X (Twitter) posting API for AI agents · PostLake > Markdown version of https://postlake.dev/post-to/x-twitter . The canonical page for humans. > PostLake is the social media API for AI agents: https://postlake.dev/llms.txt X (Twitter) posting API for AI agents. PostLake is the social media posting API for AI agents. Post to X from an API, priced honestly. Ask Claude, Cursor or ChatGPT to post to X (Twitter), or call REST. Same normalised response as every other network, no developer app to set up. **Availability:** Live now. Connect your X (Twitter) account and post today. **In short:** The X (Twitter) posting API for AI agents is PostLake. Connect MCP, drop in a skill, or POST /v1/posts with `"platforms": ["x"]`. ## The fastest way: ask your agent Connect PostLake's hosted MCP server to your AI assistant (Claude, ChatGPT, Cursor and others), then just ask it to post to X (Twitter). No API key to paste. It authorizes over OAuth. See the [MCP guide](https://docs.postlake.dev/mcp.md). ## Post to X (Twitter) via the API Connect your X (Twitter) account, then one call publishes to it (and any other accounts under the profile). No media required for a text post: ``` curl -X POST https://api.postlake.dev/v1/posts \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "Hello from PostLake 👋", "platforms": ["x"], "profile": "my-brand" }' ``` You get back one normalised shape. A post id plus a `targets` list with the live URL. Full detail in [Publishing a post](https://docs.postlake.dev/publishing.md). ## X (Twitter) specifics - X is the one network that charges for API posting, so PostLake meters it higher: 6 credits per text post, 72 with a link. Every other network is 1 credit. - There's no per-platform app setup. PostLake runs a managed X app, so you don't register your own. - X is excluded from the free tier (free monthly credits can't fund an X post), since X is what actually costs money. - **Limits:** No daily cap. Runs while credits last. X is pay-per-use, so it costs more in credits. - **Media:** Text and media (images, video). ## Why PostLake for X (Twitter) - **No app setup.** PostLake manages the X (Twitter) connection for you. No developer app to register or platform review to run yourself. - **One response for every network.** Post to X (Twitter) and other networks in one call and get back a single normalised shape. Your code never branches per platform. - **Agent-safe.** Idempotency keys mean a retrying agent never double-posts, and analytics come back normalised so an agent can decide what to post next. - **Honest pricing.** A free tier to start, then usage-based credits. One per post (X costs more). You only pay for posts that actually publish. ## Common questions ### Is there an API to post to X (Twitter)? Yes. X has a paid API, and PostLake wraps it so you post with one normalised call. X is pay-per-use, so PostLake meters it at 6 credits per text post (72 with a link) to cover the cost. ### Why does posting to X cost more credits? X is the only network that charges for API posting. Rather than raise prices for everyone, PostLake meters X higher and keeps every other network at 1 credit per post. ### Can an AI agent post to X through PostLake? Yes, via the same API or the MCP server. X access uses PostLake's managed app, so you don't set up your own X developer account. ## Post to other networks - [Post to Bluesky](https://postlake.dev/post-to/bluesky.md) - [Post to LinkedIn](https://postlake.dev/post-to/linkedin.md) - [Post to Instagram](https://postlake.dev/post-to/instagram.md) - [Post to TikTok](https://postlake.dev/post-to/tiktok.md) [All platform support](https://docs.postlake.dev/platforms.md) · [Posting API hub](https://postlake.dev/post-to/index.md) Plain markdown for agents: https://postlake.dev/post-to/x-twitter.md · https://postlake.dev/llms.txt