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

# 获取模型列表

> Returns the models available to the current API key.

调用该接口获取当前 API Key 可访问的模型列表。模型列表会受账户权限、线路和控制台配置影响。


## OpenAPI

````yaml api-reference/openapi.json GET /models
openapi: 3.1.0
info:
  title: AIOAGI OpenAI-compatible API
  description: >-
    OpenAI-compatible API surface for AIOAGI model access. Endpoint
    availability, model names, and billing rules depend on your account and the
    current control panel configuration.
  version: 1.0.0
servers:
  - url: https://api.aiearth.dev/v1
    description: General API endpoint
  - url: https://api.aiearth.vip/v1
    description: CDN accelerated API endpoint
  - url: https://api-s1.aiearth.dev/v1
    description: Specialized endpoint for account and realtime capabilities
  - url: https://api-s1.aiearth.vip/v1
    description: CDN accelerated specialized endpoint
security:
  - bearerAuth: []
paths:
  /models:
    get:
      summary: List models
      description: Returns the models available to the current API key.
      operationId: listModels
      responses:
        '200':
          description: Model list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelList'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ModelList:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Model'
      required:
        - object
        - data
    Model:
      type: object
      properties:
        id:
          type: string
          description: Model identifier.
        object:
          type: string
          example: model
        owned_by:
          type: string
          description: Model provider or owner.
      required:
        - id
        - object
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````