> ## Documentation Index
> Fetch the complete documentation index at: https://docs.playapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List models

> Get model IDs visible to the calling credentials.

`GET /v1/models`

Use Bearer authentication for the OpenAI-compatible model list, without other protocols' authentication headers. No request body or pagination parameters are required.

Use `data[].id` as the request's `model`. An empty list can result from permissions or deployment settings, rather than a gateway outage. It is not a protocol capability matrix.

Check for `success: false` before reading `data`. Internal lookup failures can still return HTTP 200; see [error handling](/en/guides/errors).

[List models with cURL](/en/quickstart) · [Choose an endpoint](/en/guides/api-basics)

[API coverage](/en/guides/api-coverage) · [Production integration](/en/guides/production) · [Troubleshooting](/en/guides/troubleshooting)

[简体中文](/zh/api-reference/models)


## OpenAPI

````yaml openapi/relay.json GET /v1/models
openapi: 3.0.3
info:
  title: API — Core inference API
  version: 0.5.0
  description: >-
    面向接入的精选规范，不是全部管理或供应商接口。 / Curated integration specification, not the entire
    management or provider API.
  license:
    name: AGPL-3.0-or-later
servers:
  - url: https://gateway.example.com
    description: >-
      Example only; replace with your gateway origin and optional path prefix,
      without /v1.
security:
  - BearerAuth: []
paths:
  /v1/models:
    get:
      summary: 列出模型 / List models
      description: >-
        仅记录常用接入字段；可选参数和行为取决于模型、渠道与部署配置。 / Documents common integration fields;
        optional parameters and behavior depend on the model, channel, and
        deployment.
      operationId: listModels
      responses:
        '200':
          description: >-
            模型列表；内部查询失败可能返回 success=false。 / Model list; internal lookup failure
            may return success=false.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Models'
                  - $ref: '#/components/schemas/ModelListFailure'
              examples:
                success:
                  value:
                    success: true
                    object: list
                    data:
                      - id: YOUR_MODEL_ID
                        object: model
                        created: 1700000000
                        owned_by: example-provider
                failure:
                  value:
                    success: false
                    message: get user group failed
        '400':
          description: 请求参数错误 / Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 身份校验失败 / Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 访问被拒绝 / Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 接口或资源不存在 / Endpoint or resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 请求被限流或受配额限制 / Rate or quota restriction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 网关或上游错误 / Gateway or upstream error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 服务暂不可用 / Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: 其他网关或上游错误；格式可能不同 / Other gateway or upstream error; shape may vary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Models:
      type: object
      properties:
        success:
          type: boolean
          example: true
        object:
          type: string
          example: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Model'
      required:
        - data
    ModelListFailure:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
      required:
        - success
        - message
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            param:
              type: string
              nullable: true
            code:
              nullable: true
              description: 错误标识；类型随上游变化 / Error identifier; type varies by upstream
    Model:
      type: object
      properties:
        id:
          type: string
          description: >-
            模型列表返回的原始 ID；需要支持当前接口 / Exact ID from the model list; must support
            this endpoint
          example: YOUR_MODEL_ID
        object:
          type: string
          example: model
        created:
          type: integer
          description: >-
            元数据时间戳，不代表实际上架时间 / Metadata timestamp, not necessarily the
            publication date
        owned_by:
          type: string
          description: 部署返回的模型归属标识 / Model ownership label returned by the deployment
        supported_endpoint_types:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            部署元数据提示，不保证每项具体参数能力 / Deployment metadata hints, not guarantees for
            every parameter
      required:
        - id
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 模型调用 API Key，不是控制台登录凭据 / Model API key, not console login credentials

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.