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

# Get prompt version by name

> Fetch a prompt version by template name and either an explicit version (e.g. `v1`) or a label name (e.g. `Production`). When both `version` and `label` are provided, `version` takes precedence. Returns the full prompt template data along with the resolved version's configuration, variables, output schema, and assigned labels.



## OpenAPI

````yaml /openapi.json get /model-hub/prompt-labels/get-by-name/
openapi: 3.0.0
info:
  title: FutureAGI Unified API
  version: 1.0.0
  description: >-
    Complete API documentation for FutureAGI platform - Simulate module
    (scenario management, agent definitions, test executions, call analytics)
    and Model Hub Evaluations API (evaluation templates, playgrounds, metrics,
    and execution tracking)
  contact:
    email: support@futureagi.com
servers:
  - url: https://api.futureagi.com
    description: Production API
security: []
tags:
  - name: Health
    description: Health check operations for monitoring server status
  - name: Authentication
    description: User authentication and token management
  - name: Scenarios
    description: Test scenario management and execution
  - name: Agent Definitions
    description: Agent definition CRUD operations
  - name: Agent Versions
    description: Agent version control and management
  - name: Simulator Agents
    description: Simulator agent operations
  - name: Run Tests
    description: Test execution management
  - name: Test Executions
    description: Test execution tracking and analytics
  - name: Call Executions
    description: Individual call execution details
  - name: Call Transcripts
    description: Transcript management and retrieval
  - name: Personas
    description: Persona management for testing
  - name: Analytics
    description: Analytics and reporting
  - name: Export Simulate
    description: Data export operations
  - name: Datasets
    description: >-
      Operations related to datasets, including creation, modification, and data
      management.
  - name: Eval Groups
    description: Evaluation group management
  - name: Eval Templates
    description: Base evaluation template operations
  - name: Custom Eval Templates
    description: Custom evaluation template CRUD operations
  - name: Eval Playground
    description: Test and run evaluations in playground environment
  - name: Eval Logs & Metrics
    description: Evaluation logs, metrics, and execution tracking
  - name: Eval Configuration
    description: Evaluation configuration and templates retrieval
  - name: API Keys
    description: API key management
  - name: Prompt Workbench
    description: Prompt template version labeling and lookup by name, version, or label
paths:
  /model-hub/prompt-labels/get-by-name/:
    get:
      tags:
        - Prompt Workbench
      summary: Get prompt version by name
      description: >-
        Fetch a prompt version by template name and either an explicit version
        (e.g. `v1`) or a label name (e.g. `Production`). When both `version` and
        `label` are provided, `version` takes precedence. Returns the full
        prompt template data along with the resolved version's configuration,
        variables, output schema, and assigned labels.
      operationId: getPromptVersionByName
      parameters:
        - name: name
          in: query
          required: true
          description: The exact name of the prompt template.
          schema:
            type: string
        - name: version
          in: query
          required: false
          description: >-
            The version name to fetch (e.g. `v1`, `v2`). Takes precedence over
            `label` if both are provided.
          schema:
            type: string
        - name: label
          in: query
          required: false
          description: >-
            The label name to resolve (e.g. `Production`, `Staging`,
            `Development`, or a custom label). Used only when `version` is not
            provided.
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved the prompt version.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: true
                  result:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: The prompt template ID.
                      name:
                        type: string
                        description: The prompt template name.
                      description:
                        type: string
                        nullable: true
                        description: The prompt template description.
                      variable_names:
                        type: array
                        items:
                          type: string
                        description: >-
                          List of variable names used in the prompt (from the
                          resolved version).
                      organization:
                        type: string
                        format: uuid
                        description: The organization ID.
                      prompt_folder:
                        type: string
                        format: uuid
                        nullable: true
                        description: The folder ID containing this template.
                      placeholders:
                        type: object
                        nullable: true
                        description: Placeholder configuration for the template.
                      created_by:
                        type: string
                        nullable: true
                        description: The user who created the template.
                      prompt_config:
                        type: array
                        items:
                          type: object
                          properties:
                            messages:
                              type: array
                              items:
                                type: object
                                properties:
                                  role:
                                    type: string
                                    enum:
                                      - system
                                      - user
                                      - assistant
                                    description: The role of the message.
                                  content:
                                    type: string
                                    description: >-
                                      The message content, may contain
                                      {{variable}} placeholders.
                              description: The list of messages in the prompt template.
                            configuration:
                              type: object
                              properties:
                                model:
                                  type: string
                                  description: >-
                                    The LLM model identifier (e.g. `gpt-4o`,
                                    `claude-3-opus`).
                                temperature:
                                  type: number
                                  description: Sampling temperature.
                                max_tokens:
                                  type: integer
                                  description: Maximum tokens in the response.
                                top_p:
                                  type: number
                                  description: Top-p (nucleus) sampling parameter.
                                frequency_penalty:
                                  type: number
                                  description: Frequency penalty parameter.
                                presence_penalty:
                                  type: number
                                  description: Presence penalty parameter.
                                tools:
                                  type: array
                                  items:
                                    type: object
                                  description: Tool definitions, if any.
                                tool_choice:
                                  type: string
                                  nullable: true
                                  description: Tool choice setting.
                              description: Model configuration parameters.
                        description: >-
                          The prompt configuration snapshot for the resolved
                          version.
                      version:
                        type: string
                        description: The resolved version name (e.g. `v1`).
                        example: v1
                      output:
                        type: object
                        nullable: true
                        description: The output schema configuration, if any.
                      is_draft:
                        type: boolean
                        description: Whether the resolved version is a draft.
                      metadata:
                        type: object
                        nullable: true
                        description: Additional metadata for the version.
                      labels:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: The label ID.
                            name:
                              type: string
                              description: The label name (e.g. `Production`, `Staging`).
                            type:
                              type: string
                              enum:
                                - system
                                - custom
                              description: Whether the label is a system default or custom.
                        description: Labels assigned to the resolved version.
              examples:
                by-version:
                  summary: Fetch by explicit version
                  value:
                    status: true
                    result:
                      id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      name: customer-support-agent
                      description: Customer support prompt template
                      variable_names:
                        - company_name
                        - order_id
                      organization: 11111111-2222-3333-4444-555555555555
                      prompt_folder: null
                      placeholders: null
                      created_by: user@example.com
                      prompt_config:
                        - messages:
                            - role: system
                              content: >-
                                You are a customer support agent for
                                {{company_name}}.
                          configuration:
                            model: gpt-4o
                            temperature: 0.7
                            max_tokens: 1000
                            top_p: 1
                            frequency_penalty: 0
                            presence_penalty: 0
                      version: v1
                      output: null
                      is_draft: false
                      metadata: null
                      labels:
                        - id: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
                          name: Production
                          type: system
        '400':
          description: >-
            Bad Request. Missing required parameters, or the specified
            version/label was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: No version 'v99' found for this template
        '401':
          description: >-
            Unauthorized. Authentication credentials were not provided or are
            invalid.
        '404':
          description: >-
            Not Found. No prompt template with the given name exists for this
            organization.
      security:
        - ApiKeyAuth: []
          SecretKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API Key for authentication. Click
        [here](https://app.futureagi.com/dashboard/keys) to access API Key
    SecretKeyAuth:
      type: apiKey
      in: header
      name: X-Secret-Key
      description: >-
        Secret Key for authentication. Click
        [here](https://app.futureagi.com/dashboard/keys) to access Secret Key

````