跳到主要内容
API 参考/Models/查询当前 Key 可调用模型

查询当前 Key 可调用模型

GET/v1/models

返回当前 Bearer Key 对应账户可查询到的模型列表,并标记每个模型是否可调用。

认证

通过 Bearer Token 认证。

Authorizationstring必填

API Key,格式为 Bearer YOUR_API_KEY。

默认值:-

请求

该接口当前不支持查询参数,请直接发起 GET /v1/models 请求。

响应

返回当前密钥可访问的模型列表和每个模型的调用状态。

codeinteger必填

业务状态码,1 表示成功,0 表示失败。

默认值:-
messagestring必填

成功提示或失败原因。

默认值:-
modelCountinteger必填

本次返回的模型数量。

默认值:-
dataarray必填

当前密钥可访问的模型列表。

默认值:-
data[].idstring必填

模型调用 ID。

默认值:-
data[].createdAtstring必填

模型加入时间。

默认值:-
data[].vendorKeystring必填

模型厂商标识。

默认值:-
data[].namestring必填

模型名称。

默认值:-
data[].callableinteger必填

当前密钥是否可调用该模型,0 表示否,1 表示是。

默认值:-

说明

  • callable=1 表示当前 Key 可以直接调用该模型。
  • callable=0 表示当前 Key 当前不可调用该模型。

错误

状态码说明
401API Key 缺失或无效
403当前账户无权访问模型列表接口
500 / 503服务异常

相关指南