Anthropic

anthropic/claude-sonnet-5

1M context · $0.80 / M input tokens · $4.00 / M output tokens

Claude Sonnet 5 is Anthropic's most agentic Sonnet model, with frontier performance across coding, agents, and professional work at a lower price than Opus.

Get API Key
24H Status Monitor

Historical uptime data is collected over time. Current status reflects the latest health check.

Pricing

Pay-per-use

No upfront costs, pay only for what you use

40% of official price
Input$2.00 / M$0.80 / M Tokens
Output$10.00 / M$4.00 / M Tokens
Cached input$0.20 / M$0.08 / M Tokens
Cache writes$2.50 / M$1.00 / M Tokens

API Usage

API Access Guide

Base URLhttps://api.ourtoken.ai/v1
API Endpointmessages
Full URLhttps://api.ourtoken.ai/v1/messages
Model IDclaude-sonnet-5
Get API Key

Code examples

Use the OurToken API endpoint for this model. The examples below use direct HTTP requests and the recommended endpoint for the model family.

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 Reference

Create a Claude Messages-compatible response through OurToken. This format uses a messages array, max_tokens, optional system prompts, tools, and thinking settings.

Authorization

Content-Typeapplication/json
AuthorizationBearer YOUR_API_KEY

Request Body

FieldTypeRequiredDescription
modelstringRequiredModel ID to call.
messagesarray<object>RequiredConversation messages sent to the model.
systemstring | array<object>OptionalOptional system prompt.
max_tokensintegerRequiredMaximum number of output tokens.
temperaturenumberOptionalSampling temperature.
top_pnumberOptionalNucleus sampling parameter.
top_kintegerOptionalTop-k sampling parameter.
streambooleanOptionalWhether to return a streaming response.
stop_sequencesarray<string>OptionalSequences that stop generation.
toolsarray<object>OptionalTools available to the model.
tool_choiceobjectOptionalControls how the model selects tools.
thinkingobjectOptionalThinking configuration for supported Claude models.
metadataobjectOptionalOptional request metadata.

Response Body

FieldTypeRequiredDescription
idstringRequiredUnique message identifier.
type"message"RequiredObject type returned by the Messages API.
role"assistant"RequiredRole of the returned message.
contentarray<object>RequiredArray of content blocks returned by the model.
content[].textstringOptionalText inside a returned content block.
modelstringRequiredModel that produced the response.
stop_reasonstringOptionalReason generation stopped.
usageobjectOptionalToken usage information for the message.
usage.input_tokensintegerOptionalInput token count.
usage.output_tokensintegerOptionalOutput token count.
usage.cache_creation_input_tokensintegerOptionalTokens written to prompt cache.
usage.cache_read_input_tokensintegerOptionalTokens read from prompt cache.

Model Introduction

Anthropic claude-sonnet-5

Claude Sonnet 5 is Anthropic's most agentic Sonnet model, with frontier performance across coding, agents, and professional work at a lower price than Opus.

Claude Sonnet 5 is built to be the most agentic Sonnet model yet, with gains in planning, tool use, coding, and multi-step reasoning that bring it close to Opus 4.8 quality at a lower price. It supports a 1M token context window with up to 128K output tokens, plus adaptive thinking with selectable effort levels from low through x-high.

Why It Looks Great

  • Anthropic's most agentic Sonnet model for coding, agents, and professional work.
  • 1M token context window for large codebases, long documents, and multi-step planning.
  • Adaptive thinking with selectable effort levels from low through x-high.
  • Frontier coding and agentic performance at a lower price than Opus.
  • Accessible via the OurToken unified API at 40% of the standard Anthropic price.

Key Features

  • Context Window: 1M tokens
  • Max Output: 128K tokens
  • Vision: Supported
  • Function Calling: Supported
  • Adaptive Thinking: Supported
  • Input: Text, Image, PDF
  • Output: Text

Specifications

ProviderAnthropic
Model TypeLarge Language Model (LLM)
ArchitectureTransformer (Frontier)
Context Window1M tokens
Max Output128K tokens
InputText, Image, PDF
OutputText
VisionSupported
Function CallingSupported
Adaptive ThinkingSupported

Claude Sonnet 5 API Features for Developers

Use Claude Sonnet 5 API on OurToken for clear pricing, agentic coding workflows, Anthropic routing, and long-context production development.

API Access

Call Claude Sonnet 5 API through OurToken's unified endpoint while keeping a familiar integration path. Teams can compare provider behavior, token costs, and production readiness without maintaining separate Anthropic routing code for every evaluation environment.

Official Price Ratio

OurToken lists Claude Sonnet 5 at $0.80 input and $4.00 output per million tokens, based on the current project data. That gives teams 40% of official API pricing before scaling coding, agent, or document workloads.

Agentic Coding

Use Claude Sonnet 5 for multi-file edits, bug investigation, test repair, migration planning, code review, and architecture refactors. Developers searching for claude sonnet 5 api can evaluate its tool use and long-context behavior on real repositories.

Long Documents

Leverage the 1M token context window for contracts, research reports, technical specifications, and knowledge-base restructuring. Claude Sonnet 5 API reduces chunking loss when a task genuinely needs broader context.

Anthropic Workflows

Route Anthropic Sonnet 5 requests through OurToken when your product needs Opus-adjacent reasoning at Sonnet pricing. Compare Claude Sonnet 5 against Claude Opus 5 and Claude Opus 4.8 in one API surface.

Structured Output

Send text, image, and PDF inputs for document understanding, chart analysis, and multimodal assistants. Claude Sonnet 5 API supports function calling and structured output patterns for predictable downstream automation paths.

How to Use Claude Sonnet 5 API on OurToken

Create an API key, choose Claude Sonnet 5 API, compare pricing, then test agentic coding and long-context workflows.

Generate API Key

Create an OurToken API key and store it in a secure server-side environment variable. This gives your backend a stable credential for Claude Sonnet 5 API calls without exposing secrets in browser or client-side code.

01

Select Model ID

Use claude-sonnet-5 as the model value when sending chat completions requests. Document the model ID clearly for developers comparing Claude Sonnet 5 API access, Anthropic providers, and production routing options across environments.

02

Call Unified API

Send requests through OurToken's unified API endpoint with your OpenAI-compatible client. This keeps Claude Sonnet 5 Anthropic access, pricing review, and model comparison inside one integration instead of separate provider-specific code paths.

03

Compare Pricing

Before scaling traffic, compare the OurToken price against official API pricing and expected token volume. Use the current $0.80 input and $4.00 output rates to estimate Claude Sonnet 5 API cost for real production workloads.

04

Test Agentic Coding

Run representative Claude Sonnet 5 tasks such as multi-file edits, bug investigation, test repair, and migration planning. Include files, failing tests, coding conventions, and acceptance criteria so the model can reason over practical constraints.

05

Validate Production Fit

Measure accuracy, latency, token usage, structured output behavior, and tool-call reliability before choosing a production route. Track whether Sonnet 5 workflows reduce review cycles compared with smaller or cheaper models in practice.

06

Claude Sonnet 5 FAQ

Answers about Claude Sonnet 5 API pricing, agentic coding workflows, Anthropic access, context limits, and comparison with Claude 3.5 Sonnet.

01

What is Claude Sonnet 5 API?

Claude Sonnet 5 API is an API route for using Anthropic's Sonnet 5 model in applications that need agentic coding, tool use, image input, function calling, and structured output. On OurToken, developers can review model access, current pricing, and production evaluation guidance in one place.
02

How much does Claude Sonnet 5 pricing cost on OurToken?

Claude Sonnet 5 API pricing on OurToken follows the current project data: $0.80 per million input tokens and $4.00 per million output tokens. The page shows original pricing as $2.00 and $10.00, giving teams 40% of official API pricing for planning workloads carefully.
03

How does Claude Sonnet 5 compare with Claude 3.5 Sonnet?

Claude Sonnet 5 is a substantially more agentic successor to Claude 3.5 Sonnet, with frontier performance across coding, agents, and professional work. Teams comparing Claude Sonnet 5 against claude 3.5 sonnet should focus on long-context tool use, multi-step reasoning, and current pricing.
04

Is Claude Sonnet 5 API useful for agentic coding workflows?

Yes. Claude Sonnet 5 is built for planning, tool use, coding, and multi-step reasoning. Developers use it for multi-file edits, bug investigation, test repair, migration planning, and code review in agentic pipelines that preserve task state across long tool-call chains.
05

What context window does Claude Sonnet 5 use here?

This OurToken page uses the project's current Claude Sonnet 5 data: a 1M token context window and up to 128K output tokens. Some competitor pages may describe different limits, so use the current project data when planning your integration and estimating prompt size for production.
06

How should I evaluate Claude Sonnet 5 API providers?

Compare Claude Sonnet 5 Anthropic access by availability, latency, reliability, price, image input, structured output, and tool calling. OurToken helps teams test Anthropic Sonnet 5 alongside other supported models through one unified API, but production decisions should use your own prompts and traffic patterns first.