> ## 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.

# 查询单个模型

> 查询模型元数据并识别 HTTP 200 中的错误。

`GET /v1/models/{model}`

使用 Bearer 认证，传入原始模型 ID 作为经过 URL 编码的路径参数，无请求体。不要混入 Claude 专用认证头，否则返回结构可能切换为原生模型格式。

成功返回一个模型对象，不含列表的 `data` 包装。当前实现对不可见或不存在的模型可能返回 **HTTP 200 + `error.code: model_not_found`**，必须先检查 `error`，再检查 `id` / `object`。认证、网关或代理错误仍可能使用非 200 状态。

`created` 是元数据时间戳，不代表实际上架时间；`supported_endpoint_types` 是部署元数据提示，不保证具体参数、流式或工具支持。详情与列表的筛选规则不完全相同，不应用单模型查询替代实际调用验收。

模型 ID 含 `/` 时，即使编码为 `%2F`，代理或路由仍可能拆分路径。此时使用[模型列表](/zh/api-reference/models)并在客户端按完整 ID 查找，不裁剪模型名称。

[单模型可运行示例](/zh/guides/model-capabilities) · [错误处理](/zh/guides/errors)

[Read in English](/en/api-reference/model-retrieve)


## OpenAPI

````yaml openapi/relay.json GET /v1/models/{model}
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/{model}:
    get:
      summary: 查询模型 / Retrieve model
      description: >-
        仅记录 Bearer / OpenAI 格式；不可见模型可能 HTTP 200 + error.code=model_not_found /
        Bearer / OpenAI format only; unavailable models may return HTTP 200 with
        error.code=model_not_found
      operationId: retrieveModel
      parameters:
        - name: model
          in: path
          required: true
          schema:
            type: string
          description: 经过 URL 编码的完整标识 / Complete URL-encoded identifier
      responses:
        '200':
          description: 成功结构仍需检查业务字段 / Check business fields even on HTTP success
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Model'
                  - allOf:
                      - $ref: '#/components/schemas/Error'
                      - type: object
                        required:
                          - error
              example:
                id: YOUR_MODEL_ID
                object: model
                created: 1626777600
                owned_by: example-provider
        '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:
    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
    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
  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.