Claude API Pricing in 2026: Per-Token Rates and What 1,000 Tweets Really Cost

This page is about the per-token Claude API: what each model costs per million tokens when you call it from your own code with a Console API key, and what that means for a real workload. If you want the Claude subscription plans (Pro, Max, Team) and how they cover Claude Code, read our separate guide to Claude Code pricing; Anthropic's help center states that a paid Claude plan and the API are separate products, and that the API is billed separately (with monthly API credits included on Max, Ultra and Team plans).
Every price below was copied from Anthropic's own pricing page and model overview on platform.claude.com during this build, and each is listed in the page's fact sheet. Third-party price trackers that rank for this query disagree with each other and several still show superseded numbers, such as a scheduled Sonnet 5 price increase that Anthropic's page now says will not happen. When a figure matters to your budget, check the source page; prices change.
Per-MTok rates are hard to feel, so we priced a concrete job. We pulled 953 real posts from X (Anthropic's own two accounts plus searches for Claude API chatter), measured how many tokens each one takes to send to a model, and costed three common jobs on six Claude models. The result is a calculator you can reuse for any X-data agent: Claude tokens on one meter, tweet data on the other.
Claude API prices per million tokens, model by model
Anthropic bills the Claude API on four token meters: base input tokens, output tokens, cache writes and cache reads. Prices are quoted per million tokens (MTok), so $4 / MTok means $4 for every million input tokens. The table lists the current models and the two older ones most people still run, with the Batch API column showing the 50% asynchronous discount.
Fable 5.1 is the top tier. Anthropic's model overview describes it as the model for demanding reasoning and long-horizon agentic work. Its cache hits cost just 0.025x input ($0.25 / MTok), the deepest cache discount on the list. Claude Mythos 5.1 carries the same prices but is limited to organizations verified through Anthropic's programs.
Opus 5.5 is the default recommendation. The overview says to start with Opus 5.5 for most workloads. At $4 / $20 it is cheaper than Opus 5 and the Opus 4.x line, which all sit at $5 / $25, so moving off an older Opus lowers the per-token rate.
Sonnet 5.5 and Haiku 5.5 are the volume tiers. Sonnet 5.5 is $2 / $10. Haiku 5.5 is the only model with prompt-length pricing: a request whose prompt (including cache reads and writes) exceeds 100,000 tokens pays $0.50 / $2.50 for the whole request, five times the short-prompt rate.
Sonnet 5 kept its launch price. Anthropic's footnote says the $2 / $10 rate announced at launch as introductory pricing through August 31, 2026 is now the standard price, and the increase to $3 / $15 that had been scheduled for September 1, 2026 will not occur. Pages that still quote a coming Sonnet 5 price rise are out of date.
Retired models cost more. Opus 4.1 and Opus 4 list at $15 / $75 and remain only on some cloud platforms; if a cost tracker shows those numbers for current Opus, it is mixing generations.
Batch API, prompt caching and the other price modifiers
List prices are the starting point. Five modifiers move the real number, and Anthropic's pricing page says the caching multipliers stack with the Batch discount and with data residency.
Batch API: 50% off input and output. You submit up to 100,000 requests (or 256 MB) in one batch; Anthropic's batch docs say most batches complete within an hour and results are available when all requests finish or after 24 hours, whichever comes first. Anything not done in 24 hours expires. Fast mode is not available with batches. For overnight tagging, enrichment or digest jobs, batching is the single largest saving.
Prompt caching: writes cost more, reads cost much less. A 5-minute cache write is 1.25x the input price, a 1-hour write is 2x, and a cache hit is 0.1x (0.05x on Opus 5.5 and Sonnet 5.5, 0.025x on Fable 5.1). Anthropic notes caching pays off after one read for the 5-minute cache and after two reads for the 1-hour cache. The catch: a prefix shorter than the model's minimum is silently not cached. The minimum is 512 tokens on the 5.5 models and Fable 5.1, 1,024 on Sonnet 4.6 and Sonnet 5, and 4,096 on Haiku 4.5.
Thinking tokens bill as output. Anthropic's thinking docs say the tokens Claude spends reasoning are billed as output tokens even when the thinking text is not returned. Opus 5.5, Sonnet 5.5 and Fable 5.1 think adaptively by default and reject thinking: {type: "disabled"}; Haiku 5.5 accepts it at high effort or below. Lowering the effort setting is the lever on the models that cannot switch thinking off.
Tools add tokens. Declaring any tool adds a hidden tool-use system prompt: 286 tokens on Opus 5.5, Sonnet 5.5 and Haiku 5.5, 497 on Sonnet 4.6. Server tools add usage fees: web search is $10 per 1,000 searches plus the tokens of the results, web fetch has no extra fee beyond tokens, and code execution is free alongside web search or web fetch (otherwise 1,550 free hours per organization per month, then $0.05 per hour per container).
Geography and speed. Pinning inference to the US with inference_geo: "us" multiplies every token category by 1.1 on Claude 4.6 and later models. Fast mode for Opus 5.5 costs $8 / $40 per MTok, double the standard rate.
The tokenizer changed. Claude 4.7 and later models use a newer tokenizer that, per Anthropic, produces approximately 30% more tokens for the same text. A prompt that cost N tokens on Sonnet 4.6 costs roughly 1.3N on Sonnet 5.5, which narrows the apparent price gap between generations. Count tokens with the model you plan to use: the count_tokens endpoint is free (it has its own rate limit).
How many tokens is a tweet? We measured real posts
Most cost guides stop at the rate card. To get from rates to dollars you need a token count, so we measured it on 953 real posts collected in 2026: 200 from the @AnthropicAI and @claudeai timelines and 753 from searches for Claude API chatter. Each post was turned into the compact JSON record an agent would actually send (author handle, text, likes, reposts, replies, views) and counted with an open tokenizer.
The distribution is the story. Half of all records are 121 tokens or fewer, yet the mean is 290 because of long posts: 11.6% of tweets exceed 500 tokens and the top 10% of tweets account for 51% of all input tokens. Long-form posts of several thousand tokens turned up in both the Anthropic timelines and the search sample. Budget on the mean, not the median, or cap the text you send.
These are estimates. We counted with tiktoken's o200k_base encoding as a stand-in for the older Claude tokenizer and applied Anthropic's stated +30% for 4.7-and-later models, so a median record is about 157 tokens on Opus 5.5, Sonnet 5.5 or Haiku 5.5. A plain chars-divided-by-4 rule gives 92 for the same median record, which undercounts. For exact numbers, run client.messages.count_tokens on your own data with the target model ID; it costs nothing.
Other properties worth knowing when you size a prompt: 43.5% of the posts carried at least one link, and the search sample was multilingual (English first, then Chinese and Japanese); test token counts on the languages you actually collect.

Calculator: what 1,000 tweets cost on each Claude model
With measured token counts, the per-MTok rates become per-job prices. We costed two jobs on 1,000 tweets. Tagging: one request per tweet with a short labeling instruction (57 tokens) and a small JSON label back (19 tokens), which is how most classification pipelines start. Digests: 20 requests of 50 tweets each, with a 500-token written summary back per request.
On the new-tokenizer models, tagging 1,000 tweets sends about 451,722 input tokens and returns about 24,700; on Sonnet 4.6 and Haiku 4.5 the same job is about 347,478 in and 19,000 out. Input dominates: for a labeling job, the tweets themselves are most of the bill, which is why the long-post tail matters so much.
Haiku 5.5 changes the math for bulk work. At $0.058 per 1,000 tweets tagged ($0.029 batched), it is cheaper than fetching the tweets. Haiku 4.5, the previous small model, costs $0.44 for the same job despite the older, more compact tokenizer, because its list price is ten times higher.
Older is not cheaper. Sonnet 4.6 at $1.33 costs more than Sonnet 5.5 at $1.15 even after the new tokenizer's 30% inflation, because the per-token rate fell from $3 to $2.
What the table leaves out. Thinking tokens are not modeled. Opus 5.5, Sonnet 5.5 and Fable 5.1 cannot turn thinking off, so their real cost for this job is higher than shown by however many tokens they spend reasoning (lower the effort level to limit it). Haiku 5.5 with thinking disabled matches the table. Tool definitions, retries and any web search are extra.

When prompt caching helps, and when it silently does nothing
Real labeling prompts grow. Once you add a rubric and a few worked examples, a 1,200-token instruction block is typical, and that block is identical on every call. That is exactly what prompt caching is for: write it once at 1.25x, then read it at 0.1x or less for every tweet that follows within the cache lifetime. We priced the same 1,000-tweet tagging job with a 1,200-token prefix, without caching and with one 5-minute cache write followed by 999 hits.
Caching cuts the Opus 5.5 job from $8.24 to $2.32 and Sonnet 5.5 from $4.12 to $1.16, because the 5.5 models read cache at 0.05x. Haiku 4.5 gets nothing: its 4,096-token minimum is larger than the prefix, so the API processes the request uncached and, per Anthropic, returns no error. Check cache_creation_input_tokens and cache_read_input_tokens in the response; if both are 0, the prompt was not cached.
Two caveats. First, the short 57-token instruction in the plain tagging job above can never be cached on any model, so for tiny prompts caching is irrelevant and batching is the lever. Second, the 5-minute cache only stays warm if calls keep arriving; a polling agent that wakes every 15 minutes pays a fresh write each time, and the 1-hour cache (2x write) is the better fit.
The data side of the bill: Claude tokens plus tweets
An agent that reads X has two meters running. Claude bills tokens; the X data source bills per tweet or per profile. On the official X API's pay-per-usage rate card (docs.x.com/x-api/getting-started/pricing), a post read is $0.005 and a user read is $0.010, capped at 3 million post reads per monthly billing cycle with Enterprise above that. On TwitterAPI.io, tweet endpoints cost 15 credits per tweet returned, which is $0.15 per 1,000 tweets, and profiles are 18 credits each ($0.18 per 1,000). That is about 33x less per 1,000 tweets than X's $5.00.
Put together, a Sonnet 5.5 tagging pipeline on 1,000 tweets costs about $1.30 with TwitterAPI.io data or about $6.15 with X API data. With Haiku 5.5 the model share shrinks to a few cents, and data becomes the larger line on either source. Either way, the choice of data source can matter as much as the choice of model.
Polling has its own floor. A TwitterAPI.io search that finds nothing is billed the 15-credit minimum, $0.00015. Checking every 60 seconds for a month is 43,200 checks, or $6.48 if every check came back empty; every 5 minutes is $1.30. Do not send empty results to Claude: only call the model when the search returns new tweets, and the model meter stays at zero on quiet hours.
To start, new TwitterAPI.io accounts that pass the automatic bot check get up to $1 of free credits (at most 100,000 credits, no card, one per person or network, expiring after 31 days); purchased credits never expire. Rate limits are 0.2 requests per second before the first payment and 20 once paid. Reads need no X account.
What Anthropic's own accounts say about pricing
We also checked how much of Anthropic's posting on X is about pricing, plans, tokens or limits, and how those posts land with followers. The two official accounts behave differently.
On @claudeai, posts about plans, pricing or limits are 26.0% of the sample and draw a median 5,345,382 views, about three times the account's other posts. On @AnthropicAI, the corporate account, they are 12.2% and draw fewer views than its research and company news. For anyone tracking price changes, the product account is where they surface first.
In the search sample about Claude API pricing and cost (400 posts), the model named most often was Opus (95 posts), then Sonnet (52), Fable (39), Haiku (33) and Mythos (8). Cost talk follows the expensive model, even though the per-job numbers above show that Haiku and Sonnet handle bulk X data for a fraction of the price.
Choosing a model for an X-data agent on a budget
Anthropic's own advice on its pricing page is to use Haiku for simple tasks, Sonnet for most production workloads and Opus for the most complex reasoning. Mapped onto X-data jobs, with the measured numbers above, that becomes a practical split.
Bulk labeling, filtering and routing: Haiku 5.5. Topic tags, sentiment, spam screening and language routing on thousands of tweets cost cents per thousand ($0.058 tagged, $0.029 batched). Disable thinking for simple labels and keep each prompt under 100,000 tokens to stay on the low rate.
Digests and reply drafting: Sonnet 5.5. A daily 350-word digest of 1,000 tweets costs about $0.86 ($0.43 batched), plus thinking tokens. This is where writing quality starts to matter more than the per-token rate.
Research agents and hard judgment calls: Opus 5.5. Multi-step investigations that call tools, read threads and reason over them are where Opus earns its rate. The same digest is about $1.72 before thinking. Reserve Fable 5.1 ($4.29 for the digest) for cases where your evaluations show Opus falls short.
Cut tokens before you cut models. Send only the fields the model needs, truncate long-form posts to a fixed length, drop exact duplicates and reposts, and batch anything that can wait a few hours. On our sample the longest 10% of posts carried half of all input tokens, so a length cap is the biggest single token saving.
Track usage from the response. Every Messages API response carries a usage object with input_tokens, output_tokens and the cache counters; log it per job and multiply by the table rates to get a running cost. Anthropic's pricing page notes that usage tracking is also available in the Claude Console.
# Estimate a Claude bill from the usage object of each response (prices per MTok, platform.claude.com)
PRICES = {
"claude-opus-5-5": {"in": 4.00, "out": 20.00, "cache_read": 0.20, "cache_write_5m": 5.00},
"claude-sonnet-5-5": {"in": 2.00, "out": 10.00, "cache_read": 0.10, "cache_write_5m": 2.50},
"claude-haiku-5-5": {"in": 0.10, "out": 0.50, "cache_read": 0.01, "cache_write_5m": 0.125}, # prompts up to 100K tokens
}
def cost_usd(model, usage, batch=False):
p = PRICES[model]
total = (
usage.input_tokens * p["in"]
+ usage.output_tokens * p["out"]
+ (usage.cache_read_input_tokens or 0) * p["cache_read"]
+ (usage.cache_creation_input_tokens or 0) * p["cache_write_5m"]
) / 1_000_000
return total * (0.5 if batch else 1.0)How we collected this
Question. How many tokens does a real tweet take to send to Claude, and what does it cost to process 1,000 tweets on each current model, before and after the Batch API and prompt-caching discounts, compared with the cost of fetching the tweets?
Accounts and queries. The @AnthropicAI and @claudeai timelines (100 posts each, organization accounts) via /twitter/user/last_tweets, plus two latest-first searches via /twitter/tweet/advanced_search: the phrase "claude api", and "claude api" or "anthropic api" together with pricing, cost, price or tokens (400 posts each). After removing duplicates: 953 posts, 639 distinct authors in the search part.
Window and cost. The most recent posts at collection time, collected in 2026. The study used 50 requests and returned 1,000 tweets, which cost $0.15 at 15 credits per tweet.
Method. Each post became a compact JSON record (author handle, text, likes, reposts, replies, views). Tokens were counted with tiktoken o200k_base as an estimate of the older Claude tokenizer, then multiplied by 1.3 for Claude 4.7-and-later models per Anthropic's tokenizer note. Prices are the platform.claude.com list prices fetched for this build. No Claude API call was made; the dollar figures are calculations, not invoices. Code and aggregates are in the study folder data/studies/claude-api-pricing/.
What the sample cannot show. It is not a random sample of X: it leans toward AI and developer posts, which run longer than average. Exact Claude token counts differ from our estimate by model and language. Thinking tokens, tool overhead, retries and long-context effects are not modeled. Output lengths are assumptions stated above.
Privacy. Aggregates only. The two Anthropic accounts are organization accounts and are named; no individual author is profiled, raw search pages were kept out of the published study folder, and the published rows carry no IDs, URLs, handles or text.
"""claude_tweet_cost.py - pull real tweets from TwitterAPI.io, count Claude tokens for free,
estimate the bill per model, then tag a few tweets with Claude Haiku 5.5 and print the real usage.
pip install requests anthropic
export TWITTERAPI_IO_KEY=... # from the TwitterAPI.io dashboard
export ANTHROPIC_API_KEY=... # from the Claude Console
"""
import json
import os
import anthropic
import requests
BASE = "https://api.twitterapi.io"
HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]}
claude = anthropic.Anthropic() # reads ANTHROPIC_API_KEY
# Per-MTok list prices from platform.claude.com/docs/en/about-claude/pricing
PRICES = {
"claude-opus-5-5": (4.00, 20.00),
"claude-sonnet-5-5": (2.00, 10.00),
"claude-haiku-5-5": (0.10, 0.50), # prompts up to 100K tokens
}
SYSTEM = (
"You label tweets. Return JSON with keys topic (pricing, launch, bug, praise, "
"complaint, question, other), sentiment (positive, neutral, negative) and is_question."
)
def search_tweets(query, max_pages=5):
"""Latest tweets for a query; 15 credits per tweet returned ($0.15 per 1,000)."""
tweets, cursor = [], ""
for _ in range(max_pages):
r = requests.get(
f"{BASE}/twitter/tweet/advanced_search",
headers=HEADERS,
params={"query": query, "queryType": "Latest", "cursor": cursor},
timeout=30,
)
r.raise_for_status()
body = r.json()
tweets += body.get("tweets", [])
if not body.get("has_next_page"):
break
cursor = body.get("next_cursor", "")
return tweets
def record(t, max_chars=1200):
"""Compact record; truncating long-form posts keeps the token tail in check."""
return json.dumps({
"author": "@" + t["author"]["userName"],
"text": (t.get("text") or "")[:max_chars],
"likes": t.get("likeCount", 0),
"reposts": t.get("retweetCount", 0),
"replies": t.get("replyCount", 0),
"views": t.get("viewCount", 0),
}, ensure_ascii=False)
tweets = search_tweets('"claude api" -is:retweet', max_pages=5)
records = [record(t) for t in tweets]
print(f"fetched {len(tweets)} tweets, data cost ${len(tweets) * 0.00015:.4f}")
if not records:
raise SystemExit("no tweets matched")
# 1) Count input tokens per model (count_tokens is free; it has its own rate limit)
for model, (p_in, p_out) in PRICES.items():
n = claude.messages.count_tokens(
model=model,
system=SYSTEM,
messages=[{"role": "user", "content": records[0]}],
).input_tokens
per_1000_in = n * 1000 * p_in / 1e6
print(f"{model}: {n} input tokens for one tweet -> about ${per_1000_in:.3f} input per 1,000 similar tweets")
# 2) Tag a few tweets with Haiku 5.5 (thinking off) and price the real usage
spent = 0.0
for rec in records[:5]:
msg = claude.messages.create(
model="claude-haiku-5-5",
max_tokens=100,
thinking={"type": "disabled"},
system=SYSTEM,
messages=[{"role": "user", "content": rec}],
)
u = msg.usage
p_in, p_out = PRICES["claude-haiku-5-5"]
spent += (u.input_tokens * p_in + u.output_tokens * p_out) / 1e6
print(msg.content[0].text, "|", u.input_tokens, "in", u.output_tokens, "out")
print(f"Claude cost for 5 tweets: ${spent:.6f}")
Questions readers ask
How much does the Claude API cost per token?
Claude is priced per million tokens (MTok). Current list prices on platform.claude.com: Fable 5.1 $10 input / $50 output, Opus 5.5 $4 / $20, Sonnet 5.5 $2 / $10, Haiku 5.5 $0.10 / $0.50 for prompts up to 100,000 tokens ($0.50 / $2.50 above), Sonnet 4.6 $3 / $15 and Haiku 4.5 $1 / $5. Per single token that is, for example, $0.000002 for Sonnet 5.5 input.
Is there a free tier for the Claude API?
Anthropic's pricing FAQ says new users receive a small amount of free credits to test the API; there is no ongoing free tier, and usage after that is billed monthly by actual consumption. The token counting endpoint is free to use, subject to its own rate limit.
Does a Claude Pro or Max subscription include API usage?
Not by default. Anthropic's help center says paid Claude plans and the Console are separate products and API usage is billed separately, and that Max, Ultra and Team plans include monthly credits for the Claude API. Our Claude Code pricing guide covers the subscription side.
How much does the Batch API save?
50% on both input and output tokens for every model listed. Batches hold up to 100,000 requests or 256 MB, most finish within an hour, and anything not done within 24 hours expires. Batch and prompt-caching discounts stack.
How much does prompt caching save on Claude?
Cache reads cost 0.1x the input price on most models, 0.05x on Opus 5.5 and Sonnet 5.5 and 0.025x on Fable 5.1. Writes cost 1.25x (5-minute) or 2x (1-hour). The prefix must meet a minimum length (512 tokens on the 5.5 models, 4,096 on Haiku 4.5) or it is processed uncached without an error.
Are thinking tokens billed?
Yes. Anthropic bills thinking tokens as output tokens even when the thinking text is not returned to you. Opus 5.5, Sonnet 5.5 and Fable 5.1 always think adaptively, so lower the effort setting to limit it; Haiku 5.5 accepts thinking disabled at high effort or below.
How many tokens is a tweet for Claude?
On 953 tweets collected in 2026, a compact JSON record (handle, text, engagement counts) was a median 121 tokens and a mean 290 by our tiktoken estimate, about 30% more on Claude 4.7-and-later models. Long-form posts skew it: the top 10% carried 51% of tokens. Use the free count_tokens endpoint for exact numbers.
What does it cost to analyze tweets with Claude end to end?
Two meters: data and tokens. Fetching 1,000 tweets is $0.15 on TwitterAPI.io or $5.00 on the official X API's pay-per-usage rate card. Tagging them one request each is an estimated $0.058 on Haiku 5.5, $1.15 on Sonnet 5.5 or $2.30 on Opus 5.5, before thinking tokens, and half that with the Batch API.
Continue
- Anthropic: Claude API pricing (model prices, caching, batch, tools, data residency)
- Anthropic: Models overview (model IDs, context windows, default effort)
- Anthropic: Prompt caching (minimum cacheable prompt length)
- Anthropic: Batch processing (limits, 24-hour window)
- X developer docs: X API pay-per-usage pricing
- TwitterAPI.io API documentation
- X (Twitter) API hub: endpoints, pricing and guides
- Claude Code pricing: Pro, Max and Team plans compared
- How to get a Claude API key in the Console
- How to use Claude with the Twitter (X) API
- X API cost breakdown: the official pay-per-usage rate card
- Twitter API cost per call and per 1,000 tweets
- Twitter (X) API rate limit calculator
- TwitterAPI.io pricing: pay only for the data returned
- 01Twitter (X) API License: The Developer Agreement in Plain English
- 02Claude Agent SDK: Build a Twitter (X) Research Agent in Python
- 03OpenRouter API: Base URL, API Key, Free Models and Pricing, Plus a Twitter (X) Agent That Swaps Models
- 04Codex vs Claude Code: Setup, MCP, Headless Runs and Pricing Compared for Twitter (X) Data Agents
- 05Open AI API Key: How to Get One, Pay for It, Keep It Safe and Feed It Live Twitter (X) Data
- 06Claude Code Pricing in 2026: Plans, Usage Limits and the Real Cost of an Always-On Agent
- 07Claude Routines: What They Are, Their Limits, and a Twitter (X) Watch Routine
- 08Twitter (X) Firehose Pricing — Enterprise vs API Comparison
Stop reading. Start building.
Starter credits cover real testing on real data. Google sign-in, no card, no application queue.
Get an API keyAlready building with TwitterAPI.io? Publish an honest tutorial or build log about it and earn up to $200 a month in API credits.