快速开始
测试时请使用以下值:
- 基地址:
https://metaiolab.com/v1 - 模型:
gpt-5.4 - API 密钥:你的 MetaioLab API 密钥
1. 测试模型列表
章节“1. 测试模型列表”curl https://metaiolab.com/v1/models \ -H "Authorization: Bearer sk-your-token"预期结果:返回一个正常的模型列表。
2. 测试 OpenAI 兼容聊天接口
章节“2. 测试 OpenAI 兼容聊天接口”curl https://metaiolab.com/v1/chat/completions \ -H "Authorization: Bearer sk-your-token" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.4", "messages": [ {"role": "user", "content": "Reply with only the text: chat ok"} ], "max_tokens": 32 }'预期结果:正常返回聊天补全,内容接近 chat ok。
3. 测试 OpenAI 兼容 Responses 接口
章节“3. 测试 OpenAI 兼容 Responses 接口”curl https://metaiolab.com/v1/responses \ -H "Authorization: Bearer sk-your-token" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.4", "input": "Reply with only the text: responses ok", "max_output_tokens": 32 }'预期结果:返回 Responses 风格的输出,文本接近 responses ok。
4. 测试 Anthropic 兼容 Messages 接口
章节“4. 测试 Anthropic 兼容 Messages 接口”curl https://metaiolab.com/v1/messages \ -H "x-api-key: sk-your-token" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{ "model": "gpt-5.4", "max_tokens": 32, "messages": [ {"role": "user", "content": "Reply with only the text: messages ok"} ] }'预期结果:返回 Anthropic 风格的 messages 响应,文本接近 messages ok。