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

# List Models

> List all AI models in your workspace with summary information including usage counts. Available on all plans.



## OpenAPI

````yaml https://www.greenflash.ai/api/openapi get /models
openapi: 3.1.0
info:
  title: Greenflash API Reference
  version: 1.0.0
  description: >-
    Greenflash endpoints for capturing interactions, managing prompts, and
    identifying users.
servers:
  - url: https://www.greenflash.ai/api/v1
    description: Greenflash API v1
security: []
tags:
  - name: Interactions
    description: Capture interactions between users and AI
  - name: Business Events
    description: Capture business events
  - name: Analytics
    description: Understand chat and agentic interactions analyses
  - name: Inbox
    description: Review flagged conversations
  - name: Segments
    description: Manage user segments
  - name: Prompts
    description: Manage prompts
  - name: Chat
    description: Stream chat and agentic conversations
  - name: Models
    description: Manage AI models
  - name: Products
    description: Manage products
  - name: Users
    description: Manage users
  - name: Organizations
    description: Manage organizations
paths:
  /models:
    get:
      tags:
        - Models
      summary: List Models
      description: >-
        List all AI models in your workspace with summary information including
        usage counts. Available on all plans.
      parameters:
        - schema:
            type: number
            minimum: 1
            description: Page number.
          required: false
          description: Page number.
          name: page
          in: query
        - schema:
            type: number
            minimum: 1
            maximum: 100
            description: Number of results per page (max 100).
          required: false
          description: Number of results per page (max 100).
          name: pageSize
          in: query
      responses:
        '200':
          description: Models retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListModelsResponse'
              example:
                - id: 123e4567-e89b-12d3-a456-426614174000
                  canonicalId: gpt-4o
                  displayName: GPT-4o
                  provider: OpenAI
                  family: GPT-4
                  usageCount: 4520
                  lastUsedAt: '2025-10-15T14:30:00Z'
                - id: 223e4567-e89b-12d3-a456-426614174001
                  canonicalId: claude-3-5-sonnet-20241022
                  displayName: Claude 3.5 Sonnet
                  provider: Anthropic
                  family: Claude 3.5
                  usageCount: 2130
                  lastUsedAt: '2025-10-15T12:15:00Z'
                - id: 323e4567-e89b-12d3-a456-426614174002
                  canonicalId: gemini-1.5-pro
                  displayName: Gemini 1.5 Pro
                  provider: Google
                  family: Gemini 1.5
                  usageCount: 890
                  lastUsedAt: '2025-10-14T18:00:00Z'
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the API call was successful (false for errors).
                  error:
                    type: string
                    description: Error message describing what went wrong.
                description: Error response for list models operations.
              example:
                success: false
                error: 'Invalid parameter: pageSize must be between 1 and 100'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the API call was successful (false for errors).
                  error:
                    type: string
                    description: Error message describing what went wrong.
                description: Error response for list models operations.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Greenflash from 'greenflash';

            const client = new Greenflash({
              apiKey: process.env['GREENFLASH_API_KEY'], // This is the default and can be omitted
            });

            const listModelsResponse = await client.models.list();

            console.log(listModelsResponse);
        - lang: Python
          source: |-
            import os
            from greenflash import Greenflash

            client = Greenflash(
                api_key=os.environ.get("GREENFLASH_API_KEY"),  # This is the default and can be omitted
            )
            list_models_response = client.models.list()
            print(list_models_response)
components:
  schemas:
    ListModelsResponse:
      type: array
      items:
        $ref: '#/components/schemas/ModelSummary'
      description: Array of model summaries.
    ModelSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The model ID.
        canonicalId:
          type: string
          description: The canonical model identifier.
        displayName:
          type: string
          description: Human-readable model name.
        provider:
          type: string
          description: Model provider (e.g. OpenAI, Anthropic).
        family:
          type:
            - string
            - 'null'
          description: Model family grouping.
        usageCount:
          type: number
          description: Number of conversations using this model.
        lastUsedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the model was last used.
      required:
        - id
        - canonicalId
        - displayName
        - provider
        - family
        - usageCount
        - lastUsedAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````