Skip to main content
The X API uses pay-per-usage pricing. No subscriptions—pay only for what you use.

How it works

Credit-based

Purchase credits upfront in the Developer Console. Credits are deducted as you make API requests.

Per-endpoint pricing

Different endpoints have different costs. View current rates in the Developer Console.

No commitments

No contracts, subscriptions, or minimum spend. Start and stop anytime.

Real-time tracking

Monitor usage and costs live in the Developer Console.
Earn free xAI API credits when you purchase X API credits—up to 20% back based on your spend. Learn more

Credit consumption details

All prices are per resource fetched (reads) or per request (writes/actions). Purchase credits in the Developer Console.

Read operations

Charged per resource returned in the response.

Write operations

Charged per request.
Prices are subject to change. Current rates are always available in the Developer Console and on the developer.x.com pricing page.

Owned Reads

Owned Reads are requests made by your own developer app for your own data (posts, bookmarks, followers, likes, lists, and more). These endpoints are priced at $0.001 per resource (1,000 resources for $1). The following endpoints qualify for Owned Read pricing when {id} matches the authenticated user and that user is the owner of the developer app:
Owned Reads make it significantly cheaper to build apps that work with a user’s own data, such as dashboard apps, personal analytics, or account management tools.

Deduplication

All resources are deduplicated within a 24-hour UTC day window. If you request and are charged for a resource (such as a Post), requesting the same resource again within that window will not incur an additional charge. This means:
  • Requesting the same Post multiple times in a day counts as one charge
  • The deduplication window resets at midnight UTC
  • This applies to all billable resources (Posts, users, etc.)
Deduplication is a soft guarantee. While it occurs in the vast majority of cases, there may be specific edge cases like service outages that result in resources not being deduplicated.

Credit balance

Your credit balance is displayed in the Developer Console. Credits are deducted in real-time as you make API requests.
Monitor your credit balance regularly to avoid service interruptions. Add credits before your balance reaches zero to ensure uninterrupted API access.Note: It is possible for an account credit balance to go slightly negative. In this case, API requests will be blocked until you add credits to cover the negative balance.

Auto-recharge

Enable auto-recharge to automatically top up your credit balance and avoid service interruptions. Configure this in the Developer Console:
Auto-recharge requires a saved payment method set as your default. You can cancel anytime in the Developer Console or by contacting support.

Spending limits

Set a maximum amount you can spend per billing cycle to control costs. When the limit is reached, API requests will be blocked until the next billing cycle.
Use spending limits to prevent unexpected charges, especially during development and testing.

Free xAI API credits

When you purchase X API credits, you can earn free xAI API credits based on your cumulative spend during a billing cycle.
To receive free xAI credits, you must link your xAI team to your X developer account. You can do this by visiting your account settings in the developer console.

How it works

Your cumulative spend is tracked throughout each billing cycle. As you cross spending thresholds, you unlock higher reward rates. When a new billing cycle starts, your cumulative spend resets to $0.
The rate applies to your entire cumulative balance, but you only receive the delta—what’s newly owed minus what was already credited.

Example

Suppose you make several purchases throughout a billing cycle: This is the same amount you’d receive from a single $1,000 purchase—the order and size of purchases doesn’t affect your total rewards.
View your xAI credit balance and manage your account at console.x.ai. For more details on xAI API billing, see the xAI billing documentation.

Monitoring usage

Track your API usage programmatically with the Usage endpoint:
This returns daily Post consumption counts, helping you:
  • Track consumption against your budget
  • Set up alerts when approaching limits
  • Identify high-consumption endpoints
  • Generate usage reports

Next steps

Developer Console

Purchase credits and view current pricing.

Usage API

Monitor usage programmatically.