curl https://api.nodylink.com/v1/models \
-H "Authorization: Bearer sk-你的密钥"
from openai import OpenAI
client = OpenAI(base_url="https://api.nodylink.com/v1", api_key="sk-你的密钥")
for model in client.models.list():
print(model.id)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.nodylink.com/v1",
apiKey: "sk-你的密钥",
});
const models = await client.models.list();
for (const model of models.data) {
console.log(model.id);
}
{
"success": true,
"object": "list",
"data": [
{
"id": "gpt-6",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["openai", "openai-response"]
},
{
"id": "claude-sonnet-4-6",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["anthropic", "openai"]
},
{
"id": "gpt-image-2",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["image-generation"]
},
{
"id": "doubao-seedance-2-0-260128",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["openai-video"]
}
]
}
{
"error": {
"message": "无效的令牌 (request id: 2026101412000012345678)",
"type": "new_api_error",
"param": "",
"code": ""
}
}
模型
获取模型列表
列出当前 API Key 可以调用的全部模型。
GET
/
v1
/
models
curl https://api.nodylink.com/v1/models \
-H "Authorization: Bearer sk-你的密钥"
from openai import OpenAI
client = OpenAI(base_url="https://api.nodylink.com/v1", api_key="sk-你的密钥")
for model in client.models.list():
print(model.id)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.nodylink.com/v1",
apiKey: "sk-你的密钥",
});
const models = await client.models.list();
for (const model of models.data) {
console.log(model.id);
}
{
"success": true,
"object": "list",
"data": [
{
"id": "gpt-6",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["openai", "openai-response"]
},
{
"id": "claude-sonnet-4-6",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["anthropic", "openai"]
},
{
"id": "gpt-image-2",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["image-generation"]
},
{
"id": "doubao-seedance-2-0-260128",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["openai-video"]
}
]
}
{
"error": {
"message": "无效的令牌 (request id: 2026101412000012345678)",
"type": "new_api_error",
"param": "",
"code": ""
}
}
返回结果只包含当前 API Key 有权访问的模型:如果密钥设置了模型白名单,只返回白名单内的模型;否则返回密钥所在分组下的全部可用模型。
模型单价不在这个接口中返回,请查看 模型价格 或 模型广场。
模型不存在时,HTTP 状态码仍为 200,响应体为错误对象:
curl https://api.nodylink.com/v1/models \
-H "Authorization: Bearer sk-你的密钥"
from openai import OpenAI
client = OpenAI(base_url="https://api.nodylink.com/v1", api_key="sk-你的密钥")
for model in client.models.list():
print(model.id)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.nodylink.com/v1",
apiKey: "sk-你的密钥",
});
const models = await client.models.list();
for (const model of models.data) {
console.log(model.id);
}
{
"success": true,
"object": "list",
"data": [
{
"id": "gpt-6",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["openai", "openai-response"]
},
{
"id": "claude-sonnet-4-6",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["anthropic", "openai"]
},
{
"id": "gpt-image-2",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["image-generation"]
},
{
"id": "doubao-seedance-2-0-260128",
"object": "model",
"created": 1626777600,
"owned_by": "custom",
"supported_endpoint_types": ["openai-video"]
}
]
}
{
"error": {
"message": "无效的令牌 (request id: 2026101412000012345678)",
"type": "new_api_error",
"param": "",
"code": ""
}
}
鉴权
响应
boolean
请求是否成功。
string
固定为
list。array
模型列表。
显示 模型对象
显示 模型对象
string
模型 ID,调用接口时填在
model 字段中。string
固定为
model。integer
创建时间,Unix 时间戳(秒)。
string
模型归属方。
string[]
模型支持的接口类型:
| 取值 | 对应接口 |
|---|---|
openai | /v1/chat/completions |
openai-response | /v1/responses |
anthropic | /v1/messages |
gemini | /v1beta/models/{model}:generateContent |
image-generation | /v1/images/generations |
openai-video | /v2/videos/generations |
embeddings | /v1/embeddings |
jina-rerank | /v1/rerank |
其他格式
使用 Anthropic 或 Gemini 官方 SDK 时,网关会按对应协议返回模型列表。Anthropic 格式
Anthropic 格式
请求头同时带上
x-api-key 和 anthropic-version 时,返回 Anthropic 风格的列表:curl https://api.nodylink.com/v1/models \
-H "x-api-key: sk-你的密钥" \
-H "anthropic-version: 2023-06-01"
{
"data": [
{
"id": "claude-sonnet-4-6",
"type": "model",
"display_name": "claude-sonnet-4-6",
"created_at": "2021-07-25T08:00:00Z"
}
],
"first_id": "claude-sonnet-4-6",
"last_id": "claude-sonnet-4-6",
"has_more": false
}
Gemini 格式
Gemini 格式
请求
GET /v1beta/models 时返回 Gemini 风格的列表。鉴权可以用 Authorization、x-goog-api-key 请求头或 key 查询参数:curl "https://api.nodylink.com/v1beta/models?key=sk-你的密钥"
{
"models": [
{
"name": "gemini-3.1-pro-preview",
"displayName": "gemini-3.1-pro-preview"
}
],
"nextPageToken": null
}
查询单个模型
GET /v1/models/{model} 返回单个模型对象,包含 id、object、created、owned_by 字段。
curl https://api.nodylink.com/v1/models/gpt-6 \
-H "Authorization: Bearer sk-你的密钥"
{
"error": {
"message": "The model 'gpt-x' does not exist",
"type": "invalid_request_error",
"param": "model",
"code": "model_not_found"
}
}

