---
title: "Get Template Variables"
method: GET
path: "/v1/prompts/{id}/versions/{version}/variables"
tags: ["Prompt Versions"]
---

# Get Template Variables

`GET /v1/prompts/{id}/versions/{version}/variables`

Parses the version's Go text/template syntax and returns a list of extracted variables.

## Path parameters

- `id` string, uuid, required — The ID of the prompt.
- `version` string, required — The version number or status tag ('live', 'draft', 'stable').

## Response `200`

Variables extracted successfully

- object
  - `variables` string[]

## Other responses

- `401` — Unauthorized
- `404` — Prompt or version not found

---

[API](https://skmtc.net/px0-ai/apis/px0-api.md) · [All operations](https://skmtc.net/px0-ai/apis/px0-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/px0-ai/px0-api/revisions/3ed72443989d/schema)
