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

# Get a prompt revision by the prompt’s slug and version

> Retrieves the full configuration of a prompt revision including model, parameters, tool calls, messages.



## OpenAPI

````yaml /openapi.json get /api/v1/prompts/{slug}/{version}
openapi: 3.1.1
info:
  title: PromptJuggler
  description: PromptJuggler API
  version: 1.0.0
servers:
  - url: https://promptjuggler.com
security:
  - Bearer: []
tags:
  - name: Prompts
    description: Fetch prompts and revisions.
  - name: Prompt Runs
    description: Execute published prompts and retrieve results.
  - name: Workflow Runs
    description: Execute multi-step workflows and retrieve results.
  - name: Knowledge Bases
    description: Upload and manage documents used for retrieval-augmented generation.
paths:
  /api/v1/prompts/{slug}/{version}:
    get:
      tags:
        - Prompts
      summary: Get a prompt revision by the prompt’s slug and version
      description: >-
        Retrieves the full configuration of a prompt revision including model,
        parameters, tool calls, messages.
      operationId: get_prompt_revision
      parameters:
        - name: slug
          in: path
          description: Prompt Handle
          required: true
          schema:
            type: string
        - name: version
          in: path
          description: Specific version or tag or id
          required: true
          schema:
            type:
              - integer
              - string
      responses:
        '200':
          description: Prompt Revision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptRevision'
        '401':
          description: Missing or invalid API key
        '404':
          description: Prompt revision not found
      x-codeSamples:
        - lang: PHP
          label: PromptJuggler PHP SDK
          source: $revision = $pj->getPrompt('greeting', 'production');
        - lang: TypeScript
          label: PromptJuggler TypeScript SDK
          source: const revision = await pj.getPrompt('greeting', 'production');
        - lang: Python
          label: PromptJuggler Python SDK
          source: revision = pj.get_prompt('greeting', 'production')
        - lang: Java
          label: PromptJuggler Java SDK
          source: PromptRevision revision = pj.getPrompt("greeting", "production");
        - lang: Go
          label: PromptJuggler Go SDK
          source: revision, err := pj.GetPrompt(ctx, "greeting", "production")
components:
  schemas:
    PromptRevision:
      description: Prompt revision
      required:
        - id
        - promptId
        - memory
        - provider
        - model
        - modelParams
        - responseFormat
        - messages
        - tools
      properties:
        id:
          description: Prompt revision ID.
          type: string
          format: uuid
        promptId:
          description: Prompt ID.
          type: string
          format: uuid
        memory:
          $ref: '#/components/schemas/Memory'
          description: Memory mode.
        provider:
          $ref: '#/components/schemas/Provider'
          description: AI provider.
        model:
          $ref: '#/components/schemas/Model'
          description: AI model.
        modelParams:
          $ref: '#/components/schemas/ModelParams'
          description: Model parameters.
        responseFormat:
          $ref: '#/components/schemas/ResponseFormat'
          description: AI model response format.
        systemInstruction:
          description: The system prompt.
          type:
            - string
            - 'null'
        messages:
          description: User and assistant messages.
          type: array
          items:
            $ref: '#/components/schemas/ContentMessageResponse'
        tools:
          description: Available tools.
          type: array
          items:
            $ref: '#/components/schemas/Tool'
      type: object
    Memory:
      type: string
      enum:
        - stateless
        - read_only
        - read_write
        - write_only
    Provider:
      type: string
      enum:
        - openai
        - gemini
        - anthropic
    Model:
      type: string
      enum:
        - gpt-5.5
        - gpt-5.5-pro
        - gpt-5.4
        - gpt-5.4-mini
        - gpt-5.4-nano
        - gpt-5.4-pro
        - gpt-5.2
        - gpt-5.2-pro
        - gpt-5.1
        - gpt-4.1
        - gpt-4.1-mini
        - o1-mini
        - gpt-4o
        - gpt-4o-mini
        - gemini-3.1-pro-preview
        - gemini-3-flash-preview
        - gemini-2.5-pro
        - gemini-2.5-flash
        - gemini-2.5-flash-lite
        - gemini-2.0-flash
        - gemini-2.0-flash-lite
        - claude-opus-4-8
        - claude-opus-4-7
        - claude-opus-4-6
        - claude-opus-4-5
        - claude-sonnet-4-6
        - claude-sonnet-4-5
        - claude-haiku-4-5
    ModelParams:
      description: AI model parameters.
      properties:
        maxCompletionTokens:
          description: Maximum completion tokens.
          type:
            - integer
            - 'null'
          default: null
          minimum: 1
        temperature:
          description: Temperature.
          type:
            - number
            - 'null'
          format: float
          default: null
          maximum: 2
          minimum: 0
        topP:
          description: Top P.
          type:
            - number
            - 'null'
          format: float
          default: null
          maximum: 2
          minimum: 0
        verbosity:
          description: Verbosity.
          type:
            - string
            - 'null'
          default: null
          enum:
            - low
            - medium
            - high
        reasoningEffort:
          description: Reasoning effort.
          type:
            - string
            - 'null'
          default: null
          enum:
            - none
            - low
            - medium
            - high
            - xhigh
            - max
        reasoningSummary:
          description: Return reasoning summary.
          type:
            - boolean
            - 'null'
          default: null
        serviceTier:
          description: Service tier.
          oneOf:
            - $ref: '#/components/schemas/ServiceTier'
            - type: 'null'
          default: default
      type: object
    ResponseFormat:
      required:
        - type
      properties:
        type:
          type: string
      type: object
      discriminator:
        propertyName: type
        mapping:
          text:
            $ref: '#/components/schemas/TextFormat'
          json_object:
            $ref: '#/components/schemas/JsonObjectFormat'
          json_schema:
            $ref: '#/components/schemas/JsonSchemaFormat'
      oneOf:
        - $ref: '#/components/schemas/TextFormat'
        - $ref: '#/components/schemas/JsonObjectFormat'
        - $ref: '#/components/schemas/JsonSchemaFormat'
    ContentMessageResponse:
      description: User or assistant message.
      required:
        - role
        - content
      properties:
        role:
          $ref: '#/components/schemas/Role'
          description: Message direction / role.
        content:
          description: Message content.
          type: string
      type: object
    Tool:
      required:
        - type
      properties:
        type:
          type: string
      type: object
      discriminator:
        propertyName: type
        mapping:
          web_search:
            $ref: '#/components/schemas/WebSearch'
          http:
            $ref: '#/components/schemas/HttpCall'
          script:
            $ref: '#/components/schemas/ScriptCall'
          mcp:
            $ref: '#/components/schemas/Mcp'
          prompt:
            $ref: '#/components/schemas/PromptCall'
          workflow:
            $ref: '#/components/schemas/WorkflowCall'
          knowledge_search:
            $ref: '#/components/schemas/KnowledgeSearch'
      oneOf:
        - $ref: '#/components/schemas/WebSearch'
        - $ref: '#/components/schemas/HttpCall'
        - $ref: '#/components/schemas/ScriptCall'
        - $ref: '#/components/schemas/Mcp'
        - $ref: '#/components/schemas/PromptCall'
        - $ref: '#/components/schemas/WorkflowCall'
        - $ref: '#/components/schemas/KnowledgeSearch'
    ServiceTier:
      type: string
      enum:
        - auto
        - default
        - flex
        - priority
    TextFormat:
      title: TextFormat
      description: Text response format.
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - text
      type: object
    JsonObjectFormat:
      title: JsonObjectFormat
      description: JSON object response format.
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - json_object
      type: object
    JsonSchemaFormat:
      title: JsonSchemaFormat
      description: JSON schema response format.
      required:
        - name
        - schema
        - type
      properties:
        name:
          description: Schema name.
          type: string
          pattern: '[a-zA-Z0-9_-]+'
        schema:
          description: The JSON schema as string.
          type: string
        strict:
          description: Whether the model should follow the schema strictly.
          type:
            - boolean
            - 'null'
          default: false
        description:
          description: Schema description.
          type:
            - string
            - 'null'
          default: null
        type:
          type: string
          enum:
            - json_schema
      type: object
    Role:
      type: string
      enum:
        - assistant
        - user
    WebSearch:
      title: WebSearch
      description: Built-in web search.
      required:
        - type
      properties:
        allowedDomains:
          type:
            - array
            - 'null'
          items:
            type: string
        type:
          type: string
          enum:
            - web_search
      type: object
    HttpCall:
      title: HttpCall
      description: External HTTP call tool.
      required:
        - paramsSchema
        - url
        - method
        - name
        - type
      properties:
        paramsSchema:
          description: JSON schema of the parameters this tool expects.
          type: string
        url:
          description: >-
            The URL to call. Can contain ${ENV_VAR} and {{inputName}}
            placeholders.
          type: string
        method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
        headers:
          description: >-
            The headers to send with the HTTP request. Can contain ${ENV_VAR}
            and {{inputName}} placeholders.
          type: array
          items:
            $ref: '#/components/schemas/HttpHeader'
          default: []
        name:
          description: The tool’s name.
          type: string
          pattern: '[a-zA-Z0-9_-]+'
        description:
          description: The tool’s description.
          type:
            - string
            - 'null'
        failFast:
          description: Whether to stop processing if a tool call fails.
          type: boolean
          default: false
        type:
          type: string
          enum:
            - http
      type: object
    ScriptCall:
      title: ScriptCall
      description: Call custom Python or JavaScript function.
      required:
        - language
        - code
        - name
        - type
      properties:
        language:
          description: The language of the script to execute.
          type: string
          enum:
            - python
            - javascript
        code:
          description: The script that this tool executes.
          type: string
        name:
          description: The tool’s name.
          type: string
          pattern: '[a-zA-Z0-9_-]+'
        description:
          description: The tool’s description.
          type:
            - string
            - 'null'
        failFast:
          description: Whether to stop processing if a tool call fails.
          type: boolean
          default: false
        type:
          type: string
          enum:
            - script
      type: object
    Mcp:
      title: Mcp
      description: Built-in MCP server tool.
      required:
        - name
        - url
        - type
      properties:
        name:
          description: The MCP server tool’s name.
          type: string
          pattern: '[a-zA-Z0-9_-]+'
        url:
          description: The URL of the MCP server.
          type: string
        authorizationToken:
          description: Authorization token for the MCP server.
          type:
            - string
            - 'null'
        allowedTools:
          description: >-
            Tool names the model may call. Empty or omitted allows all of the
            server’s tools.
          type:
            - array
            - 'null'
          items:
            type: string
          default: null
        type:
          type: string
          enum:
            - mcp
      type: object
    PromptCall:
      title: PromptCall
      description: Tool to invoke another prompt.
      required:
        - versionRef
        - name
        - type
      properties:
        versionRef:
          $ref: '#/components/schemas/VersionRef'
          description: >-
            Referencing the prompt revision either by id or version number or
            tag.
        name:
          description: The tool’s name.
          type: string
          pattern: '[a-zA-Z0-9_-]+'
        description:
          description: The tool’s description.
          type:
            - string
            - 'null'
        failFast:
          description: Whether to stop processing if a tool call fails.
          type: boolean
          default: false
        type:
          type: string
          enum:
            - prompt
      type: object
    WorkflowCall:
      title: WorkflowCall
      description: Tool to invoke a workflow.
      required:
        - versionRef
        - name
        - type
      properties:
        versionRef:
          $ref: '#/components/schemas/VersionRef'
          description: >-
            Referencing the workflow revision either by id or version number or
            tag.
        name:
          description: The tool’s name.
          type: string
          pattern: '[a-zA-Z0-9_-]+'
        description:
          description: The tool’s description.
          type:
            - string
            - 'null'
        failFast:
          description: Whether to stop processing if a tool call fails.
          type: boolean
          default: false
        type:
          type: string
          enum:
            - workflow
      type: object
    KnowledgeSearch:
      title: KnowledgeSearch
      description: RAG tool to search knowledge base.
      required:
        - knowledgeBaseId
        - name
        - type
      properties:
        knowledgeBaseId:
          type: string
          format: uuid
        name:
          description: The tool’s name.
          type: string
          pattern: '[a-zA-Z0-9_-]+'
        description:
          description: The tool’s description.
          type:
            - string
            - 'null'
        failFast:
          description: Whether to stop processing if a tool call fails.
          type: boolean
          default: false
        type:
          type: string
          enum:
            - knowledge_search
      type: object
    HttpHeader:
      required:
        - key
        - value
      properties:
        key:
          type: string
          pattern: .*(^[A-Za-z0-9!#$%&'*+\-.^_`|~]+$).*
        value:
          type: string
          pattern: '[\x20-\x7E\x09]*'
      type: object
    VersionRef:
      description: A reference to a revision.
      required:
        - parentId
        - idOrTag
      properties:
        parentId:
          description: Definition – prompt or workflow – ID.
          type: string
          format: uuid
        idOrTag:
          description: Revision ID or version number or tag.
          oneOf:
            - type: integer
            - type: string
      type: object
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````