Chat Completions(OpenAI 兼容)
curl https://api.lowcostaiapi.com/v1/chat/completions \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'
返回示例
成功时返回标准结构:
{
"choices": [{
"message": { "role": "assistant", "content": "Hello! ..." }
}],
"usage": { "total_tokens": 23 }
}401 多半是 Key 不对;404 检查 Base URL 路径。