mixrouter
  1. anthropic
mixrouter
  • mixrouter接口说明
  • 已支持的模型列表
  • 大模型官方文档
  • gemini
    • openai格式
      • openai格式
      • gemini-开启thinking
    • google原生格式
      • google格式
  • anthropic
    • openai格式
      POST
    • anthropic格式
      POST
  • openai
    • chat/completions
      POST
    • 流式/chat/completions
      POST
    • responses
      POST
  • deepseek
    • chat/completions
      POST
  • qwen
    • chat/completions(开启thinking)
      POST
    • chat/completions
      POST
  • 豆包
    • chat/completions
      POST
    • 提交视频生成任务
      POST
    • 获取视频生成任务结果
      GET
  1. anthropic

anthropic格式

POST
https://api.mixrouter.com/v1/messages
按照anthropic官方的文档来传递参数。https://platform.claude.com/docs/en/api/messages/create

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/jsonRequired

Example
{
    "max_tokens": 1024,
    "messages": [
        {
            "content": "Hello, world",
            "role": "user"
        }
    ],
    "model": "claude-sonnet-4-5-20250929"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.mixrouter.com/v1/messages' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "max_tokens": 1024,
    "messages": [
        {
            "content": "Hello, world",
            "role": "user"
        }
    ],
    "model": "claude-sonnet-4-5-20250929"
}'

Responses

🟢200OK
application/json
Body

Example
{
    "id": "msg_01C6bDcqdQPKi9MaJWz6Sb78",
    "type": "message",
    "role": "assistant",
    "model": "claude-sonnet-4-5-20250929",
    "content": [
        {
            "type": "text",
            "text": "Hello! How can I help you today?"
        }
    ],
    "stop_reason": "end_turn",
    "usage": {
        "input_tokens": 10,
        "cache_creation_input_tokens": 0,
        "cache_read_input_tokens": 0,
        "output_tokens": 12,
        "claude_cache_creation_5_m_tokens": 0,
        "claude_cache_creation_1_h_tokens": 0
    }
}
Modified at 2025-12-10 08:45:58
Previous
openai格式
Next
chat/completions
Built with