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

# List AI Gateway virtual models

> List the virtual models in your account, with any warnings about targets or names that changed after the last save.



## OpenAPI

````yaml openapi/ai-gateway.yaml GET /virtual-models
openapi: 3.0.3
info:
  title: AI Gateway APIs
  version: 0.1.0
  description: |
    Control-plane HTTP APIs served by the ai-gateway-control service.
servers:
  - url: https://api.ngrok.ai
security:
  - bearerAuth: []
tags:
  - name: AI Gateway Access Key Configurations
    description: Manage reusable access key configurations (scope and routing rules).
  - name: AI Gateway Access Keys
    description: Manage ngrok-managed access keys associated with AI Gateway endpoints.
  - name: AI Gateway Configuration
    description: >-
      Manage per-account AI Gateway configuration (timeouts, token caps,
      metadata).
  - name: AI Gateway API Keys
    description: Manage customer-facing AI Gateway API Keys.
  - name: AI Gateway Firewall Policies
    description: >-
      Manage Firewall policies, the rules that screen the requests and tool
      calls an access key's traffic carries.
  - name: AI Gateway Credits
    description: >-
      Purchase AI Gateway credits, via Stripe Checkout or a charge of the saved
      card, and read purchase/transaction history.
  - name: AI Gateway Providers
    description: Manage AI Gateway providers and the models they expose.
  - name: AI Gateway Custom Providers
    description: Manage custom AI Gateway providers and the models they expose.
  - name: AI Gateway Models
    description: >-
      Read-only listing of AI Gateway models available to the authenticated
      account.
  - name: AI Gateway Provider Keys
    description: >-
      Manage the provider keys your account stores for AI Gateway. Access key
      configurations reference them in routing rule steps.
  - name: AI Gateway Usage
    description: >-
      Read-only AI Gateway usage events and aggregated usage overview for the
      authenticated account.
  - name: AI Gateway Virtual Models
    description: >-
      Manage virtual models, names that stand for an ordered list of models to
      try in turn.
paths:
  /virtual-models:
    get:
      tags:
        - AI Gateway Virtual Models
      summary: List AI Gateway virtual models
      description: List all AI Gateway virtual models owned by the authenticated account.
      operationId: ListAIGatewayVirtualModels
      parameters:
        - $ref: '#/components/parameters/BeforeID'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: A page of AI Gateway virtual models.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AIGatewayVirtualModelList'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    BeforeID:
      name: beforeId
      in: query
      required: false
      description: Returns items before this resource identifier in descending ID order.
      schema:
        type: string
    Limit:
      name: limit
      in: query
      required: false
      description: >-
        Maximum number of items to return. Defaults to 100 and may not exceed
        100.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 100
  schemas:
    AIGatewayVirtualModelList:
      type: object
      additionalProperties: false
      required:
        - aiGatewayVirtualModels
        - uri
      properties:
        aiGatewayVirtualModels:
          type: array
          description: The AI Gateway virtual models for this account.
          items:
            $ref: '#/components/schemas/AIGatewayVirtualModel'
        uri:
          type: string
          description: URI of this list resource.
        nextPageUri:
          type: string
          nullable: true
          description: URI of the next page of results, or null if there is no next page.
    AIGatewayVirtualModel:
      type: object
      additionalProperties: false
      required:
        - id
        - uri
        - name
        - models
        - createdAt
        - updatedAt
        - createdBy
        - lastUpdatedBy
        - warnings
      properties:
        id:
          type: string
          description: Unique identifier for this virtual model.
        uri:
          type: string
          description: URI of this AI Gateway Virtual Model API resource.
        name:
          type: string
          description: The value clients send as `model`.
        models:
          type: array
          description: Models in failover order.
          items:
            type: string
        description:
          type: string
          description: Human-readable description.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the virtual model was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the virtual model was last updated.
        createdBy:
          $ref: '#/components/schemas/Ref'
        lastUpdatedBy:
          $ref: '#/components/schemas/Ref'
        warnings:
          type: array
          description: |
            Problems that started after the last save, for example a target
            that no longer resolves. Computed on each read. A warning never
            blocks requests.
          items:
            $ref: '#/components/schemas/AIGatewayVirtualModelWarning'
    Error:
      type: object
      additionalProperties: false
      required:
        - statusCode
        - msg
        - details
      properties:
        errorCode:
          type: string
          description: Stable ngrok error code when available.
        statusCode:
          type: integer
          format: int32
          description: HTTP status code for this error.
        msg:
          type: string
          description: Human-readable error message.
        details:
          type: object
          description: Structured error details.
          additionalProperties:
            type: string
    Ref:
      type: object
      additionalProperties: false
      required:
        - id
        - uri
      properties:
        id:
          type: string
          description: Resource identifier.
        uri:
          type: string
          description: URI for locating the resource.
    AIGatewayVirtualModelWarning:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - nameHidesModel
            - targetUnresolved
          x-enum-varnames:
            - AIGatewayVirtualModelWarningCodeNameHidesModel
            - AIGatewayVirtualModelWarningCodeTargetUnresolved
          description: |
            `nameHidesModel`: a model ID, short ID, or alias now matches the
            name. Requests with the name still use the virtual model.
            `targetUnresolved`: the target no longer resolves for this account.
            Requests skip it.
        message:
          type: string
          description: Human-readable description of the problem.
        target:
          type: string
          description: The target that the warning is about. Set only on target warnings.
  responses:
    Error:
      description: API error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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