请求示例
以下命令中的模型名仅为示例,请用 /v1/models 返回的可用模型替换。
查询模型
Claude Messages
curl https://api.minoagi.com/v1/messages \
-H "x-api-key: sk-your-key" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 256,
"messages": [{"role": "user", "content": "你好"}]
}'
OpenAI Responses
curl https://api.minoagi.com/v1/responses \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"input": "你好",
"stream": false
}'
Chat Completions
curl https://api.minoagi.com/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [{"role": "user", "content": "你好"}],
"stream": false
}'
Warning
不要把真实 Key 直接写进脚本仓库。生产环境请通过环境变量或密钥管理服务读取。