开始前准备

  • 在模型广场确认模型 ID 和所属分组
  • 创建绑定该分组的 API 密钥
  • 确认账户有可用余额
  • 不要在聊天、截图或公开代码中展示完整 API Key

API 地址

用途地址
默认入口https://milorouter.com
亚太加速入口https://apac.milorouter.com
OpenAI SDK / OpenCodehttps://milorouter.com/v1
Chat Completionshttps://milorouter.com/v1/chat/completions
Codex Responses根地址 + wire_api = responses

鉴权方式

http
Authorization: Bearer YOUR_MILOROUTER_API_KEY
Content-Type: application/json

请求通过 Bearer API Key 鉴权。请将示例中的占位符替换为自己的密钥,不要把完整值复制进文档、聊天或截图。

  • 确认 Bearer 前缀和 API Key 之间有一个空格
  • 确认复制时没有带入首尾空格
  • 确认密钥仍为启用状态且未过期
  • 确认没有触发额度、速率或 IP 限制

最小请求示例

将 API Key 和模型 ID 替换为自己的值,然后发送一条简短请求。

bash
curl https://milorouter.com/v1/chat/completions \
  -H "Authorization: Bearer $MILOROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-id",
    "messages": [
      {"role": "user", "content": "Hello"}
    ]
  }'