logo

获取用户模型列表

获取可用模型信息
GET
https://api.openapi.cn/v1/models

认证参数

Authorization
string
header
必填
使用以下格式进行身份验证:Bearer <YOUR API KEY>

查询参数

type
string
query
可选
模型类型
sub_type
string
query
可选
模型子类型,可用于在不设置type的情况下单独过滤模型

响应体

object
string
对象类型
data
array
模型信息列表

请求示例
curl -X GET "https://api.example.com/models?type=text&sub_type=chat" \
  -H "Authorization: Bearer YOUR_API_KEY"
响应示例
{
  "object": "list",
  "data": [
    {
      "id": "Qwen/QwQ-32B",
      "object": "model",
      "created": 1677858242,
      "owned_by": "Qwen",
      "type": "text",
      "sub_type": "chat"
    },
    {
      "id": "deepseek-ai/DeepSeek-V3",
      "object": "model",
      "created": 1677858242,
      "owned_by": "deepseek-ai",
      "type": "text",
      "sub_type": "chat"
    }
  ]
}