> ## Documentation Index
> Fetch the complete documentation index at: https://oma-codex-339-workspace-permissions.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 列出模型

> 通过 OMA API 列出模型。

<Info>返回当前 OMA 部署中已配置的模型。</Info>


## OpenAPI

````yaml /openapi/oma.zh.json get /v1/models
openapi: 3.1.0
info:
  title: OMA API 参考
  version: 1.0.0
  description: Open Managed Agents 应用 API 参考。
servers:
  - url: http://localhost:38080
    description: 本地 OMA 服务器
security:
  - omaApiKey: []
  - omaBearer: []
paths:
  /v1/models:
    get:
      summary: 列出模型
      description: 通过 OMA API 列出模型。
      operationId: models_list
      parameters:
        - name: before_id
          in: query
          required: false
          schema:
            type: string
            description: 用作分页游标的对象 ID。提供时，返回紧邻该对象之前的结果页。
            title: 之前的 ID
          description: 用作分页游标的对象 ID。提供时，返回紧邻该对象之前的结果页。
        - name: after_id
          in: query
          required: false
          schema:
            type: string
            description: 用作分页游标的对象 ID。提供时，返回紧随该对象之后的结果页。
            title: 之后的 ID
          description: 用作分页游标的对象 ID。提供时，返回紧随该对象之后的结果页。
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: |-
              每页返回的条目数量。

              默认为 `20`。取值范围为 `1` 到 `1000`。
            default: 20
            title: 数量上限
          description: |-
            每页返回的条目数量。

            默认为 `20`。取值范围为 `1` 到 `1000`。
        - name: anthropic-version
          in: header
          required: false
          schema:
            type: string
            description: |-
              你想使用的 OMA API 版本。

              在此处阅读更多关于版本控制和我们版本历史的信息。
            title: Anthropic-Version
          description: |-
            你想使用的 OMA API 版本。

            在此处阅读更多关于版本控制和我们版本历史的信息。
        - name: anthropic-beta
          in: header
          required: false
          schema:
            type: string
            items:
              type: string
            description: |-
              用于指定要使用的 beta 版本的可选请求头。

              要使用多个 beta，请使用逗号分隔的列表（如 `beta1,beta2`），或为每个 beta 分别指定该请求头。
            title: Anthropic-Beta
            x-stainless-override-schema:
              x-stainless-param: betas
              x-stainless-extend-default: true
              type: array
              description: 用于指定一个或多个 Beta 版本的可选请求头。
              items:
                $ref: '#/components/schemas/AnthropicBeta'
          description: |-
            用于指定要使用的 beta 版本的可选请求头。

            要使用多个 beta，请使用逗号分隔的列表（如 `beta1,beta2`），或为每个 beta 分别指定该请求头。
      responses:
        '200':
          description: 成功的响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse_ModelInfo_'
        4XX:
          description: |-
            错误响应。

            详见我们的错误文档。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ListResponse_ModelInfo_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ModelInfo'
          type: array
          title: 数据
        first_id:
          anyOf:
            - type: string
            - type: 'null'
          title: 首个 ID
          description: '`data` 列表中的第一个 ID。可用作上一页的 `before_id`。'
        has_more:
          type: boolean
          title: 是否还有更多
          description: 表示在请求的分页方向上是否还有更多结果。
        last_id:
          anyOf:
            - type: string
            - type: 'null'
          title: 末尾 ID
          description: '`data` 列表中的最后一个 ID。可用作下一页的 `after_id`。'
      type: object
      required:
        - data
        - first_id
        - has_more
        - last_id
      title: ListResponse[ModelInfo]
    ErrorResponse:
      properties:
        error:
          discriminator:
            mapping:
              api_error:
                $ref: '#/components/schemas/APIError'
              authentication_error:
                $ref: '#/components/schemas/AuthenticationError'
              billing_error:
                $ref: '#/components/schemas/BillingError'
              invalid_request_error:
                $ref: '#/components/schemas/InvalidRequestError'
              not_found_error:
                $ref: '#/components/schemas/NotFoundError'
              overloaded_error:
                $ref: '#/components/schemas/OverloadedError'
              permission_error:
                $ref: '#/components/schemas/PermissionError'
              rate_limit_error:
                $ref: '#/components/schemas/RateLimitError'
              timeout_error:
                $ref: '#/components/schemas/GatewayTimeoutError'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/InvalidRequestError'
            - $ref: '#/components/schemas/AuthenticationError'
            - $ref: '#/components/schemas/BillingError'
            - $ref: '#/components/schemas/PermissionError'
            - $ref: '#/components/schemas/NotFoundError'
            - $ref: '#/components/schemas/RateLimitError'
            - $ref: '#/components/schemas/GatewayTimeoutError'
            - $ref: '#/components/schemas/APIError'
            - $ref: '#/components/schemas/OverloadedError'
          title: 错误
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: 请求 ID
        type:
          const: error
          default: error
          title: 类型
          type: string
      required:
        - error
        - request_id
        - type
      title: ErrorResponse
      type: object
    ModelInfo:
      properties:
        capabilities:
          anyOf:
            - $ref: '#/components/schemas/ModelCapabilities'
            - type: 'null'
          description: 将能力名称映射到其支持详情的对象。所有已知能力的键始终存在。
        created_at:
          type: string
          format: date-time
          title: 创建时间
          description: 表示模型发布时间的 RFC 3339 日期时间字符串。若发布日期未知，可能设为 epoch 值。
          examples:
            - '2026-02-04T00:00:00Z'
        display_name:
          type: string
          title: 显示名称
          description: 模型的人类可读名称。
          examples:
            - Opus 4.6
        id:
          type: string
          title: ID
          description: 唯一模型标识符。
          examples:
            - claude-opus-4-6
        max_input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: 最大输入令牌数
          description: 此模型输入上下文窗口的最大令牌数。
        max_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: 最大令牌数
          description: 使用此模型时 `max_tokens` 参数的最大值。
        type:
          type: string
          const: model
          title: 类型
          description: |-
            对象类型。

            对于模型，此值始终为 `"model"`。
          default: model
      type: object
      required:
        - capabilities
        - created_at
        - display_name
        - id
        - max_input_tokens
        - max_tokens
        - type
      title: ModelInfo
    APIError:
      properties:
        message:
          default: Internal server error
          title: 消息
          type: string
        type:
          const: api_error
          default: api_error
          title: 类型
          type: string
      required:
        - message
        - type
      title: APIError
      type: object
    AuthenticationError:
      properties:
        message:
          default: Authentication error
          title: 消息
          type: string
        type:
          const: authentication_error
          default: authentication_error
          title: 类型
          type: string
      required:
        - message
        - type
      title: AuthenticationError
      type: object
    BillingError:
      properties:
        message:
          default: Billing error
          title: 消息
          type: string
        type:
          const: billing_error
          default: billing_error
          title: 类型
          type: string
      required:
        - message
        - type
      title: BillingError
      type: object
    InvalidRequestError:
      properties:
        message:
          default: Invalid request
          title: 消息
          type: string
        type:
          const: invalid_request_error
          default: invalid_request_error
          title: 类型
          type: string
      required:
        - message
        - type
      title: InvalidRequestError
      type: object
    NotFoundError:
      properties:
        message:
          default: Not found
          title: 消息
          type: string
        type:
          const: not_found_error
          default: not_found_error
          title: 类型
          type: string
      required:
        - message
        - type
      title: NotFoundError
      type: object
    OverloadedError:
      properties:
        message:
          default: Overloaded
          title: 消息
          type: string
        type:
          const: overloaded_error
          default: overloaded_error
          title: 类型
          type: string
      required:
        - message
        - type
      title: OverloadedError
      type: object
    PermissionError:
      properties:
        message:
          default: Permission denied
          title: 消息
          type: string
        type:
          const: permission_error
          default: permission_error
          title: 类型
          type: string
      required:
        - message
        - type
      title: PermissionError
      type: object
    RateLimitError:
      properties:
        message:
          default: Rate limited
          title: 消息
          type: string
        type:
          const: rate_limit_error
          default: rate_limit_error
          title: 类型
          type: string
      required:
        - message
        - type
      title: RateLimitError
      type: object
    GatewayTimeoutError:
      properties:
        message:
          default: Request timeout
          title: 消息
          type: string
        type:
          const: timeout_error
          default: timeout_error
          title: 类型
          type: string
      required:
        - message
        - type
      title: GatewayTimeoutError
      type: object
    ModelCapabilities:
      properties:
        batch:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否支持 Batch API。
        citations:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否支持引用生成。
        code_execution:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否支持代码执行工具。
        context_management:
          $ref: '#/components/schemas/ContextManagementCapability'
          description: 上下文管理支持及可用策略。
        effort:
          $ref: '#/components/schemas/EffortCapability'
          description: 努力级别（reasoning_effort）支持及可用级别。
        image_input:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否接受图片内容块。
        pdf_input:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否接受 PDF 内容块。
        structured_outputs:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否支持结构化输出、JSON 模式或严格工具架构。
        thinking:
          $ref: '#/components/schemas/ThinkingCapability'
          description: 思考能力及支持的类型配置。
      type: object
      required:
        - batch
        - citations
        - code_execution
        - context_management
        - effort
        - image_input
        - pdf_input
        - structured_outputs
        - thinking
      title: ModelCapabilities
      description: 模型能力信息。
    CapabilitySupport:
      properties:
        supported:
          type: boolean
          title: 是否支持
          description: 模型是否支持此能力。
      type: object
      required:
        - supported
      title: CapabilitySupport
      description: 指示是否支持某项能力。
    ContextManagementCapability:
      properties:
        clear_thinking_20251015:
          anyOf:
            - $ref: '#/components/schemas/CapabilitySupport'
            - type: 'null'
          description: 是否支持 clear_thinking_20251015 策略。
        clear_tool_uses_20250919:
          anyOf:
            - $ref: '#/components/schemas/CapabilitySupport'
            - type: 'null'
          description: 是否支持 clear_tool_uses_20250919 策略。
        compact_20260112:
          anyOf:
            - $ref: '#/components/schemas/CapabilitySupport'
            - type: 'null'
          description: 是否支持 compact_20260112 策略。
        supported:
          type: boolean
          title: 是否支持
          description: 模型是否支持此能力。
      type: object
      required:
        - clear_thinking_20251015
        - clear_tool_uses_20250919
        - compact_20260112
        - supported
      title: ContextManagementCapability
      description: 上下文管理能力的详细信息。
    EffortCapability:
      properties:
        high:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否支持高推理强度级别。
        low:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否支持低推理强度级别。
        max:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否支持 max effort 级别。
        medium:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否支持中等推理强度级别。
        supported:
          type: boolean
          title: 是否支持
          description: 模型是否支持此能力。
        xhigh:
          anyOf:
            - $ref: '#/components/schemas/CapabilitySupport'
            - type: 'null'
          description: 模型是否支持 xhigh effort 级别。
      type: object
      required:
        - high
        - low
        - max
        - medium
        - supported
        - xhigh
      title: EffortCapability
      description: Effort（reasoning_effort）能力详情。
    ThinkingCapability:
      properties:
        supported:
          type: boolean
          title: 是否支持
          description: 模型是否支持此能力。
        types:
          $ref: '#/components/schemas/ThinkingTypes'
      type: object
      required:
        - supported
        - types
      title: ThinkingCapability
      description: 思考功能的详细信息。
    ThinkingTypes:
      properties:
        adaptive:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 模型是否支持 type 为 'adaptive'（auto）的思考。
        enabled:
          $ref: '#/components/schemas/CapabilitySupport'
          description: 该模型是否支持类型为 'enabled' 的思考。
      type: object
      required:
        - adaptive
        - enabled
      title: ThinkingTypes
      description: 支持的思考类型配置。
  securitySchemes:
    omaApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: OMA 工作区 API 密钥。
      x-default: sk-ant-local-default
    omaBearer:
      type: http
      scheme: bearer
      description: 以 Bearer 令牌形式发送的 OMA 工作区 API 密钥。

````