错误响应格式

网关返回统一错误格式:

HTTP/1.1 400 Bad Request
{
  "error": { "message": "model is required", "type": "invalid_request_error" }
}

创建任务错误

HTTP 状态type含义
400invalid_request_error请求参数错误(如 model 为空、stream 与 task 同时为 true)
401authentication_errorAPI Key 无效
403forbiddenAPI Key IP 白名单不允许当前请求 IP
404not_found_error模型不存在或当前模式没有可用路由
502upstream_error服务端错误

任务查询错误

HTTP/1.1 404 Not Found
{
  "error": { "message": "Task not found", "type": "not_found_error" }
}