Anthropic Claude Sonnet 4.6 — a balanced frontier model delivering strong reasoning at production speed and cost.

Sampling temperature. Lower is more deterministic.
美元估算 $0.002-$0.004:最高充值套餐按 $1 = 2,000 积分计算;入门套餐按 $1 = 1,000 积分计算。

历史记录
保存在此浏览器本地
0 个运行中 · 0 个已完成
输入
≈ $0.0004-$0.0008
输出
≈ $0.0019-$0.0037
缓存读取
≈ $0.000025-$0.00005
上下文
最大输出
API 说明
通过标准 REST API 调用该模型。使用 API Key 鉴权后,在下方选择端点即可查看其参数与示例。
鉴权
每个请求都需要在 Authorization 头中携带 Bearer 令牌。请在控制台创建 API Key。
Authorization: Bearer YOUR_API_KEYhttps://apiany.ai/v1/chat/completions请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | 字符串 | 必填 | 要调用的模型标识,使用该模型的 ID。 |
messages | 数组 | 必填 | OpenAI 对话格式的消息历史(role + content)。 |
stream | 布尔值 | 可选 | 为 true 时,响应将以 SSE 流式返回。 |
请求示例
curl "https://apiany.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"messages": [
{
"role": "user",
"content": "Summarize the following text in three concise bullet points:"
}
],
"temperature": 0.7,
"max_tokens": 1024
}'响应示例
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "claude-sonnet-4-6",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 18,
"total_tokens": 30
}
}