Claude Sonnet 4 API
ANTHROPIC · Chat, Vision · 200K context
from $2.25 / 1M input tokens -25% vs OpenRouter
Claude Sonnet 4 由 Anthropic 出品,支持 200K 上下文,具备卓越的推理与编程能力。TokenSail 提供 Claude Sonnet 4 API,输入价格 $2.25/百万 token,比官方价 $3.00 便宜 25%。通过 TokenSail 统一 OpenAI 兼容网关,轻松接入 Anthropic 顶级模型。
Pricing Comparison
| Provider | Input / 1M tokens | Output / 1M tokens | Savings |
|---|---|---|---|
| TokenSail | $2.25 | $11.25 | — |
| OpenRouter | $3.00 | $15.00 | -25% |
| Official | $3.00 | $15.00 | -25% |
Quick Start
from openai import OpenAI
client = OpenAI(
base_url="https://api.tokensail.ai/v1",
api_key="YOUR_TOKENSAIL_API_KEY"
)
response = client.chat.completions.create(
model="claude-sonnet-4",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
Specifications
- Provider: ANTHROPIC
- Context Window: 200K
- Capabilities: Chat, Vision
- API Endpoint: POST https://api.tokensail.ai/v1/chat/completions
- Model ID: claude-sonnet-4