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

# List Prompts

> Retrieve a paginated list of prompts with optional filtering

## Overview

List all prompts owned by the API key holder with pagination and search. By default, returns only the latest version of each prompt.

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Your eigi.ai API key. Must be prefixed with `vk_`.
</ParamField>

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number (minimum: 1).
</ParamField>

<ParamField query="page_size" type="integer" default="10">
  Items per page (minimum: 1, maximum: 100).
</ParamField>

<ParamField query="search" type="string">
  Search in prompt name and content.
</ParamField>

<ParamField query="latest_only" type="boolean" default="true">
  When `true`, returns only the latest version of each prompt.
</ParamField>

## Response

<ResponseField name="prompts" type="array">
  Array of prompt objects, each containing prompt\_name, prompt\_version, prompt\_content, prompt\_metadata, created\_at, and updated\_at.
</ResponseField>

<ResponseField name="total" type="integer">
  Total number of prompts matching the criteria.
</ResponseField>

<ResponseField name="page" type="integer">
  Current page number.
</ResponseField>

<ResponseField name="page_size" type="integer">
  Number of items per page.
</ResponseField>

<ResponseField name="total_pages" type="integer">
  Total number of pages available.
</ResponseField>


## OpenAPI

````yaml GET /v1/public/prompts
openapi: 3.0.0
info:
  title: eigi.ai API
  description: REST API for managing AI voice agents and conversations
  version: 1.0.0
  contact:
    email: buddy@eigi.ai
    url: https://eigi.ai
servers:
  - url: https://api.eigi.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v1/public/prompts:
    get:
      tags:
        - Prompts
      summary: List Prompts
      description: >-
        Retrieve a paginated list of prompts. Returns the latest version of each
        prompt by default.
      operationId: listPrompts
      parameters:
        - name: page
          in: query
          description: Page number
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: page_size
          in: query
          description: 'Items per page (max: 100)'
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: search
          in: query
          description: Search in prompt name and content
          schema:
            type: string
        - name: latest_only
          in: query
          description: Return only latest versions
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Successfully retrieved prompts
          content:
            application/json:
              schema:
                type: object
                properties:
                  prompts:
                    type: array
                    items:
                      $ref: '#/components/schemas/PromptResponse'
                  total:
                    type: integer
                  page:
                    type: integer
                  page_size:
                    type: integer
                  total_pages:
                    type: integer
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PromptResponse:
      type: object
      properties:
        prompt_name:
          type: string
          description: Unique prompt name
        prompt_version:
          type: integer
          description: Version number of the prompt
        prompt_content:
          type: string
          description: The prompt text content
        prompt_metadata:
          type: object
          description: Additional metadata
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Error message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your API key from the eigi.ai Dashboard
        under Settings â†’ API Keys.

````