Claude API billing: 2026 में हर model का cost क्या है
Updated 2026-07-15
Claude per token bill करता है, input और output के लिए अलग rates के साथ और हर model tier के लिए अलग price। Official 2026 list पर यह Haiku 4.5 पर $1 in / $5 out per million tokens से लेकर Opus 4.7 पर $5 in / $25 out तक जाता है।
Quick answer: Claude billing कैसे काम करती है
Claude API billing prepaid है और per token metered है। आप Anthropic Console में credits load करते हैं, और हर request input tokens (जो कुछ आप भेजते हैं: system prompt, conversation history, tool definitions) को एक rate पर और output tokens (जो कुछ model वापस लिखता है, extended-thinking requests पर thinking tokens समेत) को higher rate पर deduct करती है। हर model tier के अपने rates का जोड़ा होता है, इसलिए वही request Haiku 4.5 से Opus 4.7 पर पांच गुना ज्यादा cost करती है। तीन mechanics ज्यादातर लोगों को पकड़ लेती हैं। पहला, हर current Claude tier पर output input price का पांच गुना है, इसलिए लंबे responses छोटे-input workloads पर हावी हो जाते हैं। दूसरा, chat stateless है: हर turn पूरी history को input के रूप में resend करता है, इसलिए conversation लंबा होने के साथ per-message cost बढ़ता है। तीसरा, prompt caching और Batch API सिर्फ performance features नहीं बल्कि billing features हैं, और इन्हें use करने से आप per token जो pay करते हैं वह बदल जाता है। इस page का बाकी हिस्सा exact per-model prices, किसी request को भेजने से पहले उसे कैसे estimate करें, caching math, और वे levers cover करता है जो असल में Claude bill को कम करते हैं।
Claude price table: official list बनाम gateway
ये तीन active Claude tiers के लिए current USD prices per million tokens हैं। Official column वह है जो Anthropic अपने Console के through bill करता है; gateway column वह है जो वही models APIsRouter के through cost करते हैं, एक OpenAI-compatible gateway जो global models को official pricing से 20% नीचे list करता है, आपके पहले top-up को 100% balance bonus से double करता है, और access को pay-as-you-go बेचता है, कोई subscription नहीं (/topup पर pay करें, key email पर आती है)। आप चाहे जिस भी route से bill करें, metering identical रहती है: वही request वही token counts consume करती है, और model IDs (claude-opus-4-7, claude-sonnet-4-6) हर call में explicit रहते हैं।
| Model | Official (input / output प्रति 1M) | APIsRouter के through (input / output प्रति 1M) |
|---|---|---|
| Claude Opus 4.7 | $5.00 / $25.00 | $4.00 / $20.00 |
| Claude Sonnet 4.6 | $3.00 / $15.00 | $2.40 / $12.00 |
| Claude Haiku 4.5 | $1.00 / $5.00 | $0.80 / $4.00 |
भेजने से पहले एक request estimate करें
एक token roughly चार characters या English word के तीन-चौथाई के बराबर होता है, इसलिए prompt के 1,000 words लगभग 1,300 tokens होते हैं। किसी request को estimate करने के लिए, input में मौजूद सब कुछ (system prompt, history, नया user message) जोड़ें और response की length का अंदाजा लगाएं। Official rates पर Sonnet 4.6 पर worked example: एक chat turn जिसमें 1,500-token system prompt, 5,500 tokens की accumulated history, और एक 500-token reply है। Input 7,500 tokens है, जिसका cost 7,500 / 1,000,000 x $3.00 = $0.0225 होता है। Output 500 tokens है, $15.00 per million पर, जो $0.0075 है। Total: उस turn के लिए $0.03। दिन में ऐसे 300 turns पर आप लगभग $9.00 प्रति दिन, लगभग $270 प्रति महीना के करीब होते हैं, और history term तब तक बढ़ती रहती है जब तक आप इसे trim नहीं करते। यही arithmetic किसी भी model के लिए काम करता है: ऊपर table से rates swap कर लें। एक three-line helper इसे repeatable बना देता है:
PRICES = { # USD per 1M tokens, official list के अनुसार
"claude-opus-4-7": (5.00, 25.00),
"claude-sonnet-4-6": (3.00, 15.00),
"claude-haiku-4-5": (1.00, 5.00),
}
def cost(model: str, input_tokens: int, output_tokens: int) -> float:
in_rate, out_rate = PRICES[model]
return input_tokens / 1e6 * in_rate + output_tokens / 1e6 * out_rate
print(round(cost("claude-sonnet-4-6", 7_500, 500), 4)) # 0.03
print(round(cost("claude-opus-4-7", 7_500, 500), 4)) # 0.05Prompt caching math: यह कब फायदेमंद होती है
Anthropic cached prefixes को base input rate पर दो multipliers से price करता है: cache में एक prefix write करने का cost 1.25x होता है (default 5-minute cache के लिए, जो हर hit पर refresh होता है; एक 1-hour cache को write करने का cost 2x है), और बाद की requests पर इसे वापस read करने का cost 0.1x होता है। Output tokens पर कोई असर नहीं पड़ता। Minimum cacheable length (Opus और Sonnet पर 1,024 tokens) से नीचे के prefixes बिल्कुल भी cache नहीं होते। Worked example: Sonnet 4.6 पर cache window के अंदर 50 बार hit हुआ एक 8,000-token stable prefix (system prompt plus tool definitions)। Uncached, यह 400,000 input tokens $3.00 per million पर है, यानी $1.20। Cached, आप एक write (8,000 tokens, $3.75 per million पर, $0.03) plus 49 reads (392,000 tokens, $0.30 per million पर, करीब $0.12) pay करते हैं, कुल मिलाकर करीब $0.15। Prefix का cost uncached figure के करीब आठवें हिस्से तक गिर जाता है। Break-even तेज़ है: एक write का cost 1.25x है, एक read 0.9x बचाती है, इसलिए एक prefix जो window के अंदर सिर्फ दो बार भी reuse हो जाए वह already फायदे में आ जाता है। Caching केवल तब पैसा गंवाती है जब prefixes लगभग हर request पर बदलते हैं, क्योंकि हर बदलाव एक नई 1.25x write force करता है।
| Model | Base input / 1M | Cache write, 5 min (1.25x) | Cache read (0.1x) |
|---|---|---|---|
| Claude Opus 4.7 | $5.00 | $6.25 | $0.50 |
| Claude Sonnet 4.6 | $3.00 | $3.75 | $0.30 |
| Claude Haiku 4.5 | $1.00 | $1.25 | $0.10 |
आपसे क्या bill हुआ, यह audit करें: usage object
हर Claude response में एक usage block होता है जिसमें exact token counts होते हैं जिनके लिए आपसे charge किया गया, इसलिए आपको कभी guess नहीं करना पड़ता। एक metered test call भेजें:
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 200,
"messages": [
{"role": "user", "content": "Explain prompt caching in one line."}
]
}'Claude bill कम करने के छह तरीके
एक chat-style workload पर साथ में apply किए जाने पर, tier routing plus history trimming plus caching typically billing provider बदलने से कहीं ज्यादा cost काटते हैं, क्योंकि ये rate को नहीं बल्कि खुद token counts को छोटा करते हैं।
- जब quality allow करे तो tier down करें। Haiku 4.5 classification, routing, और extraction को Opus के input rate के पांचवें हिस्से पर handle करता है। Opus 4.7 को traffic के reasoning-heavy हिस्से के लिए reserve करें और Sonnet 4.6 को default रखें।
- max_tokens cap करें। हर Claude tier पर output का cost input का पांच गुना है, इसलिए एक uncapped rambling answer सबसे महंगा failure mode है। task से matching एक ceiling set करें।
- History trim या summarize करें। क्योंकि हर turn पूरी conversation resend करता है, एक rolling summary जो पुराने turns को replace कर दे, input growth को linearly बढ़ने देने के बजाय cap कर देता है।
- Stable prefixes cache करें। 1,024 tokens से ज्यादा के system prompts, tool schemas, और reference documents को cache-mark किया जाना चाहिए; पिछले section की math हर repeated call पर लागू होती है।
- Offline work के लिए Batch API use करें। Anthropic batch requests को interactive rate के आधे पर bill करता है, जो evaluation runs, backfills, और delayed results tolerate कर सकने वाले nightly jobs के लिए suits करता है।
- Non-Claude-critical steps को कहीं और route करें। Drafting, tagging, और retrieval reranking अक्सर deepseek-v4-flash पर $0.126 / $0.252 per million tokens पर ठीक चलते हैं, और Claude को उस final prose के लिए रखें जहां इसकी quality मायने रखती है।
अक्सर पूछे जाने वाले प्रश्न
Claude API billing कैसे काम करती है?
यह prepaid और per token है। आप credits खरीदते हैं, और हर request आपके call किए गए model के rates पर input tokens और output tokens deduct करती है। कोई monthly fee नहीं है और tokens के अलावा कोई per-request charge नहीं है; हर response एक usage block return करता है जो exactly दिखाता है कि क्या count हुआ।
Claude API का cost प्रति 1,000 tokens कितना होता है?
Per-million rates को 1,000 से divide करें। Officially, Haiku 4.5 $0.001 in / $0.005 out per 1K tokens है, Sonnet 4.6 $0.003 / $0.015 है, और Opus 4.7 $0.005 / $0.025 है। ज्यादातर price pages per million tokens quote करते हैं, इसलिए बड़ा दिखने वाला rate आमतौर पर उतना बड़ा नहीं होता।
क्या Claude Pro subscription में API credits शामिल हैं?
नहीं। Claude Pro और Max claude.ai apps के लिए subscriptions हैं और Anthropic Console में API credits से अलग bill होते हैं। API के against build करने का मतलब है API credits (या एक pay-as-you-go gateway balance) fund करना; chat subscription API के through spend नहीं की जा सकती।
मेरा Claude API bill उम्मीद से ज्यादा क्यों है?
सामान्य कारण: conversation history हर turn पर input के रूप में resend होती है, output tokens का cost input का पांच गुना है, और extended-thinking tokens output के रूप में bill होते हैं भले ही आप उन्हें display न करें। Real responses पर usage block check करें; वहां के counts लगभग हमेशा gap explain कर देते हैं।
क्या prompt caching हमेशा पैसे बचाती है?
नहीं। एक cache write का cost base input rate का 1.25x होता है, इसलिए जो prefix लगभग हर request पर बदलता है, caching on होने पर उसका cost थोड़ा ज्यादा होता है। यह तभी फायदेमंद होती है जब 1,024+ tokens का एक stable prefix cache window के अंदर कम से कम दो बार reuse हो, और long-lived agents इसे कई गुना recoup कर लेते हैं।
क्या failed Claude API requests bill होती हैं?
Processing से पहले reject हुई requests, जैसे rate-limit 429s और authentication errors, tokens consume नहीं करतीं। जिन requests को model actually process करता है वे use हुए tokens के लिए bill होती हैं, max_tokens से cut हुए responses समेत, इसलिए एक truncated answer भी उतना ही cost करता है जितना generate हुआ।