跳转到主要内容
claude-sonnet-4-6 是 Claude 家族的生产主力 —— 当用户想要一个什么都能干且价格还在中档时,ByteSpike 客户多数会默认选它。Vision、tools、prompt 缓存、extended thinking、web search 全部齐活,且与 Opus 同为 200K 上下文;Opus 把质量上限留给硬核推理。 价格: 输入 3.00/1M,输出3.00 / 1M,输出 15.00 / 1M,缓存读取 $0.30 / 1M,缓存写入为输入的 1.25×(Anthropic 标准比例)—— 见费率卡

协议

协议路径
Anthropic MessagesPOST https://llm.bytespike.ai/v1/messages
OpenAI Chat Completions(shim)POST https://llm.bytespike.ai/v1/chat/completions
同样的输入下两套协议的响应等价;选你客户端已经在用的那种。

快速开始

curl https://llm.bytespike.ai/v1/messages \
  -H "x-api-key: $BYTESPIKE_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [
      { "role": "user", "content": "Hello, ByteSpike." }
    ]
  }'

能力

能力是否支持
Chat completions
流式(SSE)
Vision(图像输入)
Tool use(function calling)✅ 并行
Prompt 缓存(cache_control)
Extended thinking
Web search(web_search 工具)
JSON / 结构化输出
上下文窗口200K tokens

什么时候用

  • 默认中档。 需要一个 vision + tools + thinking + web search 全到位的模型,价格还在 Sonnet 档时。
  • Agent。 用 Anthropic Messages 端点;tool_usethinking 块原样透传。
  • RAG。 在长系统提示上挂 cache_control 摊销到多轮。首次请求按缓存写入档付费,后续命中同前缀的请求按 $0.30/1M(输入的 10%)付费。
  • 新鲜事实任务。 在 tools 数组里加 web_search
什么时候用:

下一步