---
title: "Pull Prompts By Version"
method: GET
path: "/v1/prompts/{alias}/versions/{version}"
tags: ["Prompt"]
---

# Pull Prompts By Version

`GET /v1/prompts/{alias}/versions/{version}`

## Request

- Base URL: `https://api.confident-ai.com`
- URL: `https://api.confident-ai.com/v1/prompts/{alias}/versions/{version}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/docs/v1/prompts/:alias/versions/:version/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves a prompt with `alias` and `version` from your Confident AI account.

## Response `200`

- GetPromptResponse
  - `success` boolean, required: This is true if the prompt was successfully retrieved.
  - `data` object, required
    - `id` string, required: This is the id of the prompt version generated by Confident AI, not to be confused with the alias you supplied or version number.
    - `version` string: The version number of the prompt.
    - `hash` string, required: This is the commit hash of the prompt pulled
    - `label` string: The user-defined label for a specific version of the prompt.
    - `text` string: This is the text content of the prompt, which is null if the prompt is a list prompt.
    - `messages` PromptMessage[]: This is the list of messages associated with the prompt, which is null if the prompt is a text prompt.
      - `role` string, required: This is the role of the message, which can be user, assistant, system, or developer.
      - `content` string, required: This is the text content of the message.
    - `type` 'TEXT' | 'LIST', required: This is the type of the prompt, which can be either simple text or a list of messages.
    - `interpolationType` 'MUSTACHE' | 'MUSTACHE_WITH_SPACE' | 'FSTRING' | 'DOLLAR_BRACKETS', required: The type of interpolation format used in the prompt to insert dynamic variables.
    - `modelSettings` ModelSettings
      - `provider` 'OPEN_AI' | 'ANTHROPIC': This is the provider of the evaluation model.
      - `name` string: This is the name of the model.
      - `temperature` number, float: This controls randomness in the model's output. Higher values make output more random.
      - `maxTokens` integer: This is the maximum number of tokens to generate.
      - `topP` number, float: This controls diversity via nucleus sampling. Lower values focus on more likely tokens.
      - `frequencyPenalty` number, float: This is the penalty for tokens based on their frequency in the text so far.
      - `presencePenalty` number, float: This is the penalty for tokens based on whether they appear in the text so far.
      - `stopSequence` string[]: This is the sequences where the model will stop generating further tokens.
      - `reasoningEffort` 'MINIMAL' | 'LOW' | 'MEDIUM' | 'HIGH': This is the level of reasoning effort for the model.
      - `verbosity` 'LOW' | 'MEDIUM' | 'HIGH': This is the verbosity level for model output.
    - `outputType` 'TEXT' | 'JSON' | 'SCHEMA', required: The type of output expected from the prompt.
    - `outputSchema` OutputSchema
      - `name` string, required: This is the name of the output schema.
      - `fields` OutputSchemaField[], required: This is the array of fields that define the output schema structure.
        - `id` string, required: This is the unique identifier for the schema field.
        - `name` string, required: This is the name of the schema field.
        - `type` string, required: This is the data type for schema fields.
        - `required` boolean: This indicates whether the field is required in the output.
        - `parentId` string: This is the ID of the parent field for nested structures.
    - `tools` Tool[]
      - `id` string: This is the unique identifier for the schema field.
      - `name` string, required: This is the name of the tool
      - `description` string, required: This is the description of the tool
      - `mode` 'STRICT' | 'ADDITIONAL' | 'NO_ADDITIONAL', required: This is the mode for your tool input fields
      - `structuredSchema` OutputSchema
        - `name` string, required: This is the name of the output schema.
        - `fields` OutputSchemaField[], required: This is the array of fields that define the output schema structure.
          - `id` string, required: This is the unique identifier for the schema field.
          - `name` string, required: This is the name of the schema field.
          - `type` string, required: This is the data type for schema fields.
          - `required` boolean: This indicates whether the field is required in the output.
          - `parentId` string: This is the ID of the parent field for nested structures.
  - `deprecated` boolean, required: This is true if this endpoint is deprecated.

## Changes

> 54 revisions in range; 3 not diffed.

- **2026-04-07** `7375d8421ed2`: 2 warning
  - added the new `ARRAY` enum value to the `data/outputSchema/fields/items/type` response property for the response status `200`
  - added the new `ARRAY` enum value to the `data/tools/items/structuredSchema/fields/items/type` response property for the response status `200`

[Operation history](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/changes/v1/prompts/:alias/versions/:version/get.md)

---

[API](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api.md) - [All operations](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/revisions/95cdde71b65e?raw)
