# 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 with clear credit rates. 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 uses 6 credits for a text post and 75 credits for a post with a link. Every other network uses 1 credit per successful post. - There's no per-platform app setup. PostLake runs a managed X app, so you don't register your own. - X publishing is available on paid plans and with credit packs. The Free plan covers the other live networks. - **Limits:** No daily cap. Uses 6 credits per text post and 75 with a link. - **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. PostLake gives you one normalised call for X publishing. A text post uses 6 credits and a post with a link uses 75 credits. ### Why does posting to X use more credits? X has dedicated credit rates: 6 credits for text and 75 credits for a post with a link. Every other supported network uses 1 credit per successful 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