Anthropic API 兼容
请求地址
https://api.xiaomimimo.com/anthropic/v1/messages
请求头
接口支持以下两种认证方式,请选择其中一种添加到请求头中:
-
方式一:
api-key字段认证,格式:api-key: $MIMO_API_KEY Content-Type: application/json -
方式二:
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 日