diff --git a/README.md b/README.md index 324e40f..141cae1 100644 --- a/README.md +++ b/README.md @@ -346,6 +346,7 @@ curl -X POST https://api.anthropic.com/v1/messages \ ```bash curl -X POST http://localhost:3001/proxy/anthropic/v1/messages \ -H "x-api-key: sk-123456" \ + -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{"model": "claude-sonnet-4-20250514", "messages": [{"role": "user", "content": "Hello"}]}' ``` @@ -354,7 +355,6 @@ curl -X POST http://localhost:3001/proxy/anthropic/v1/messages \ - 将 `https://api.anthropic.com` 替换为 `http://localhost:3001/proxy/anthropic` - 将 `x-api-key` 头部中的原始 API Key 替换为统一认证密钥 `sk-123456`(默认值) -- 无需手动设置 `anthropic-version` 头部,代理会自动添加 #### 6. 支持的接口 diff --git a/README_EN.md b/README_EN.md index 09490f2..6e4e09d 100644 --- a/README_EN.md +++ b/README_EN.md @@ -346,6 +346,7 @@ curl -X POST https://api.anthropic.com/v1/messages \ ```bash curl -X POST http://localhost:3001/proxy/anthropic/v1/messages \ -H "x-api-key: sk-123456" \ + -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{"model": "claude-sonnet-4-20250514", "messages": [{"role": "user", "content": "Hello"}]}' ``` @@ -354,7 +355,6 @@ curl -X POST http://localhost:3001/proxy/anthropic/v1/messages \ - Replace `https://api.anthropic.com` with `http://localhost:3001/proxy/anthropic` - Replace the original API Key in `x-api-key` header with unified authentication key `sk-123456` (default value) -- No need to manually set `anthropic-version` header, the proxy will add it automatically #### 6. Supported Interfaces