Skip to content

接口规范概述

协议:HTTPS / RESTful / JSON
认证:所有请求需在 Header 中携带 API Key:

Authorization: Bearer sk-xxxxxxxxxx

通用请求头

Header必填说明
AuthorizationBearer + API Key
Content-Typeapplication/json(大多数接口);multipart/form-data(文件上传接口)

通用错误响应格式

json
{
  "error": {
    "message": "错误描述",
    "type": "error_type",
    "param": "",
    "code": "error_code"
  }
}