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

# 列出模型

> 返回按工作空间、Key 白名单及可用运行时和渠道筛选的真实模型。ID、能力、限制、推理强度及价格以自己的响应为准，目录展示不授予权限。



## OpenAPI

````yaml /openapi.cn.json get /v1/models
openapi: 3.1.0
info:
  title: OmniRelay API
  version: 1.0.0
  description: 面向已核验真实文本模型的兼容 OpenAI 网关。访问按工作空间开通，使用自己的模型列表查询能力与客户价格。
servers:
  - url: https://api.omnirelay.ai
security:
  - bearerAuth: []
tags:
  - name: 服务
  - name: 模型
  - name: 对话
  - name: 管理 API
  - name: 响应
  - name: 向量
  - name: 图片
  - name: 视频
paths:
  /v1/models:
    get:
      tags:
        - 模型
      summary: 列出模型
      description: 返回按工作空间、Key 白名单及可用运行时和渠道筛选的真实模型。ID、能力、限制、推理强度及价格以自己的响应为准，目录展示不授予权限。
      operationId: listModels
      responses:
        '200':
          description: 已启用的模型。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelList'
              example:
                object: list
                data:
                  - id: gpt-5.4-mini
                    object: model
                    owned_by: OpenAI
                    name: GPT 5.4 Mini
                    mode: live
                    context_length: 400000
                    capabilities:
                      text: true
                      stream: true
                      system: true
                      developer: false
                      reasoning_content: false
                      tools: true
                      vision: false
                      structured_output: true
                      json_object: true
                      json_schema: true
                      responses: true
                      embeddings: false
                    pricing_unit: micro-USD / 1M tokens
                    pricing:
                      input: 750000
                      output: 4500000
                    list_pricing:
                      input: 750000
                      output: 4500000
                    discount: 0
                    limits:
                      output_tokens: 256
                      default_output_tokens: 64
                    reasoning_efforts:
                      - none
                    default_reasoning_effort: none
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ModelList:
      type: object
      required:
        - object
        - data
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Model'
    Model:
      type: object
      required:
        - id
        - object
        - owned_by
      properties:
        id:
          type: string
          description: 模型 ID，作为 `model` 参数传入。
          example: gpt-6-luna
        object:
          type: string
          enum:
            - model
        owned_by:
          type: string
          description: 该模型所属的模型服务方。
          example: OpenAI
        name:
          type: string
          description: 显示名称。
          example: GPT 5.4 Mini
        context_length:
          type: integer
          description: 上下文窗口大小，单位为 token。
          example: 400000
        mode:
          type: string
          enum:
            - live
          description: live 表示模型调用真实模型服务方。
        capabilities:
          type: object
          description: >-
            文档中的能力建议。parameter_policy=upstream-first 时，false
            不作为普通参数的本地拒绝规则，由模型服务方判断支持情况；平台协议与计费边界仍有效。
          additionalProperties:
            type: boolean
        pricing_unit:
          type: string
          description: 以下所有价格的单位。
          example: micro-USD / 1M tokens
        pricing:
          $ref: '#/components/schemas/ModelPrice'
          description: 客户输入与输出基价。对整次费用取整后应用 customer_discount_bps，费率未预先减去折扣。
        list_pricing:
          $ref: '#/components/schemas/ModelPrice'
          description: 折扣前的原价。
        discount:
          type: number
          minimum: 0
          maximum: 1
          description: 本工作区在该模型上相对原价减免的比例：`0.2` 表示减免 20%（即八折），`0` 表示无折扣。
          example: 0
        context_verified:
          type: boolean
          description: 运行时上下文合同是否已核验。
        context_basis:
          type: string
          enum:
            - input-plus-output
          description: 物理输入/输出联合上下文；独立费用预留上界不扩大此窗口。
        max_input_tokens:
          type:
            - integer
            - 'null'
          description: 核验模型服务方输入硬上限，不是提示词的实测 Token 数。
        limits:
          type: object
          additionalProperties:
            type: integer
          description: >-
            网关运行时限制：output_tokens 为最大输出，default_output_tokens 为省略时默认值。GPT 5.4
            Mini 为 64／256；多数其他已接入文本路由默认 32,000，最多 128,000（Gemini 3.1 Pro Preview
            和 Gemini 3.6 Flash 为 65,536），DeepSeek V4 Pro、GLM 5.3 和 Kimi K3 为
            4,096／4,096。request_bytes 为请求体上限（UTF-8 字节），messages
            为最多消息条数，message_characters 为单个文本值的最大长度；模型上下文窗口仍然适用。
        reasoning_efforts:
          type: array
          items:
            type: string
          description: >-
            文档支持的 Chat reasoning_effort 值。空数组表示未声明支持；Responses 使用
            responses_reasoning_efforts，工具与采样另有组合约束。
        default_reasoning_effort:
          type:
            - string
            - 'null'
          description: 省略时注入的已核验强度；未配置默认强度时为 null。
        token_budget_mode:
          type: string
          enum:
            - provider-context-ceiling
          description: 以模型服务方输入硬上限封顶输入预留，不宣称本地已准确统计提示词或确认能放入上下文。
        input_bound_basis:
          type: string
          enum:
            - provider-enforced-input-ceiling
          description: >-
            输入预留为估算值：请求体字节数的三分之一加 4096 Token 固定开销，不超过模型服务方强制的输入硬上限；不是 Token
            统计，资金足够时结算最多可达预留的两倍。
        context_fit_validation:
          type: string
          enum:
            - provider
          description: 由模型服务方判断实际上下文能否放入；派发后拒绝可能保留待对账预留。
        reservation_basis:
          type: string
          enum:
            - independent-input-output-ceilings
          description: 分别预留输入上界与请求输出。首批输入硬上限 400000、输出上限 256；最高预留金额取决于当前工作区价格，不是固定请求费。
        price_version:
          type: string
          description: 冻结客户价格合同版本。
        customer_discount_bps:
          type: integer
          minimum: 0
          maximum: 10000
          description: 真实请求价格比例；10000 为原价，在整次费用取整后应用。
        customer_discount_source:
          type: string
          enum:
            - workspace
            - model
          description: 模型折扣替代工作区折扣，不叠加。
        cache_pricing:
          type:
            - object
            - 'null'
          properties:
            read:
              type: integer
              minimum: 0
            write:
              type: integer
              minimum: 0
            unit:
              type: string
          description: 请求折扣前的客户缓存基价。
        reasoning_price:
          type: integer
          minimum: 0
          description: 客户推理输出基价，单位为每百万 Token 微美元。
        request_fee_microusd:
          type: integer
          minimum: 0
          description: 折扣前固定请求费，首批模型服务方端点为零。
        tier_mode:
          type:
            - string
            - 'null'
          description: 支持时的输入阶梯选择方式。
        input_tiers:
          type: array
          items:
            type: object
            properties:
              min_input_tokens:
                type: integer
                minimum: 0
              input:
                type: integer
                minimum: 0
              output:
                type: integer
                minimum: 0
              cache_read:
                type: integer
                minimum: 0
              cache_write:
                type: integer
                minimum: 0
              reasoning:
                type: integer
                minimum: 0
              request_fee_microusd:
                type: integer
                minimum: 0
          description: 整次请求客户基价阶梯，尚未应用客户折扣。
        reservation:
          type: object
          description: >-
            当前客户价格下的预留金额，单位微美元：最短请求输出 1
            Token（最低）、最短请求默认输出（默认），以及输入达到硬上限且输出最大（最高）。提示词越长预留越多。这是派发前费用预留，不是已结算费用。
          properties:
            currency:
              type: string
              enum:
                - USD
            unit:
              type: string
              enum:
                - micro-USD
            minimum_customer_hold:
              type: integer
              minimum: 0
            default_customer_hold:
              type: integer
              minimum: 0
            maximum_customer_hold:
              type: integer
              minimum: 0
        responses_reasoning_efforts:
          type: array
          items:
            type: string
          description: 文档支持的 Responses reasoning.effort 值。
        sampling_parameters:
          type: array
          items:
            type: string
          description: 文档支持的采样参数名。
        sampling_reasoning_efforts:
          type:
            - array
            - 'null'
          items:
            type: string
          description: 与采样兼容的推理强度；null 表示未声明额外限制。
        chat_tools_reasoning_efforts:
          type:
            - array
            - 'null'
          items:
            type: string
          description: 与 Chat 工具及历史兼容的推理强度；null 表示未声明额外限制。
        tool_choice_values:
          type: array
          items:
            type: string
          description: 文档支持的字符串 tool_choice 值。
        tool_choice_reasoning_efforts:
          type:
            - array
            - 'null'
          items:
            type: string
          description: 与 required 及指定函数选择兼容的推理强度；null 表示未声明额外限制。
        thinking_modes:
          type: array
          items:
            type: string
          description: 文档支持的 thinking.type 值。
        parameter_ranges:
          type: object
          additionalProperties:
            type: array
            minItems: 2
            maxItems: 2
            items:
              type: number
          description: 模型对应的最小及最大取值范围，包含边界。
        parameter_policy:
          type: string
          enum:
            - upstream-first
            - reviewed
          description: upstream-first 模式透传普通字段，由模型服务方判断，可能忽略不支持的字段；仍执行平台资金与协议检查。
        capability_basis:
          type: string
          description: 已发布能力建议的依据。
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - type
          properties:
            code:
              type: string
              example: model_unavailable
            message:
              type: string
              example: The model does not exist or is disabled.
              description: 用于日志和 SDK 异常的简短英文说明；措辞可能调整，请按 code 判断。
            type:
              type: string
              example: not_found_error
              description: >-
                按 HTTP
                状态划分的错误类别：invalid_request_error、authentication_error、insufficient_quota、permission_error、not_found_error、conflict_error、rate_limit_error、service_unavailable
                或 api_error。
            param:
              type: string
              maxLength: 200
              description: 可识别时返回被拒绝的请求字段路径，不包含参数值；Responses 使用原生字段名。
        request_id:
          type: string
          description: 在对话补全、Responses 和 Embeddings 出错时返回。
    ModelPrice:
      type: object
      required:
        - input
        - output
      properties:
        input:
          type: integer
          description: 输入 token 的价格。
          example: 2500000
        output:
          type: integer
          description: 输出 token 的价格。
          example: 10000000
  responses:
    Unauthorized:
      description: '`unauthorized`：缺少 API Key，或该 Key 已吊销或无效。'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 在 OmniRelay 控制台创建的 API Key。所有者确认身份后可在控制台再次查看。

````

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