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

# 获取模型列表

> 获取当前可用的模型列表。

根据请求头自动识别返回格式：
- 包含 `x-api-key` 和 `anthropic-version` 头时返回 Anthropic 格式
- 包含 `x-goog-api-key` 头或 `key` 查询参数时返回 Gemini 格式
- 其他情况返回 OpenAI 格式




## OpenAPI

````yaml /openapi/relay.json get /v1/models
openapi: 3.0.1
info:
  title: OmniMux Gateway API
  description: >-
    OpenAI-compatible relay API for OmniMux (geminix.cc). Use Authorization:
    Bearer sk-... and base URL https://api.geminix.cc/v1 for SDKs.
  version: 1.0.0
servers:
  - url: https://api.geminix.cc
    description: OmniMux production API
security:
  - BearerAuth: []
tags:
  - name: 获取模型列表
  - name: OpenAI格式(Chat)
  - name: OpenAI格式(Responses)
  - name: 图片生成
  - name: 图片生成/OpenAI兼容格式
  - name: 图片生成/Qwen千问
  - name: 视频生成
  - name: 视频生成/Sora兼容格式
  - name: 视频生成/Kling格式
  - name: 视频生成/即梦格式
  - name: Claude格式(Messages)
  - name: Gemini格式
  - name: OpenAI格式(Embeddings)
  - name: 文本补全(Completions)
  - name: OpenAI音频(Audio)
  - name: 重排序(Rerank)
  - name: Moderations
  - name: Realtime
  - name: 未实现
  - name: 未实现/Fine-tunes
  - name: 未实现/Files
paths:
  /v1/models:
    get:
      tags:
        - Models
      summary: 获取模型列表
      description: |
        获取当前可用的模型列表。

        根据请求头自动识别返回格式：
        - 包含 `x-api-key` 和 `anthropic-version` 头时返回 Anthropic 格式
        - 包含 `x-goog-api-key` 头或 `key` 查询参数时返回 Gemini 格式
        - 其他情况返回 OpenAI 格式
      operationId: listModels
      parameters:
        - name: key
          in: query
          description: Google API Key (用于 Gemini 格式)
          required: false
          schema:
            type: string
        - name: x-api-key
          in: header
          description: Anthropic API Key (用于 Claude 格式)
          required: false
          example: ''
          schema:
            type: string
        - name: anthropic-version
          in: header
          description: Anthropic API 版本
          required: false
          example: ''
          schema:
            type: string
            example: '2023-06-01'
        - name: x-goog-api-key
          in: header
          description: Google API Key (用于 Gemini 格式)
          required: false
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: 成功获取模型列表
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsResponse'
          headers: {}
        '401':
          description: 认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    ModelsResponse:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Model'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: 错误信息
            type:
              type: string
              description: 错误类型
            param:
              type: string
              description: 相关参数
              nullable: true
            code:
              type: string
              description: 错误代码
              nullable: true
    Model:
      type: object
      properties:
        id:
          type: string
          description: 模型 ID
          example: gpt-4
        object:
          type: string
          description: 对象类型
          example: model
        created:
          type: integer
          description: 创建时间戳
        owned_by:
          type: string
          description: 模型所有者
          example: openai
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````