Solutions

X API for Developers

Publish posts with images, GIFs and video to X from one REST API or MCP server. Ampost handles OAuth, the chunked media upload and X's pay-per-use billing behind a fixed monthly allowance. Comparing costs? Read our guide to X API pricing.

Text, Images and Video

Publish text posts, up to 4 images, a GIF or one video. Ampost runs X's chunked media upload and waits for video processing before posting.

No X Developer Account

X API access is pay-per-use per request. Ampost holds the developer app and the prepaid credits, so you connect accounts instead of managing X billing.

Predictable Monthly Allowance

The Max plan includes up to 660 X posts a month without links, or 50 with links, because X charges far more for posts with a URL.

Managed OAuth 2.0 with PKCE

Ampost runs the X OAuth 2.0 flow, stores tokens encrypted and refreshes the two-hour access tokens before each publish.

Character Counting like X

Text is checked the way X counts it: every link is 23 characters. A `linkUrl` is appended to the post text for you.

Same Model as Every Platform

Send one post to X, LinkedIn, Threads, Bluesky and the rest with the same request, and read per-platform results from one response.

Why this page exists

An X publishing API without X billing

Since 2026, X charges for every API request, with posts that contain a link costing more than ten times a plain post. Building on X directly means a developer account, prepaid credits and your own spending controls.

Ampost puts that behind the Max and Scale plans: a monthly allowance of X posts, checked before any billed call, plus the same post model you use for every other network.

Use cases

AI agents announcing releases

Let an agent draft the release post, attach a screenshot and publish to X through MCP or REST, within a known monthly X budget.

SaaS products posting for their users

Offer X posting inside your product without applying for X API access, paying per request or handling OAuth yourself.

Scheduling posts across networks

Schedule the same announcement for X, LinkedIn and Bluesky; Ampost stores the media and publishes each at the scheduled time.

Publish to X in one API call

Connect an X account once, then publish from your backend, workflow tool or agent with the same request you send to other platforms.

curl -X POST https://api.ampost.io/api/posts \
  -H "Authorization: Bearer amp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platforms": ["twitter"],
    "text": "Ampost 2.4 is out: faster scheduling and new analytics.",
    "media": [
      { "url": "https://cdn.example.com/release.png", "type": "image", "altText": "Release notes" }
    ],
    "publishNow": true
  }'

X-specific caveats

What developers should know before integrating

X is available on the Max and Scale plans only, because every X API call is billed. Free and Pro accounts cannot connect X.

Each X post uses units of the monthly allowance: 1 for a post, 13 for a post that contains a link (bare domains count), plus 1 per image or video. 660 plain posts or 50 posts with links fit in a month.

There is also an hourly X post limit. A post over it fails with RATE_LIMITED and can be retried later.

Posts are limited to 280 characters, as X counts them. Polls, quote posts, replies and threads are not supported yet.

Build path

Move from X proof of concept to production

Start with the API docs, connect an X account on a plan with X and send a first post with an image. Read the X result from platformPosts[].

Before you go live, decide which posts carry links: they use most of the allowance. When you post often, put the link on the other platforms and keep the X post plain.

FAQ

Common questions about X API integration

Do I need my own X developer account to post through Ampost?

No. Ampost owns the X developer app and pays X's per-request fees. You connect X accounts through Ampost's OAuth flow and publish with your Ampost API key.

How many X posts can I publish per month?

On the Max plan, up to 660 posts without links or 50 posts with links per month, or any mix of the two; Scale gets 1320 or 101. A post with a link uses 13 units, a plain post 1, and each image or video 1 more.

Can I schedule posts to X?

Yes. Send a future `scheduledFor` value; Ampost copies the media to its storage and publishes at that time. The X allowance is used when the post is published.

Ready to publish to X via API?

Start building with Ampost today. Use one integration surface for X and the rest of your social publishing workflow.