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

# Gpts List

> Endpoint to list GPTs based on inclusion flags for private and public GPTs.

Args:
    include_private_gpts (bool): Whether to include private GPTs in the response.
    include_public_gpts (bool): Whether to include public GPTs in the response.
    tenant (Tenant): Tenant dependency injection for accessing database operations.

Returns:
    List[dict]: A list of GPT details.



## OpenAPI

````yaml get /api/gpts/list
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/gpts/list:
    get:
      tags:
        - GPT
      summary: Gpts List
      description: >-
        Endpoint to list GPTs based on inclusion flags for private and public
        GPTs.


        Args:
            include_private_gpts (bool): Whether to include private GPTs in the response.
            include_public_gpts (bool): Whether to include public GPTs in the response.
            tenant (Tenant): Tenant dependency injection for accessing database operations.

        Returns:
            List[dict]: A list of GPT details.
      operationId: gpts_list
      parameters:
        - name: include_private_gpts
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Include Private Gpts
        - name: include_public_gpts
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Include Public Gpts
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````