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

# List models

> Returns models available to the authenticated API key / user group.

Response shape is selected by headers / query (same as routing in the gateway):

- Default (Bearer / OpenAI-style): OpenAI list format (`object` + `data`)
- `x-api-key` + `anthropic-version`: Anthropic-style list
- `x-goog-api-key` or `key` query: Gemini-style list

Use each model's `id` as the `model` field in chat, image, video, and other APIs.
See also the Model Square: https://omniall.ai/pricing




## OpenAPI

````yaml openapi/xgapi-public.yaml GET /v1/models
openapi: 3.0.3
info:
  title: Omniall AI Public API
  description: >-
    Omniall AI public API. Website: https://omniall.ai — API host:
    https://api.omniall.ai — Model Square: https://omniall.ai/pricing
  version: 1.1.0
servers:
  - url: https://api.omniall.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Models
    description: List models available to your API key.
  - name: ChatGPT Chat Completions
    x-group: ChatGPT
    description: OpenAI Chat Completions (`POST /v1/chat/completions`).
  - name: Responses
    description: OpenAI Responses API (`POST /v1/responses`).
  - name: Claude
    description: Anthropic Messages API (`POST /v1/messages`).
  - name: Gemini
    description: Google Gemini generateContent / streamGenerateContent.
  - name: Images
    description: >-
      Image generation (OpenAI Images), vendor guides, and Midjourney proxy
      APIs.
  - name: Video
    description: Async video tasks.
  - name: Audio
    description: Speech and related audio APIs.
  - name: Rerank
    description: Document reranking.
paths:
  /v1/models:
    get:
      tags:
        - Models
      summary: List models
      description: >
        Returns models available to the authenticated API key / user group.


        Response shape is selected by headers / query (same as routing in the
        gateway):


        - Default (Bearer / OpenAI-style): OpenAI list format (`object` +
        `data`)

        - `x-api-key` + `anthropic-version`: Anthropic-style list

        - `x-goog-api-key` or `key` query: Gemini-style list


        Use each model's `id` as the `model` field in chat, image, video, and
        other APIs.

        See also the Model Square: https://omniall.ai/pricing
      operationId: listModels
      parameters:
        - name: x-api-key
          in: header
          required: false
          description: >
            Anthropic-compatible API key. When present together with
            `anthropic-version`,

            the response uses Anthropic list format. The gateway also accepts
            this value as the token

            (equivalent to `Authorization: Bearer ...`).
          schema:
            type: string
            example: sk-xxxxxxxx
        - name: anthropic-version
          in: header
          required: false
          description: >-
            Anthropic API version header. Pair with `x-api-key` to request
            Anthropic response format.
          schema:
            type: string
            example: '2023-06-01'
        - name: x-goog-api-key
          in: header
          required: false
          description: >-
            Gemini-compatible API key. When present, the response uses Gemini
            list format.
          schema:
            type: string
            example: sk-xxxxxxxx
        - name: key
          in: query
          required: false
          description: >-
            Alternate Gemini-compatible API key (query). Same effect as
            `x-goog-api-key`.
          schema:
            type: string
            example: sk-xxxxxxxx
      responses:
        '200':
          description: >
            Success. Default body is OpenAI-compatible (`success`, `object`,
            `data`).

            Anthropic / Gemini shapes apply when the corresponding headers/query
            are used.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsListResponse'
              examples:
                openai:
                  summary: OpenAI format (default)
                  value:
                    success: true
                    object: list
                    data:
                      - id: gpt-4o-mini
                        object: model
                        created: 1626777600
                        owned_by: openai
                        supported_endpoint_types:
                          - openai
                      - id: kling-2.5
                        object: model
                        created: 1626777600
                        owned_by: custom
                        supported_endpoint_types:
                          - openai-video
                anthropic:
                  summary: Anthropic format (x-api-key + anthropic-version)
                  value:
                    data:
                      - id: claude-sonnet-4
                        created_at: '2021-07-20T00:00:00Z'
                        display_name: claude-sonnet-4
                        type: model
                    first_id: claude-sonnet-4
                    has_more: false
                    last_id: claude-sonnet-4
                gemini:
                  summary: Gemini format (x-goog-api-key or key)
                  value:
                    models:
                      - name: gemini-2.0-flash
                        displayName: gemini-2.0-flash
                    nextPageToken: null
        '401':
          description: Missing or invalid API key / token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              examples:
                missing_or_invalid:
                  summary: Invalid token
                  value:
                    error:
                      message: '无效的令牌 (request id: 20260302120000-xxxxxxxx)'
                      type: new_api_error
                      code: ''
        '403':
          description: >
            Authenticated but not allowed (for example user banned, IP not in
            token allowlist,

            or no access to the token's group).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              examples:
                user_banned:
                  summary: User disabled
                  value:
                    error:
                      message: '该用户已被封禁 (request id: 20260302120000-xxxxxxxx)'
                      type: new_api_error
                      code: ''
                ip_denied:
                  summary: IP not allowed by token
                  value:
                    error:
                      message: '您的 IP 不在令牌允许访问的列表中 (request id: 20260302120000-xxxxxxxx)'
                      type: new_api_error
                      code: access_denied
        '500':
          description: >-
            Server / database error while validating the token or loading user
            data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  message: '数据库错误 (request id: 20260302120000-xxxxxxxx)'
                  type: new_api_error
                  code: ''
components:
  schemas:
    ModelsListResponse:
      type: object
      description: Default OpenAI-compatible model list response.
      required:
        - object
        - data
      properties:
        success:
          type: boolean
          description: >-
            Gateway success flag; `true` when the list was returned
            successfully.
          example: true
        object:
          type: string
          description: Always `list`.
          example: list
        data:
          type: array
          description: Array of models available to the current API key / group.
          items:
            $ref: '#/components/schemas/ModelObject'
    OpenAIErrorResponse:
      type: object
      description: OpenAI-style error envelope returned on auth/request failures.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              description: >-
                Human-readable error. The gateway may append a request id for
                support.
            type:
              type: string
              description: Error type, commonly `new_api_error`.
              example: new_api_error
            code:
              type: string
              description: >-
                Optional machine-readable code (e.g. `access_denied`). May be an
                empty string.
          description: Error object.
    ModelObject:
      type: object
      description: One model entry from `GET /v1/models`.
      required:
        - id
        - object
        - created
        - owned_by
      properties:
        id:
          type: string
          description: >-
            Model identifier. Copy this exact string into the `model` field of
            chat/image/video/audio requests.
          example: gpt-4o-mini
        object:
          type: string
          description: Always `model`.
          example: model
        created:
          type: integer
          description: Unix timestamp associated with the model metadata.
          example: 1626777600
        owned_by:
          type: string
          description: >-
            Provider/owner label such as `openai`, `anthropic`, or `custom` for
            gateway-registered models.
          example: openai
        supported_endpoint_types:
          type: array
          description: >-
            Which Omniall endpoint families this model can use (e.g. `openai`,
            `anthropic`, `gemini`, `openai-video`). Helps you pick the correct
            API style.
          items:
            type: string
            enum:
              - openai
              - openai-response
              - openai-response-compact
              - anthropic
              - gemini
              - jina-rerank
              - image-generation
              - embeddings
              - openai-video
          example:
            - openai
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use Authorization: Bearer sk-... from https://omniall.ai/dashboard'

````

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