Anthropic: claude-4-sonnetAPI pricing
claude-4-sonnet is a language model from Anthropic. It reads and writes text.
- 每100万枚代币的价格
- $3.46 / $17.30input / output
- 缓存的输入
- $3.46per 1M tokens
- 上下文
- 200K tokens
- 服务提供商
- 1
服务提供商
1 provider ·
价格走势
API
curl https://api.opencheap.si/v1/chat/completions \
-H "Authorization: Bearer $OPENCHEAP_API_KEY" -H "Content-Type: application/json" \
-d '{ "model": "opencheap/claude-4-sonnet", "messages": [{ "role": "user", "content": "Hi" }] }'import os
from openai import OpenAI
client = OpenAI(base_url="https://api.opencheap.si/v1", api_key=os.environ["OPENCHEAP_API_KEY"])
r = client.chat.completions.create(model="opencheap/claude-4-sonnet",
messages=[{"role": "user", "content": "Hi"}])
print(r.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.opencheap.si/v1", apiKey: process.env.OPENCHEAP_API_KEY });
const r = await client.chat.completions.create({ model: "opencheap/claude-4-sonnet",
messages: [{ role: "user", content: "Hi" }] });
console.log(r.choices[0].message.content);致电 claude-4-sonnet 使用 OpenAI SDK:将其指向 https://api.opencheap.si/v1 并传递模型 ID opencheap/claude-4-sonnet;其余代码保持不变。
About claude-4-sonnet
- 请求示例
- $0.05210,000 in + 1,000 out
- 端点
https://api.opencheap.si/v1- 模型 ID
每个请求都会发送给模型中成本最低且状态正常的提供者,而每个响应都会报告其成本为 使用成本. Every model on OpenCheap is called with one key at the same OpenAI-compatible endpoint, https://api.opencheap.si/v1.
用文字表述价格
claude-4-sonnet costs from $3.46 per 1M input tokens and $17.30 per 1M output tokens on OpenCheap. It has no public list price to compare with. At that price, a request with 10,000 input tokens and 1,000 output tokens costs about $0.052, and 1,000 such requests about $51.89.
One provider serves claude-4-sonnet on OpenCheap today. Its context window is 200K tokens (200,000), room for roughly 150,000 words of English in one request.
claude-4-sonnet is one of 26 Anthropic models on OpenCheap.
Prices as of 2026-12-04 11:48 UTC.
关于定价的问题
How much does the claude-4-sonnet API cost per 1M tokens?
claude-4-sonnet costs from $3.46 per 1M input tokens and $17.30 per 1M output tokens on OpenCheap. Prices as of 2026-12-04 11:48 UTC.
What does one claude-4-sonnet request cost?
A request with 10,000 input tokens and 1,000 output tokens costs about $0.052, and 1,000 such requests about $51.89. Every answer reports its own cost in usage.cost.
Which providers serve claude-4-sonnet?
One provider serves claude-4-sonnet on OpenCheap today. Each request goes to the cheapest healthy provider of the model; the table on this page lists every provider with its price, speed and uptime.
What is the context window of claude-4-sonnet?
Its context window is 200K tokens (200,000), room for roughly 150,000 words of English in one request.
How do I call the claude-4-sonnet API?
Point the OpenAI SDK at https://api.opencheap.si/v1 and pass the model id opencheap/claude-4-sonnet. One OpenCheap key works for every model; the rest of your code stays the same.
Anthropic 的更多内容
- 克劳德·索内特 5克劳德-十四行诗-5每1M·1M语境 $1.10 / $5.50
- 克劳德 作品5.5克劳德-作品第5.5号每1M·1M上下文 $2.00 / $10.00
- claude-4-opusclaude-4-opus$17.33 / $86.67 per 1M · 200K context
- 克劳德·法布尔 5克劳德寓言-56.90 美元 / 34.50 美元(每 1M · 1M 上下文)
- 克劳德·法布尔 5.1claude-fable-5.1每1M · 1M上下文 $7.00 / $35.00
- 克劳德·法布尔 5.2claude-fable-5.2$5.51 / $27.56 per 1M · 1M context
- 克劳德·俳句 4.5claude-haiku-4.5每100万·20万语境 $0.40 / $2.00
- claude-haiku-4.5-20251001claude-haiku-4.5-20251001$1.05 / $5.26 per 1M · 200K context
类似型号
- Sonar ProPerplexity · 200K context$3.15 / $15.75 per 1M9 % cheaper
- Grok 4xAI · 256K context$3.15 / $15.76 per 1M9 % cheaper
- grok-3xAI · 131K context$3.15 / $15.74 per 1M9 % cheaper
- GPT 5.5OpenAI · 100万上下文$2.00 / $12.00 per 1M31 % cheaper
- GPT 5.6 Sol ProOpenAI · 100万上下文$4.00 / $20.00 per 1M
- Cohere Command ACohere · 256K context$2.50 / $10.00 per 1M41 % cheaper
Compare claude-4-sonnet with any model →Cheapest LLM APICheap Claude API