模型列表接口
与 OpenAI <InlineCode>/models</InlineCode> 兼容的模型目录接口。公开可用,不需要 API Key;带上 Key 时会额外返回你已开通的隐藏模型(如 Seedance 视频模型)。
端点
http
GET https://onegate.club/v1/models示例请求
bash
curl https://onegate.club/v1/models带上 API Key 可查看已开通的隐藏模型:
bash
curl https://onegate.club/v1/models \
-H "Authorization: Bearer $ONEGATE_API_KEY"返回结构
json
{
"object": "list",
"data": [
{
"id": "deepseek-v4-flash",
"object": "model",
"owned_by": "deepseek",
"name": "DeepSeek V4 Flash",
"context_window": "1M",
"native_pricing": { "currency": "CNY", "input": "1", "cached_input": "0.02", "output": "2", "unit": "CNY/1M tokens", "version": "deepseek-v4-flash@2026-08-13" },
"billing_currency": "CNY"
}
]
}这个接口与 OpenAI 的 <InlineCode>models</InlineCode> 兼容,OpenAI SDK 可直接使用;<InlineCode>native_pricing</InlineCode> 是正式原币价格字段。旧 <InlineCode>pricing</InlineCode> 仅返回固定 7.2 换算的美元等值并标记 deprecated,不应用于新结算逻辑。
查询单个模型
http
GET https://onegate.club/v1/models/{model}bash
curl https://onegate.club/v1/models/deepseek-v4-flash返回单个模型的详情,结构与列表接口中的元素一致。模型不存在、或该模型是隐藏模型且当前未授权时,返回 404。
json
{
"id": "deepseek-v4-flash",
"object": "model",
"owned_by": "deepseek",
"name": "DeepSeek V4 Flash",
"context_window": "1M",
"native_pricing": { "currency": "CNY", "input": "1", "cached_input": "0.02", "output": "2", "unit": "CNY/1M tokens", "version": "deepseek-v4-flash@2026-08-13" },
"billing_currency": "CNY"
}