- anthropic/claude-sonnet-5
anthropic/claude-sonnet-5
1M संदर्भ · $0.80 / M इनपुट टोकन · $4.00 / M आउटपुट टोकन
Claude Sonnet 5 Anthropic का most agentic Sonnet model है, जिसमें coding, agents और professional work में Opus से कम price पर frontier performance है।
ऐतिहासिक अपटाइम डेटा समय के साथ एकत्र होता है। वर्तमान स्थिति नवीनतम स्वास्थ्य जांच को दर्शाती है।
मूल्य निर्धारण
उपयोग के अनुसार भुगतान
कोई अग्रिम लागत नहीं, केवल उतने के लिए भुगतान करें जितना आप उपयोग करते हैं
API उपयोग
API एक्सेस गाइड
कोड उदाहरण
इस मॉडल के लिए OurToken API endpoint का उपयोग करें। नीचे दिए गए उदाहरण direct HTTP requests और मॉडल परिवार के लिए recommended endpoint का उपयोग करते हैं।
curl https://api.ourtoken.ai/v1/messages \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"max_tokens": 256
}'Messages API संदर्भ
OurToken के माध्यम से Claude Messages-संगत response बनाएँ। यह format messages array, max_tokens, optional system prompts, tools, और thinking settings का उपयोग करता है।
प्राधिकरण
| Content-Type | application/json |
| Authorization | Bearer YOUR_API_KEY |
अनुरोध सामग्री
| फ़ील्ड | प्रकार | आवश्यक | विवरण |
|---|---|---|---|
| model | string | आवश्यक | कॉल करने के लिए Model ID। |
| messages | array<object> | आवश्यक | model को भेजे गए conversation messages। |
| system | string | array<object> | वैकल्पिक | Optional system prompt। |
| max_tokens | integer | आवश्यक | output tokens की अधिकतम संख्या। |
| temperature | number | वैकल्पिक | Sampling temperature। |
| top_p | number | वैकल्पिक | Nucleus sampling parameter। |
| top_k | integer | वैकल्पिक | Top-k sampling parameter। |
| stream | boolean | वैकल्पिक | क्या streaming response लौटाना है। |
| stop_sequences | array<string> | वैकल्पिक | generation रोकने वाली sequences। |
| tools | array<object> | वैकल्पिक | model के लिए उपलब्ध tools। |
| tool_choice | object | वैकल्पिक | model tools कैसे चुनता है, इसे नियंत्रित करता है। |
| thinking | object | वैकल्पिक | supported Claude models के लिए thinking configuration। |
| metadata | object | वैकल्पिक | Optional request metadata। |
प्रतिक्रिया सामग्री
| फ़ील्ड | प्रकार | आवश्यक | विवरण |
|---|---|---|---|
| id | string | आवश्यक | unique message identifier। |
| type | "message" | आवश्यक | Messages API द्वारा लौटाया गया object type। |
| role | "assistant" | आवश्यक | लौटाए गए message की role। |
| content | array<object> | आवश्यक | model द्वारा लौटाए गए content blocks की array। |
| content[].text | string | वैकल्पिक | लौटाए गए content block के अंदर text। |
| model | string | आवश्यक | वह model जिसने response बनाया। |
| stop_reason | string | वैकल्पिक | generation रुकने का कारण। |
| usage | object | वैकल्पिक | message के लिए token usage information। |
| usage.input_tokens | integer | वैकल्पिक | Input token count। |
| usage.output_tokens | integer | वैकल्पिक | Output token count। |
| usage.cache_creation_input_tokens | integer | वैकल्पिक | prompt cache में लिखे गए tokens। |
| usage.cache_read_input_tokens | integer | वैकल्पिक | prompt cache से पढ़े गए tokens। |
मॉडल परिचय
Anthropic claude-sonnet-5
Claude Sonnet 5 Anthropic का most agentic Sonnet model है, जिसमें coding, agents और professional work में Opus से कम price पर frontier performance है।
Claude Sonnet 5 को अब तक का most agentic Sonnet model बनने के लिए बनाया गया है, जिसमें planning, tool use, coding और multi-step reasoning में लाभ हैं जो इसे कम price पर Opus 4.8 quality के करीब लाते हैं। यह 128K तक output tokens के साथ 1M token context window support करता है, साथ ही low से x-high तक selectable effort levels के साथ adaptive thinking।
यह बेहतरीन क्यों है
- Coding, agents और professional work के लिए Anthropic का most agentic Sonnet model।
- Large codebases, long documents और multi-step planning के लिए 1M token context window।
- Low से x-high तक selectable effort levels के साथ adaptive thinking।
- Opus से कम price पर frontier coding और agentic performance।
- Standard Anthropic price के 40% पर OurToken unified API के माध्यम से accessible।
मुख्य विशेषताएँ
- Context Window: 1M tokens
- Max Output: 128K tokens
- Vision: Supported
- Function Calling: Supported
- Adaptive Thinking: Supported
- Input: Text, Image, PDF
- Output: Text
विशिष्टताएँ
Developers के लिए Claude Sonnet 5 API Features
Clear pricing, agentic coding workflows, Anthropic routing और long-context production development के लिए OurToken पर Claude Sonnet 5 API का उपयोग करें।
API Access
Familiar integration path बनाए रखते हुए OurToken के unified endpoint के माध्यम से Claude Sonnet 5 API call करें। Teams हर evaluation environment के लिए अलग Anthropic routing code maintain किए बिना provider behavior, token costs और production readiness compare कर सकती हैं।
Official Price Ratio
Current project data के आधार पर OurToken Claude Sonnet 5 को $0.80 input और $4.00 output per million tokens पर list करता है। इससे teams coding, agent या document workloads scale करने से पहले official API pricing का 40% पाती हैं।
Agentic Coding
Multi-file edits, bug investigation, test repair, migration planning, code review और architecture refactors के लिए Claude Sonnet 5 का उपयोग करें। claude sonnet 5 api खोजने वाले developers real repositories पर इसके tool use और long-context behavior evaluate कर सकते हैं।
Long Documents
Contracts, research reports, technical specifications और knowledge-base restructuring के लिए 1M token context window का लाभ उठाएं। जब किसी task को वास्तव में broader context चाहिए हो, तो Claude Sonnet 5 API chunking loss घटाता है।
Anthropic Workflows
जब आपके product को Sonnet pricing पर Opus-adjacent reasoning चाहिए हो, तब Anthropic Sonnet 5 requests को OurToken के माध्यम से route करें। एक API surface में Claude Sonnet 5 को Claude Opus 5 और Claude Opus 4.8 के विरुद्ध compare करें।
Structured Output
Document understanding, chart analysis और multimodal assistants के लिए text, image और PDF inputs भेजें। Claude Sonnet 5 API predictable downstream automation paths के लिए function calling और structured output patterns support करता है।
OurToken पर Claude Sonnet 5 API का उपयोग कैसे करें
API key बनाएं, Claude Sonnet 5 API चुनें, pricing compare करें, फिर agentic coding और long-context workflows test करें।
API Key Generate करें
OurToken API key बनाएं और उसे secure server-side environment variable में store करें। इससे आपका backend browser या client-side code में secrets expose किए बिना Claude Sonnet 5 API calls के लिए stable credential पाता है।
01Model ID Select करें
Chat completions requests भेजते समय model value के रूप में claude-sonnet-5 का उपयोग करें। Claude Sonnet 5 API access, Anthropic providers और environments में production routing options compare कर रहे developers के लिए model ID स्पष्ट रूप से document करें।
02Unified API Call करें
अपने OpenAI-compatible client के साथ OurToken के unified API endpoint के माध्यम से requests भेजें। यह Claude Sonnet 5 Anthropic access, pricing review और model comparison को अलग provider-specific code paths के बजाय एक integration में रखता है।
03Pricing Compare करें
Traffic scale करने से पहले OurToken price को official API pricing और expected token volume के विरुद्ध compare करें। Real production workloads के लिए Claude Sonnet 5 API cost estimate करने हेतु current $0.80 input और $4.00 output rates का उपयोग करें।
04Agentic Coding Test करें
Multi-file edits, bug investigation, test repair और migration planning जैसे representative Claude Sonnet 5 tasks run करें। Files, failing tests, coding conventions और acceptance criteria शामिल करें ताकि model practical constraints पर reason कर सके।
05Production Fit Validate करें
Production route चुनने से पहले accuracy, latency, token usage, structured output behavior और tool-call reliability measure करें। Track करें कि practice में Sonnet 5 workflows smaller या cheaper models की तुलना में review cycles घटाते हैं या नहीं।
06Claude Sonnet 5 FAQ
Claude Sonnet 5 API pricing, agentic coding workflows, Anthropic access, context limits और Claude 3.5 Sonnet के साथ comparison के बारे में उत्तर।