Anthropic API 兼容

请求地址

https://api.xiaomimimo.com/anthropic/v1/messages

请求头

接口支持以下两种认证方式,请选择其中一种添加到请求头中:

  1. 方式一:api-key 字段认证,格式:

    api-key: $MIMO_API_KEY
    Content-Type: application/json
    
  2. 方式二:Authorization: Bearer 认证,格式:

    Authorization: Bearer $MIMO_API_KEY
    Content-Type: application/json
    

请求体

非流式响应

流式响应

curl --location --request POST 'https://api.xiaomimimo.com/anthropic/v1/messages' \
--header "api-key: $MIMO_API_KEY" \
--header "Content-Type: application/json" \
--data-raw '{
    "model": "mimo-v2.5-pro",
    "max_tokens": 1024,
    "system": "You are MiMo, an AI assistant developed by Xiaomi. Today is date: Tuesday, December 16, 2025. Your knowledge cutoff date is December 2024.",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "please introduce yourself"
                }
            ]
        }
    ],
    "top_p": 0.95,
    "stream": false,
    "temperature": 1.0,
    "stop_sequences": null,
    "thinking": {
        "type": "disabled"
    }
}'
响应
{
    "id": "b966dbcad38c48b59d16d8c1f313681b",
    "type": "message",
    "role": "assistant",
    "model": "mimo-v2.5-pro",
    "stop_reason": "end_turn",
    "content": [
        {
            "type": "text",
            "text": "Hello! I'm MiMo, an AI assistant developed by Xiaomi. I'm here to help answer your questions, provide information, or assist with various tasks. My knowledge is up to date until December 2024. How can I help you today?"
        }
    ],
    "usage": {
        "input_tokens": 57,
        "output_tokens": 54
    }
}
更新时间 2026 年 06 月 03 日
We use cookies and similar technologies of our own to ensure the proper functioning of the website, customize content according to user preferences and analyze users' interactions on the website, as well as their browsing habits. You can find more information in our Cookie Policy. Select an option or go to Cookie Settings to manage your preferences. Learn More.