---
title: "Get a prompt."
method: GET
path: "/v1/prompts/{prompt_id}"
tags: ["Prompts"]
---

# Get a prompt.

`GET /v1/prompts/{prompt_id}`

Get a prompt by its identifier and optional version.

## Path parameters

- `prompt_id` string, required — The identifier of the prompt to get.

## Query parameters

- `version` integer, nullable — The version of the prompt to get (defaults to latest).

## Response `200`

A Prompt resource.

- Prompt — A prompt resource representing a stored OpenAI Compatible prompt template in OGX.
  - `prompt` string, nullable — The system prompt with variable placeholders
  - `version` integer, required — Version (integer starting at 1, incremented on save)
  - `prompt_id` string, required — Unique identifier in format 'pmpt_<48-digit-hash>'
  - `variables` string[] — List of variable names that can be used in the prompt template
  - `is_default` boolean — Boolean indicating whether this version is the default version

## Other responses

- `400` — The request was invalid or malformed
- `429` — The client has sent too many requests in a given amount of time
- `500` — The server encountered an unexpected error
- `default` — An error occurred

---

[API](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis.md) · [All operations](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ogx-ai/ogx-specification-stable-experimental-apis/revisions/f3f783962256/schema)
