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

# List models

> Returns the models available for your virtual key or worker-plane JWT. Supports optional query parameters such as a provider filter as implemented by the gateway.



## OpenAPI

````yaml /api-reference/ageneral-models-openapi.json get /v1/models
openapi: 3.1.0
info:
  title: Models
  version: 1.0.0
  description: >-
    OpenAI-compatible inference for Ageneral. Base URL:
    `https://models.ageneral.ai`.


    **HTTP methods:** **GET** is allowed only for **`/v1/models`**. **POST** is
    allowed for inference routes listed in this document. Other HTTP methods
    return **405**.


    **Authentication:** Send `Authorization: Bearer <token>`. Use an **Ageneral
    virtual key** in `sk-bf-…` form for your account or project member key, or a
    **worker-plane service JWT** for private fleet requests to this host. Envoy
    **`ext_authz`** may substitute a member virtual key upstream for worker JWT
    mode. Other `sk-…` formats are rejected with **401**.


    **Spend:** Requests are subject to account and project credit limits; you
    may receive **402** when balance is exhausted.


    **Wire format:** Request and response JSON follow the same shapes as OpenAI
    **Chat Completions**, **Responses**, and **List models**. Use
    `provider/model` identifiers such as `openai/gpt-4o`. For fields not listed
    in this spec, refer to the [OpenAI API
    reference](https://platform.openai.com/docs/api-reference) for the matching
    operation.
  contact:
    name: Ageneral
    url: https://ageneral.ai
servers:
  - url: https://models.ageneral.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Models
    description: Discover models available to your credentials.
  - name: Chat
    description: Multi-turn chat with SSE streaming support.
  - name: Responses
    description: >-
      OpenAI Responses–compatible API, including reasoning streams where the
      model supports them.
paths:
  /v1/models:
    get:
      tags:
        - Models
      summary: List models
      description: >-
        Returns the models available for your virtual key or worker-plane JWT.
        Supports optional query parameters such as a provider filter as
        implemented by the gateway.
      operationId: listModels
      parameters:
        - name: provider
          in: query
          description: >-
            When supported, filter by provider id such as `openai` or
            `anthropic`.
          schema:
            type: string
      responses:
        '200':
          description: Success. OpenAI-compatible object listing `data` and `object`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListModelsResponse'
        '401':
          description: Missing or invalid `Authorization` bearer token.
        '402':
          description: Payment required — insufficient credits for billed usage.
      security:
        - bearerAuth: []
components:
  schemas:
    ListModelsResponse:
      type: object
      description: OpenAI-compatible list models payload.
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Ageneral virtual key as `sk-bf-…` or worker-plane JWT where configured.
        Send as `Authorization: Bearer <token>`.

````