Prompts

Templates with a history, and a way to tell which version produced an answer.

Saving one

Save prompts in the dashboard or through the API. Saving a name that already exists adds a version rather than replacing one: versions are append-only, because a prompt you can edit in place makes every request that used it unexplainable afterwards.

Variables are read out of the template, so the declared list cannot drift from the text. The template language is deliberately not a language, just {{name}}: anything that can compute can fail at request time, and a prompt store is the wrong place for a runtime.

Using one on a request

-H "x-vatan-prompt: support-reply@4"   # or support-reply for the latest

We record the reference rather than check that your messages match it, because you may legitimately edit a rendered prompt before sending. What we can honestly report is which version you say it came from, and that is enough to answer whether version 4 costs more or fails more than version 3. Group by prompt on the usage page.

Rendering

Ask the API to fill a stored template in and hand back the messages, so you can keep the template here and still assemble it yourself rather than sending variables through the completion endpoint and letting us decide what your prompt says.

An unsupplied variable is reported and left as its visible {{placeholder}}. Blanking it produces a prompt that reads as complete and has lost its subject, which is far harder to notice in a log.