PromptVault Docs
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

ParameterNotes
slugThe 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

FieldTypeNotes
slugstringThe prompt's slug.
folderstringSidebar grouping.
modelstringModel hint saved on the prompt.
temperaturenumberSuggested generation temperature.
versionstringLabel of the version that was served (e.g. v22).
sourcestringThe full prompt body - system and user content concatenated.
systemSourcestringThe system-role content only.
userSourcestringThe user-role content only ("" when not set).
environmentstringlive 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

StatusMeaning
404No prompt with this slug exists in the workspace.

On this page