APIMODELSAPIMODELS
All
Models/Claude Sonnet 5
Anthropic

Claude Sonnet 5 API

claude-sonnet-5

Claude Sonnet 5 is the Sonnet generation before Claude Sonnet 5.5 (Anthropic's newest Sonnet, released 28 September 2026) — a 1M-token context window (both the default and the maximum; there is no smaller-context variant), up to 128K output tokens, adaptive thinking, and the same tools and platform features as Claude Sonnet 4.6 (Priority Tier is the one exception — Sonnet 5 does not support it). On APIMODELS it's $1.60 input / $8.00 output per 1M tokens (20% below official), with prompt caching support (cache reads at $0.10/M, cache writes at $1.40/M). Note that billed output tokens include the model's internal thinking tokens, matching Anthropic's own billing. Use it through the Anthropic Messages API (/v1/messages) — the native path for Claude Code, the Anthropic SDK, and Anthropic-compatible clients like Cursor — with native tool use (function calling). Request params match Claude Opus 4.8.

1M ContextAdaptive Thinking128K OutputTool Calling
Input$1.60
Output$8.00
per 1M tokens
99.8% success over the last 30 days
Content-policy refusals and malformed requests excluded. Failed calls are never billed.

API Documentation

View complete API reference with all parameters and examples.

View Docs

Advanced Features

Streaming

Enable real-time streaming responses with Server-Sent Events.

{
  "model": "claude-sonnet-5",
  "stream": true,
  "max_tokens": 1024,
  "messages": [...]
}

Function Calling (Tools)

Enable Claude to use tools and call functions.

{
  "model": "claude-sonnet-5",
  "max_tokens": 1024,
  "tools": [{
    "name": "get_weather",
    "description": "Get current weather for a location",
    "input_schema": {
      "type": "object",
      "properties": {
        "location": {"type": "string", "description": "City name"}
      },
      "required": ["location"]
    }
  }],
  "tool_choice": {"type": "auto"},
  "messages": [{"role": "user", "content": "What's the weather in Tokyo?"}]
}

PDF Support

Analyze PDF documents by sending them as base64 encoded content.

{
  "model": "claude-sonnet-5",
  "max_tokens": 1024,
  "messages": [{
    "role": "user",
    "content": [{
      "type": "document",
      "source": {
        "type": "base64",
        "media_type": "application/pdf",
        "data": "<base64_encoded_pdf>"
      }
    }, {
      "type": "text",
      "text": "Summarize this document."
    }]
  }]
}

Structured Output (JSON Schema)

Get structured JSON responses that match your schema.

{
  "model": "claude-sonnet-5",
  "max_tokens": 1024,
  "output_format": {
    "type": "json_schema",
    "schema": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "age": {"type": "integer"}
      },
      "required": ["name", "age"]
    }
  },
  "messages": [{"role": "user", "content": "Extract info: John is 30 years old"}]
}

Web Search

Enable Claude to search the web for up-to-date information.

{
  "model": "claude-sonnet-5",
  "max_tokens": 1024,
  "tools": [{
    "type": "web_search_20250305",
    "name": "web_search",
    "max_uses": 5
  }],
  "messages": [{"role": "user", "content": "What's the latest news about AI?"}]
}

API Parameters Reference

ParameterTypeRequiredDescription
modelstringYesModel identifier (e.g., claude-sonnet-5)
messagesarrayYesArray of message objects with role and content
max_tokensintegerYesMaximum tokens in the response (1 - 128000)
systemstringNoSystem prompt to set context
streambooleanNoEnable streaming responses (SSE)
temperaturenumberNoSampling temperature (0.0 - 1.0)
top_pnumberNoNucleus sampling threshold (0.0 - 1.0)
top_kintegerNoTop-k sampling (0 - infinity)
stop_sequencesarrayNoSequences that stop generation
toolsarrayNoFunction calling tools definition
tool_choiceobjectNoTool selection strategy (auto/any/tool)
thinkingobjectNoEnable extended thinking mode
output_formatobjectNoStructured output with JSON schema

Full API Documentation

View complete API reference with streaming, thinking, and more.

View Documentation

Pricing

Input
$1.60
per 1M tokens
Output
$8.00
per 1M tokens

Billing: Cost = (input_tokens * input_price + output_tokens * output_price) / 1,000,000

1M Token Context

Default and maximum — no smaller variant

Adaptive Thinking

Extended reasoning when the task needs it

128K Max Output

Long, complete responses in one call

Tools + Claude Code / Cursor

Native tool use via the Anthropic Messages API

TL;DR Claude Sonnet 5 is an Anthropic large language model, callable via APIMODELS' unified API (model name `claude-sonnet-5`). Pricing: Input: $1.60, Output: $8.00 per 1M tokens. One API key for all image / video / LLM / audio models.

About Claude Sonnet 5

Claude Sonnet 5 is a Large Language Model API provided by Anthropic. Claude Sonnet 5 is the Sonnet generation before Claude Sonnet 5.5 (Anthropic's newest Sonnet, released 28 September 2026) — a 1M-token context window (both the default and the maximum; there is no smaller-context variant), up to 128K output tokens, adaptive thinking, and the same tools and platform features as Claude Sonnet 4.6 (Priority Tier is the one exception — Sonnet 5 does not support it). On APIMODELS it's $1.60 input / $8.00 output per 1M tokens (20% below official), with prompt caching support (cache reads at $0.10/M, cache writes at $1.40/M). Note that billed output tokens include the model's internal thinking tokens, matching Anthropic's own billing. Use it through the Anthropic Messages API (/v1/messages) — the native path for Claude Code, the Anthropic SDK, and Anthropic-compatible clients like Cursor — with native tool use (function calling). Request params match Claude Opus 4.8. Through APIMODELS platform, you can access this model via a unified API with transparent pay-as-you-go pricing. Current pricing: Input: $1.60, Output: $8.00 per 1M tokens.

Key Features

  • 1M Token Context -- Default and maximum — no smaller variant
  • Adaptive Thinking -- Extended reasoning when the task needs it
  • 128K Max Output -- Long, complete responses in one call
  • Tools + Claude Code / Cursor -- Native tool use via the Anthropic Messages API

Use Cases

Chatbot & Customer Support

Build intelligent conversational systems to automatically answer user queries and improve service efficiency.

Content Generation

Automatically write articles, emails, ad copy, and other text content to boost productivity.

Code Assistant

Assist with code writing, debugging, and code review to accelerate software development.

Data Analysis

Understand and analyze unstructured data, extract key insights, and generate summary reports.

Why APIMODELS

  • Unified API -- One API key to access all models, no need to register on multiple platforms
  • Transparent Pricing -- Pay-as-you-go with per-call pricing published on every model page, ideal for indie developers and startups
  • Instant Access -- Start right after signup; pay by card, PayPal, Alipay or USDT
  • Full Documentation -- Detailed API docs with code examples in cURL, Python, and Node.js

Frequently Asked Questions

How much does Claude Sonnet 5 cost?

Claude Sonnet 5 is available through APIMODELS at: Input: $1.60, Output: $8.00 per 1M tokens. Billing is pay-as-you-go — you only pay for what you generate.

How to use Claude Sonnet 5 API?

Sign up at APIMODELS, get your API key, and call our unified API endpoint. We provide detailed API documentation with code examples in cURL, Python, and Node.js.

What is the difference between APIMODELS and the official Anthropic API?

APIMODELS offers the same Claude Sonnet 5 model through our aggregation platform. We provide a unified API interface so you do not need separate accounts for each provider - one API key to access all models.

What is Claude Sonnet 5 and what makes it special?

Claude Sonnet 5 is the Sonnet generation before Claude Sonnet 5.5, Anthropic's newest Sonnet (released 28 September 2026): a 1M-token context window (both default and maximum — there's no smaller-context variant), up to 128K output tokens, adaptive thinking, and the same tools and platform features as Claude Sonnet 4.6, with one exception — it does not support Priority Tier. On apimodels.app it's $1.60 input / $8.00 output per 1M tokens (20% below official pricing), balancing capability with a low price.

Can I use Sonnet 5 with Claude Code or Cursor? Does it support tools / function calling?

Yes — Sonnet 5 supports native tool use (function calling) through the Anthropic Messages API (/v1/messages), the format Claude Code and the Anthropic SDK use. Point ANTHROPIC_BASE_URL at https://api.apimodels.app, set the model to claude-sonnet-5, and use your apimodels API key (see /docs/claude-code). Anthropic-API-compatible clients like Cursor work too when configured as a custom Anthropic model. Send tools in Anthropic format ({name, input_schema}); request params are identical to Claude Opus 4.8.

How is Sonnet 5 priced? Is there a cache discount?

Input $1.60 / output $8.00 per 1M tokens. Prompt caching is supported: cache-read (hit) tokens are billed at just $0.1/M — 16× more affordable than the input rate — and cache writes at $1.4/M. The 1M-token context plus caching makes it ideal for long documents, long sessions, and agentic coding.

Sonnet 5 vs Sonnet 5.5 vs Sonnet 4.6 vs Opus 4.8 — which should I pick?

The newest Sonnet is Sonnet 5.5 (claude-sonnet-5-5): $1.20/$6.00 here, below Sonnet 5 ($1.60/$8.00) on both input and output, and Anthropic reports it over 30% faster than Sonnet 5 with up to 30% lower cost per task — start new work there. Sonnet 5 stays available for projects already tuned on it that are not ready to migrate, or for very cache-heavy traffic (its cache rates are slightly lower). Sonnet 4.6 is an earlier generation; Opus 4.8 ($3/$13) is for the hardest long-horizon agentic reasoning. All share one API key so you can switch by task.

What can Claude Sonnet 5 do?

Claude Sonnet 5 supports: 1M Context, Adaptive Thinking, 128K Output, Tool Calling. See the APIMODELS docs for full parameters and call examples.

Can I use the Claude Sonnet 5 API from any country, including mainland China?

Yes. APIMODELS does not restrict access by country: the site and the API answer requests from anywhere, and apimodels.app and api.apimodels.app are reachable directly from mainland China without a proxy. You call Claude Sonnet 5 with one APIMODELS key, so you do not need a separate account with the model's developer.

What payment methods are supported? Can I pay with PayPal or crypto?

Yes to both. You can top up with a card (Visa, Mastercard and others, through Stripe), PayPal, Alipay, or USDT on TRON (TRC20) or BNB Smart Chain (BEP20). Card, PayPal and Alipay top-ups are credited immediately; USDT is credited once the transfer confirms on-chain. Auto top-up is optional, and a $50 top-up adds a $1 bonus ($3 on a $100 top-up). The balance is in USD and billed per use, with no subscription.

Related models