OpenAI 兼容接口文档。任何支持 OpenAI SDK 的工具填入 Base URL 和密钥即可直接使用。
| 项目 | 值 |
|---|---|
| Base URL | https://103.236.87.35/v1 |
| 认证方式 | 请求头 Authorization: Bearer <你的密钥> |
| 数据格式 | JSON (UTF-8) |
| 计费单位 | 元 / 百万 Token |
curl https://103.236.87.35/v1/chat/completions \
-H "Authorization: Bearer <你的密钥>" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "你好"}]
}'
from openai import OpenAI
client = OpenAI(api_key="<你的密钥>", base_url="https://103.236.87.35/v1")
resp = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "你好"}],
)
print(resp.choices[0].message.content)
点击任意接口卡片查看完整文档(请求方法 / 请求示例 / 参数 / 返回示例)。
所有错误统一返回 OpenAI 风格 JSON:
{
"error": {
"message": "错误描述",
"type": "new_api_error",
"param": "",
"code": "invalid_api_key"
}
}
| 状态码 | 含义 |
|---|---|
| 200 | 成功(流式为 text/event-stream) |
| 400 | 请求体格式错误(透传上游) |
| 401 | 未提供 Token / 密钥无效 |
| 402 | 余额不足 / 密钥额度用尽 |
| 403 | 密钥封禁 / 停用 / 用户禁用 / IP 受限 / 模型无权 |
| 404 | 路径不存在 / 模型未配置 |
| 405 | 方法不允许 |
| 429 | 模型限速(RPM)/ 上游限速 |
| 502 | 上游请求失败 |
除 _install_check、models(模型列表)外,所有接口都需要 Authorization: Bearer <密钥>,网关按顺序校验:
401 invalid_api_key403 key_banned / 停用 403 key_disabled(封禁到期自动解封)403 user_disabled403 ip_blacklisted / 白名单外 403 ip_not_allowed403 model_not_allowed429 rate_limit_exceeded402 quota_exceeded402 insufficient_balancechat/completions、completions、embeddings、responses、responses/compact、engines/*/embeddings 按 Token 计费prompt/1M × prompt价 + completion/1M × completion价usage 块计费0 正常(不足拒绝)/ 1 无限大(不扣费)/ 2 无限负(允许欠费照扣)模型绑定平台的多密钥池管理,对调用方完全透明: