跳转到主要内容
GET
/
v1
/
models
curl --request GET \
  --url 'https://toapis.com/v1/models' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "object": "list",
  "data": [
    {
      "id": "claude-sonnet-4-6",
      "object": "model",
      "created": 1626777600,
      "owned_by": "anthropic",
      "supported_endpoint_types": ["chat_completions", "responses"]
    },
    {
      "id": "gpt-5",
      "object": "model",
      "created": 1626777600,
      "owned_by": "openai",
      "supported_endpoint_types": ["chat_completions"]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.toapis.com/llms.txt

Use this file to discover all available pages before exploring further.

  • 兼容 OpenAI Models API 格式
  • 返回当前 API Key 与用户组可用的模型
  • 默认返回文字模型,可通过 type=all 获取全部类型模型
  • 可按模型类型筛选文字、图片、视频或音频模型
获取当前 API Key 可访问的模型列表。返回结果会根据令牌模型限制、用户组、可用渠道和模型计费配置动态过滤。

Authorizations

Authorization
string
必填
所有接口均需要使用 Bearer Token 进行认证获取 API Key:访问 API Key 管理页面 获取您的 API Key使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY

Query Parameters

type
string
默认值:"text"
模型类型筛选。可选值:
  • textchat:仅返回文字对话模型
  • image:仅返回图片模型
  • video:仅返回视频模型
  • audio:仅返回音频模型
  • all:返回全部可用模型
不传时默认只返回文字模型。

Response

success
boolean
请求是否成功。
object
string
列表对象类型,固定为 list
data
object[]
模型列表。
curl --request GET \
  --url 'https://toapis.com/v1/models' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "object": "list",
  "data": [
    {
      "id": "claude-sonnet-4-6",
      "object": "model",
      "created": 1626777600,
      "owned_by": "anthropic",
      "supported_endpoint_types": ["chat_completions", "responses"]
    },
    {
      "id": "gpt-5",
      "object": "model",
      "created": 1626777600,
      "owned_by": "openai",
      "supported_endpoint_types": ["chat_completions"]
    }
  ]
}

说明

  • 如果 API Key 配置了模型限制,只会返回该令牌允许访问的模型。
  • 如果不传 type,视频和音频等异步任务模型不会出现在默认结果中。
  • 如果需要获取图片、视频、音频等全部可用模型,请使用 GET /v1/models?type=all