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

# Get Prompt

> Fetch a specific prompt version for a project using either version number or tag. Either version or tag must be provided, but not both. **This endpoint is available through our SDK and REST API for organizations to fetch their prompt versions.**



## OpenAPI

````yaml GET /prompt
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.promptrun.ai/v1
  - url: https://staging.api.promptrun.ai/v1
security:
  - bearerAuth: []
paths:
  /prompt:
    get:
      tags:
        - Prompts
      summary: >-
        Get a specific prompt version by project ID and either version number or
        tag
      description: >-
        Fetch a specific prompt version for a project using either version
        number or tag. Either version or tag must be provided, but not both.
        **This endpoint is available through our SDK and REST API for
        organizations to fetch their prompt versions.**
      operationId: PromptController_getPromptByVersionOrTag_v1
      parameters:
        - name: projectId
          required: true
          in: query
          description: Project ID (UUID)
          schema:
            type: string
        - name: version
          required: false
          in: query
          description: Version number of the prompt
          schema:
            type: number
        - name: tag
          required: false
          in: query
          description: Tag of the prompt
          schema:
            type: string
      responses:
        '200':
          description: Returns the specified prompt version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPromptByVersionOrTagResponseDto'
        '400':
          description: >-
            Bad request - either version or tag must be provided, invalid UUID,
            or both version and tag provided
        '404':
          description: Prompt not found or access denied
      security:
        - bearer: []
components:
  schemas:
    GetPromptByVersionOrTagResponseDto:
      type: object
      properties:
        updatedAt:
          format: date-time
          type: string
          description: Last updated timestamp
          example: '2025-07-21T04:17:39.294Z'
        prompt:
          type: string
          description: The prompt content
          example: Generate {{word_count}} words essay about Georgian History
        version:
          type: number
          description: Version number of the prompt
          example: 9
        versionMessage:
          type: string
          description: Version message describing the changes
          example: I have updated system prompt to generate {{word_count}}
        tag:
          type: string
          description: Tag assigned to the prompt
          example: latest
        project:
          description: Project information
          allOf:
            - $ref: '#/components/schemas/ProjectDto'
      required:
        - updatedAt
        - prompt
        - version
        - versionMessage
        - project
    ProjectDto:
      type: object
      properties:
        id:
          type: string
          description: Project ID
          example: d0d52c6e-85ba-4025-a84c-3c99834fe2ac
        name:
          type: string
          description: Project name
          example: Helpful AI Assistant
      required:
        - id
        - name
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````