studioglobal
ट्रेंडिंग डिस्कवर
उत्तरप्रकाशित9 स्रोत

Claude Opus 4.7 API का खर्च कैसे गिनें: $5/$25 से आगे की बात

Anthropic API पर Claude Opus 4.7 की आधार दर $5 प्रति 10 लाख input tokens और $25 प्रति 10 लाख output tokens है; prompt caching अलग से गिनी जाती है।[19] सही अनुमान के लिए request भेजने से पहले /v1/messages/count tokens चलाएं और request के बाद response के usage डेटा से वास्तविक खर्च मिलाएं।[17][18] Opus 4.7 का नया toke...

18K0
Claude Opus 4.7 API 收費表、token 計算與 prompt caching 成本公式的編輯插圖
Claude Opus 4.7 API 收費指南:$5/$25、Token 計法同成本公式AI-generated editorial illustration for Claude Opus 4.7 API pricing and token accounting.
AI संकेत

Create a landscape editorial hero image for this Studio Global article: Claude Opus 4.7 API 收費指南:$5/$25、Token 計法同成本公式. Article summary: Claude Opus 4.7 API 基礎價係每百萬 input tokens $5、每百萬 output tokens $25;但 prompt caching 要另計,而且新 tokenizer 可能令同一段文字用大約 1x 至 1.35x token。[19][20]. Topic tags: ai, anthropic, claude, api pricing, llm. Reference image context from search candidates: Reference image 1: visual subject "# Claude Opus 4.7 上线完全指南(2026 最新):核心升级与国内 API 接入方案. **Claude Opus 4.7 于 2026 年 4 月 16 日正式发布,API model ID 为 `claude-opus-4-7`,定价维持与 Opus 4.6 相同的 $5/M 输入 token、$25/M 输出 token 不变,1M t" source context "Claude Opus 4.7 上线完全指南(2026 最新):核心升级与 ..." Reference image 2: visual subject "# Claude Opus 4.7 上线完全指南(2026 最新):核心升级与国内 API 接入方案. **Claude Opus 4.7 于 2026 年 4 月 16 日正式发布,API model ID 为 `claude-opus-4-7`,定价维持与 Opus 4.6 相同的 $5/M 输入 token、$25/M 输出 token 不变,1M t" source context "Claude Opus 4.

openai.com

Claude Opus 4.7 की API कीमत ऊपर से बहुत सीधी दिखती है: input के लिए $5 और output के लिए $25 प्रति 10 लाख tokens। लेकिन असली बिल तभी सही निकलेगा जब आप input, output, prompt cache write और cache read को अलग-अलग गिनेंगे। Anthropic के अनुसार developers Claude API में model ID claude-opus-4-7 इस्तेमाल कर सकते हैं; CloudPrice और Price Per Token जैसे third-party pricing indexes भी $5 input / $25 output प्रति million tokens का शुरुआती स्तर दिखाते हैं। अगर आप Anthropic API के बजाय किसी अन्य platform या provider से access कर रहे हैं, तो अंतिम bill के लिए उसी provider की billing देखें।[7][9][19][21]

यहां MTok का मतलब है 1,000,000 यानी 10 लाख tokens।

कीमत की परतें: सिर्फ $5 और $25 नहीं

Anthropic की pricing docs में Base Input Tokens, Cache Writes, Cache Hits और Output Tokens अलग-अलग columns में दिए गए हैं। इसलिए cost model भी इन्हें अलग-अलग रखकर बनाना चाहिए।[19]

खर्च का हिस्सादरकैसे समझें
Base input tokens$5 / MTokसामान्य input tokens, जिन्हें cache write/read के रूप में नहीं गिना गया है।[19]
Output tokens$25 / MTokClaude के जवाब में generated tokens।[19]
Prompt cache write, 5 मिनट TTL$6.25 / MTokreusable prompt cache पहली बार लिखने पर, 5 मिनट TTL के साथ।[19]
Prompt cache write, 1 घंटा TTL$10 / MTokreusable prompt cache पहली बार लिखने पर, 1 घंटे TTL के साथ।[19]
Cache read / hit$0.50 / MTokपहले से cached content पढ़ने यानी cache hit पर।[19]

सीधा निष्कर्ष: total tokens को एक average rate से multiply करना सुरक्षित तरीका नहीं है। अगर आपकी app में prompt caching है, तो input, output, cache write और cache read को अलग-अलग line items की तरह रखें।[19]

लागत का सूत्र: पहले तय करें cache है या नहीं

1. Prompt caching नहीं है

Basic formula:

cost = input_tokens ÷ 10,00,000 × 5 + output_tokens ÷ 10,00,000 × 25

उदाहरण के लिए, किसी request में 2,00,000 input tokens और 20,000 output tokens हैं, तो बिना cache के खर्च होगा:

$1.00 + $0.50 = $1.50
। यह Anthropic API की input/output दरों पर आधारित सीधा arithmetic है; इसमें किसी third-party platform की अलग fees शामिल नहीं हैं।[19]

2. Prompt caching चालू है

Cache के साथ formula को थोड़ा विस्तार देना होगा:

cost = base_input_tokens ÷ 10,00,000 × 5 + output_tokens ÷ 10,00,000 × 25 + cache_write_5m_tokens ÷ 10,00,000 × 6.25 + cache_write_1h_tokens ÷ 10,00,000 × 10 + cache_read_input_tokens ÷ 10,00,000 × 0.50

अगर आप सिर्फ 5 मिनट या सिर्फ 1 घंटे वाली TTL इस्तेमाल कर रहे हैं, तो उसी cache write component को रखें। Anthropic के streaming examples में usage के अंदर input_tokens, output_tokens, cache_creation_input_tokens और cache_read_input_tokens जैसे fields दिखते हैं; pricing docs भी cache write और cache hit को अलग-अलग rate देती हैं।[15][19]

Token कैसे गिनें: शब्दों या अक्षरों से अनुमान न लगाएं

API cost का अनुमान लगाने के लिए Hindi/English शब्दों की गिनती या character count पर भरोसा न करें। Anthropic का /v1/messages/count_tokens endpoint message भेजने से पहले token count निकालने के लिए बना है। Documentation के अनुसार यह Messages API जैसी structured input स्वीकार करता है, जिसमें system prompts, tools, images और PDFs तक शामिल हो सकते हैं, और response में total input tokens देता है। सभी active models token counting support करते हैं।[18]

व्यावहारिक तरीका यह है: जो payload असल में Messages API को भेजना है, वही payload पहले count_tokens को भेजें। इसमें system prompt, user/assistant messages, tool definitions, images या PDF blocks सब शामिल करें। इससे model call करने से पहले input token cost का बेहतर अंदाजा मिलता है और product में budget limit या warning लगाना आसान होता है।[18]

Request के बाद: असली हिसाब usage से करें

Request complete होने के बाद output text की length देखकर अनुमान लगाने के बजाय response के usage fields log करें। Anthropic के Messages API examples में response usage के अंदर input_tokens और output_tokens जैसे fields दिखते हैं; streaming docs cache-related fields जैसे cache_creation_input_tokens और cache_read_input_tokens भी दिखाती हैं।[15][17]

Streaming इस्तेमाल कर रहे हैं तो एक आम गलती से बचें: Anthropic docs के अनुसार message_delta event में आने वाले usage token counts cumulative होते हैं, यानी हर event का नया increment नहीं। अगर आप हर delta को जोड़ते चले गए, तो वही tokens बार-बार count हो सकते हैं।[15]

Team billing और month-end reconciliation

Per-request logs real-time monitoring के लिए अच्छे हैं, लेकिन team billing, workspace-level split या लंबे समय की cost analysis के लिए Anthropic का Usage & Cost Admin API ज्यादा उपयुक्त है। Official docs के अनुसार यह API organization के historical API usage और cost data तक programmatic, granular access देता है, और usage report को model, workspace तथा service tier जैसे dimensions से तोड़ा जा सकता है।[16]

इसका practical अर्थ है: app-side logs से per-request guardrails और alerts बनाएं, लेकिन official reconciliation के लिए Usage & Cost Admin API के historical usage/cost data को आधार बनाएं।[16]

Opus 4.7 पर upgrade करने से पहले token budget दोबारा चलाएं

Opus 4.7 में नया tokenizer आया है। Anthropic docs के अनुसार text processing में यह previous models की तुलना में लगभग 1x से 1.35x tokens इस्तेमाल कर सकता है, यानी content के हिसाब से लगभग 35% तक अधिक tokens; इसी वजह से /v1/messages/count_tokens Opus 4.7 और Opus 4.6 के लिए अलग token numbers लौटा सकता है।[20]

इसलिए $5 input और $25 output प्रति MTok की sticker price वही दिखने पर भी आपका वास्तविक bill वैसा ही रहेगा, यह मान लेना ठीक नहीं। अगर आप Opus 4.6 या उससे पुराने Claude model से Opus 4.7 पर जा रहे हैं, तो high-traffic prompts, लंबे context वाले workflows, tool definitions वाले payloads और सबसे महंगे production flows को फिर से /v1/messages/count_tokens पर चलाएं। इसके बाद alerts, rate limits और cost caps update करें।[18][20]

Quick checklist

  • API में model ID claude-opus-4-7 ही इस्तेमाल हो रहा है, यह confirm करें।[9]
  • Release से पहले representative payloads पर /v1/messages/count_tokens चलाएं।[18]
  • input_tokens, output_tokens, cache write और cache read को अलग-अलग store करें; सिर्फ total token count न रखें।[15][19]
  • Streaming में message_delta.usage cumulative है, इसलिए हर event को जोड़कर double-counting न करें।[15]
  • Team billing, workspace split और historical cost trend के लिए Usage & Cost Admin API देखें।[16]
  • Opus 4.7 पर migration से पहले नए tokenizer का असर अपने real prompts पर test करें।[20]

संक्षेप में: Claude Opus 4.7 की basic API rate याद रखना आसान है—input $5/MTok और output $25/MTok। लेकिन सही बिलिंग के लिए request से पहले count_tokens, request के बाद usage, और cost model में prompt caching व नए tokenizer—तीनों को साथ रखना जरूरी है।[18][19][20]

Studio Global AI

Search, cite, and publish your own answer

Use this topic as a starting point for a fresh source-backed answer, then compare citations before you share it.

Studio Global AI के साथ खोजें और तथ्यों की जांच करें

मुख्य निष्कर्ष

  • Anthropic API पर Claude Opus 4.7 की आधार दर $5 प्रति 10 लाख input tokens और $25 प्रति 10 लाख output tokens है; prompt caching अलग से गिनी जाती है।[19]
  • सही अनुमान के लिए request भेजने से पहले /v1/messages/count tokens चलाएं और request के बाद response के usage डेटा से वास्तविक खर्च मिलाएं।[17][18]
  • Opus 4.7 का नया tokenizer पुराने models की तुलना में text के लिए लगभग 1x से 1.35x tokens इस्तेमाल कर सकता है, इसलिए upgrade से पहले token budget दोबारा जांचना जरूरी है।[20]

लोग पूछते भी हैं

"Claude Opus 4.7 API का खर्च कैसे गिनें: $5/$25 से आगे की बात" का संक्षिप्त उत्तर क्या है?

Anthropic API पर Claude Opus 4.7 की आधार दर $5 प्रति 10 लाख input tokens और $25 प्रति 10 लाख output tokens है; prompt caching अलग से गिनी जाती है।[19]

सबसे पहले सत्यापित करने योग्य मुख्य बिंदु क्या हैं?

Anthropic API पर Claude Opus 4.7 की आधार दर $5 प्रति 10 लाख input tokens और $25 प्रति 10 लाख output tokens है; prompt caching अलग से गिनी जाती है।[19] सही अनुमान के लिए request भेजने से पहले /v1/messages/count tokens चलाएं और request के बाद response के usage डेटा से वास्तविक खर्च मिलाएं।[17][18]

मुझे अभ्यास में आगे क्या करना चाहिए?

Opus 4.7 का नया tokenizer पुराने models की तुलना में text के लिए लगभग 1x से 1.35x tokens इस्तेमाल कर सकता है, इसलिए upgrade से पहले token budget दोबारा जांचना जरूरी है।[20]

मुझे आगे किस संबंधित विषय का पता लगाना चाहिए?

अन्य कोण और अतिरिक्त उद्धरणों के लिए "Claude Security पब्लिक बीटा: Anthropic का AI कोड-सुरक्षा स्कैनर क्या करता है" के साथ जारी रखें।

संबंधित पृष्ठ खोलें

मुझे इसकी तुलना किससे करनी चाहिए?

इस उत्तर को "Grok 4.3 API: 1M context, सस्ती token pricing और xAI की वॉइस रणनीति" के सामने क्रॉस-चेक करें।

संबंधित पृष्ठ खोलें

अपना शोध जारी रखें

अनुसंधान वार्तालाप

आप

शोध प्रश्न

搜尋及事實查核:Claude Opus 4.7 幾錢?token 點計先最清楚?

Studio Global AI29 स्रोत

उद्धृत उत्तर

如果你講嘅係 Anthropic API,Claude Opus 4.7 官方價目前係每百萬 input tokens 收 $5、每百萬 output tokens 收 $25;如果用 prompt caching,5 分鐘 cache write 係 $6.25/MTok、1 小時 cache write 係 $10/MTok、cache hit/refresh 係 $0.50/MTok。[3] 而且 Opus 4.7 用咗新 tokenizer,官方話同一段固定文字相比舊模型可能會多用最多約 35% tokens,所以「標價冇變」唔代表實際成本一定同舊版一樣。[3][8]

  • 官方 models 頁面列明 Claude Opus 4.7 已經係 generally available,API model ID 係 claude-opus-4-7,定價同上面一致。[2]

  • 最清楚嘅 token 計法,唔好自己估字數,直接用官方 /v1/messages/count_tokens;Anthropic 話呢個 token counting endpoint 接受同 Messages API 一樣嘅結構化輸入,可以喺送出前先計好 input tokens。[9]

  • 送出 request 之後,再睇 API 回傳嘅 usage 欄位;官方文件示例顯示會有 input_tokensoutput_tokens,以及快取相關欄位如 cache_creation_input_tokenscache_read_input_tokens[5]

  • 如果你用 streaming,message_delta 入面見到嘅 usage token counts 係累積值,不是每個 event 單獨新增值。[5]

  • 如果你想對帳最準,官方建議用 Usage & Cost Admin API,因為佢提供歷史 usage 同 cost 資料,並強調可以攞到較精確嘅 token counts,而唔係只靠單次 response 去估。[6]

  • 實際計錢公式,最易記係:

    • 無 cache:
      成本 = (input_tokens / 1,000,000 × $5) + (output_tokens / 1,000,000 × $25)
      [3]
    • 有 cache:再加上 cache_creation_input_tokens 對應 write 價,並把 cache_read_input_tokens 按 $0.50/MTok 去計。[3][5]
  • 例子:如果一次 request 用咗 200,000 input tokens 同 20,000 output tokens,未計 cache 時大約係 $1.00 + $0.50 = $1.50。[3]

  • 要留意,Opus 4.7 新 tokenizer 可能令同一段 prompt 比舊 model 食多 token,所以你如果由 Opus 4.6 轉過去,最好先跑一次 count_tokens 再改 budget。[8][9]

如果你想,我可以下一步直接幫你整一個「Claude Opus 4.7 成本速算表」:輸入 prompt token、output token、cache 有冇開,我即刻幫你計到每次 request 幾錢。

सूत्र

  • [7] Claude Opus 4.7 pricing & specs — Anthropic | CloudPricecloudprice.net

    Claude Opus 4.7. Claude Opus 4.7isAnthropic logoAnthropic's language model with a 1.0M context window and up to 128K output tokens, available from 7 providers, starting at $5.00 / 1M input and $25.00 / 1M output. Canonical ID anthropic-claude-4-7-opus . Ama...

  • [9] Introducing Claude Opus 4.7 - Anthropicanthropic.com

    Skip to main contentSkip to footer. Developers can use claude-opus-4-7 via the Claude API. . . ![Image 5: logo](

  • [15] Streaming Messages - Claude API Docsplatform.claude.com

    event: message startevent: message startdata: {"type":"message start","message":{"id":"msg 01G...","type":"message","role":"assistant","model":"claude-opus-4-6","content":[],"stop reason":null,"stop sequence":null,"usage":{"input tokens":2679,"cache creatio...

  • [16] Usage and Cost API - Claude API Docsplatform.claude.com

    Usage and Cost API. The Usage & Cost Admin API provides programmatic and granular access to historical API usage and cost data for your organization. Leading observability platforms offer ready-to-use integrations for monitoring your Claude API usage and co...

  • [17] Using the Messages API - Claude API Docsplatform.claude.com

    !/bin/sh !/bin/shcurl \ curl \ --header "x-api-key: $ANTHROPIC API KEY" \ --header "x-api-key: $ANTHROPIC API KEY " \ --header "anthropic-version: 2023-06-01" \ --header "anthropic-version: 2023-06-01" \ --header "content-type: application/json" \ --header...

  • [18] Token counting - Claude API Docsplatform.claude.com

    Token counting. Token counting enables you to determine the number of tokens in a message before sending it to Claude, helping you make informed decisions about your prompts and usage. With token counting, you can. How to count message tokens. The token cou...

  • [19] Pricing - Claude API Docsplatform.claude.com

    The "Base Input Tokens" column shows standard input pricing, "Cache Writes" and "Cache Hits" are specific to prompt caching, and "Output Tokens" shows output pricing. Prompt caching multipliers apply on top of fast mode pricing. Fast mode is not available w...

  • [20] What's new in Claude Opus 4.7platform.claude.com

    Claude Opus 4.7 introduces task budgets. This new tokenizer may use roughly 1x to 1.35x as many tokens when processing text compared to previous models (up to 35% more, varying by content), and /v1/messages/count tokens will return a different number of tok...

  • [21] Claude Opus 4.7 API Pricing 2026 - Costs, Performance & Providerspricepertoken.com

    Join the conversation on AI models, pricing, and tools. Price Per TokenPrice Per Token. Claude Opus 4.7 API Pricing 2026. Compare pricing, benchmarks, and providers for Claude Opus 4.7. Pricing starts at $5.00 per million input tokens and $25.00 per million...

Claude Opus 4.7 API का खर्च कैसे गिनें: $5/$25 से आगे की बात | उत्तर | Studio Global