Playground: Test Before You Ship
Iterate on prompts in real time, compare versions, and capture good runs.
The Playground is an in-dashboard sandbox for prompt iteration. It runs real gateway calls against your own provider keys, so the latency, cost, and output you see are identical to production — but no save lands on a branch until you decide.
Two modes
Free-form
Compose a system + user message from scratch. Useful for exploring a new model or proving out an idea before it earns a slug.
Existing prompt
Load a saved prompt by slug, override any parameter, fill in test variables, and run.
Open existing prompts in the Playground via the Test in playground
button on the prompt detail page — it deep-links to
/playground?prompt=<slug> with the production version pre-loaded.
Override controls
Every value on the saved prompt can be overridden for the current run without persisting. This makes A/B-style comparisons cheap.
| Name | Type | Default | Description |
|---|---|---|---|
| model | string | — | Switch providers or model tiers without leaving the page. |
| temperature | number | — | Sampling temperature (0.0 – 2.0). |
| maxTokens | number | — | Hard ceiling on the output. |
| topP | number | — | Nucleus sampling threshold. |
| stopSequences | string[] | — | Substrings that terminate generation. |
| variables | Record<string, string> | — | Auto-detected from {{var}} syntax in the prompt body. |
Variables
Variables are detected automatically from {{ variable }} placeholders
in the prompt body. Each variable carries:
- Type (string, number, boolean, JSON)
- Required flag
- Default value (used when the run leaves the field blank)
The Playground validates every input before dispatch — a missing required variable shows inline, the run never leaves your browser.
Run, observe, iterate
Click Run and the response streams back token-by-token. The right rail surfaces:
- Latency — total + first-token latency
- Cost — input + output + cached token cost in USD
- Token counts — prompt, completion, total
Real cost, real latency
Playground uses your own provider keys; the cost shown is the actual call price billed to your provider account. Use the analytics view for trends.
Saving a good run
When a Playground iteration converges, you have two choices:
- Save as new version — bumps the loaded prompt to a new minor
version on the
developmentbranch. - Save as new prompt — forks into a brand-new prompt aggregate with its own slug, version history, and analytics.
Either path lands on development; promotion to production is a
separate, deliberate step (see Prompts & Versions).