API Reference
Get a prompt
GET /api/v1/prompts/{slug} - read the resolved live or staging version of a single prompt, ready to send to an LLM.
Reads a single prompt and resolves the version your key points at: pv_live_ keys get the live version, pv_test_ keys get the staging version (falling back to live when no staging version exists). This is the endpoint the SDK's pv.get(slug) calls.
GET /api/v1/prompts/{slug}Path parameters
| Parameter | Notes |
|---|---|
slug | The prompt's workspace-unique slug, e.g. support-triage. |
Request
curl https://app.promptvlt.com/api/v1/prompts/support-triage \
-H "Authorization: Bearer pv_live_xxxxxxxxxxxxxxxxxxxx"Response
{
"slug": "support-triage",
"folder": "support",
"model": "gpt-4o",
"temperature": 0.2,
"version": "v22",
"source": "You are a support triage assistant...\n\nClassify the ticket: {{ticket}}",
"systemSource": "You are a support triage assistant...",
"userSource": "Classify the ticket: {{ticket}}",
"environment": "live"
}Fields
| Field | Type | Notes |
|---|---|---|
slug | string | The prompt's slug. |
folder | string | Sidebar grouping. |
model | string | Model hint saved on the prompt. |
temperature | number | Suggested generation temperature. |
version | string | Label of the version that was served (e.g. v22). |
source | string | The full prompt body - system and user content concatenated. |
systemSource | string | The system-role content only. |
userSource | string | The user-role content only ("" when not set). |
environment | string | live or test, reflecting the key used. |
Variable tokens such as {{ticket}} are returned uninterpolated by the API. The SDK interpolates them for you when you pass variables to pv.get(...) - see Variables.
Errors
| Status | Meaning |
|---|---|
404 | No prompt with this slug exists in the workspace. |