claude-sonnet-5claude-sonnet-5 via AI Gateway: claude-sonnet-5 delivers most of the Opus capability at a fraction of the cost — the balanced default for production Claude workloads, with 1M-context channels.
claude-sonnet-5 delivers most of the Opus capability at a fraction of the cost — the balanced default for production Claude workloads, with 1M-context channels.
In production workloads: claude-sonnet-5 delivers most of the Opus capability at a fraction of the cost — the balanced default for production Claude workloads, with 1M-context channels.
Published reference results: Agents' Last Exam 40.5%.
In detail:
Everyday coding assistant — In-IDE completion, explanation, test generation.
High-volume agent steps — The bulk of intermediate steps in agent flows.
As a trade-off of its positioning: claude-sonnet-5 is positioned as a balanced model — pick the tier that matches your task; specs and prices always follow the live catalog.
Start with a small share of traffic, watch token consumption and task success rate, then scale.
| Model | Tier | Best for |
|---|---|---|
claude-sonnet-5-fd | balanced | Everyday coding assistant |
claude-sonnet-5-kiro | balanced | Everyday coding assistant |
Prompts are forwarded only to the provider selected in your request and are never used for training by the platform. API keys are stored in isolation and traffic is encrypted with TLS. Teams with data-residency requirements can pick an open-weight model from this catalog and self-host entirely inside their own environment.
Anthropic 以 Constitutional AI 与安全对齐研究著称,Claude 系列在编程、长文分析与智能体任务上长期位居第一梯队,被大量工程团队作为默认模型。
For production, configure two layers of fallback: first to a lighter sibling tier within the same vendor, then to a comparable model from a different provider. Apply exponential-backoff retries to timeouts and rate limits, and de-duplicate non-idempotent requests with idempotency keys. The platform's unified error format means this logic is written once.
All models on AI Gateway bill per token in credits: input tokens, output tokens and cached tokens are metered separately, with cache hits billed at a steep discount. There is no subscription — top up credits once and spend them on any model on the site. Live per-million-token rates for this model are always available on the Models page, and credit packs are listed on the Pricing page. Because pricing changes as providers adjust their official rates, this page intentionally does not hard-code numbers.
Requests go through the same three endpoints for every provider: chat/completions (OpenAI format), responses (OpenAI Responses format) and, for Claude models, an Anthropic-compatible messages endpoint. Authentication is a single Bearer key issued in your dashboard. Your API key is stored in isolation, traffic is encrypted over TLS, and prompts are forwarded to the selected provider without being used for training. Streaming, function calling and structured output behave exactly as they do against the official APIs.
Because every model on the platform shares one request format, switching is a one-line change: replace the model string and compare outputs. A common pattern is to route easy traffic to a lighter sibling tier and escalate hard tasks to the flagship — measure token spend and task success rate per tier before committing. If you currently call the provider's official API, keep your existing SDK and change only the base URL and API key.
Model IDs follow the provider's own naming: the number indicates the generation, while suffixes indicate capability tiers (pro/high/max) or routing channels. This page always shows the exact model ID to pass in the API request — copy it from the specifications table above.
Specs and prices come from the platform's live catalog; performance figures come from vendor or third-party publications. Page updated 2026-10-13。
| API model ID | claude-sonnet-5 |
| Provider | Anthropic |
| Context window | — |
Billing is per token in credits — live rates on the Models pricing page.
Figures as published by the vendor or third parties. For reference only.
| Benchmark | Score |
|---|---|
| Agents' Last Exam | 40.5% |
In-IDE completion, explanation, test generation.
The bulk of intermediate steps in agent flows.
This model is served through the site's unified OpenAI-compatible API (Bearer auth). Endpoints: POST /api/ai/v1/chat/completions · API docs →
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://your-domain.com/api/ai/v1"
)
response = client.chat.completions.create(
model="claude-sonnet-5",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, introduce yourself"}
]
)
print(response.choices[0].message.content)stream = client.chat.completions.create(
model="claude-sonnet-5",
messages=[{"role": "user", "content": "Write a short poem about autumn"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")curl https://your-domain.com/api/ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [{"role": "user", "content": "Hello"}],
"stream": false
}'Claude models are also callable in Anthropic's native format:
curl https://your-domain.com/api/ai/v1/anthropic/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello"}]
}'Replace your-domain.com with your site domain.
Specialized audio model — not applicable.
Per-token credit billing with cache-hit discounts. Live rates on the Models page.
No. One AI Gateway API key covers this model and every other model on the site.
One API key for every model. Credits never expire.
Create free account