跳转到主要内容

原生协议支持

本站所有 Anthropic 模型均可通过原生 /v1/messages 协议访问。比如激活 1M token 上下文,可使用如下请求
curl https://api.jiekou.ai/anthropic/v1/messages \
  -H "x-api-key: $API_KEY" \
  -H "anthropic-beta: context-1m-2025-08-07" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 1024,
    "messages": [
      {"role": "user", "content": "Process this large document..."}
    ]
  }'

Prompt caching

本站支持通过 Anthropic 协议或 OpenAI 兼容协议使用 Prompt caching。 具体可参考文档 模型特性 - Prompt caching

Extend thinking

当前仅支持通过 Anthropic 协议控制思考过程。
curl https://api.jiekou.ai/anthropic/v1/messages \
     -H "x-api-key: $API_KEY" \
     -H "content-type: application/json" \
     -d \
'{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 16000,
    "thinking": {
        "type": "enabled",
        "budget_tokens": 10000
    },
    "messages": [
        {
            "role": "user",
            "content": "Are there an infinite number of prime numbers such that n mod 4 == 3?"
        }
    ]
}'

Tools

暂时只支持 Bash 和 Text editor。Computer use, Web fetch, Web search 等暂不支持。 使用方式参考官网文档即可。

Claude Code 使用

参考 第三方工具配置 - Claude Code
I