API Reference
Playground
Interactive, one-off prompt runs — separate from the Evaluations run history.
GET
/api/playground/runList past playground runs, newest first.
{
"runs": [
{
"id": "play_0001",
"model": "gpt-4o",
"temperature": 0.7,
"maxTokens": 512,
"prompt": "Explain what a vector database is in two sentences.",
"output": "Based on the available context, here's a concise answer...",
"latencyMs": 842,
"createdAt": "2026-07-16T22:25:00.000Z"
}
]
}POST
/api/playground/runRun a prompt and get a completion back.
| Body field | Type | Required |
|---|---|---|
| prompt | string | yes |
| model | string | no — defaults to "gpt-4o" |
| temperature | number | no — defaults to 0.7 |
| maxTokens | number | no — defaults to 512 |
curl -X POST https://preview.devx-ai.xyz/api/playground/run \
-H "Content-Type: application/json" \
-d '{ "prompt": "Summarize the benefits of RAG in one sentence.", "temperature": 0.9 }'Returns 201 with { run }. 400 if prompt is empty.
Simulated latency, simulated output
The response includes a randomized
latencyMs (300–1800ms) and the server actually sleeps for part of it, so it feels like a real network round-trip. The completion text itself is templated, not model-generated — see Playground concepts for why.Data model
| Field | Type | Notes |
|---|---|---|
| temperature | number | 0–1, echoed back but only mildly affects the canned output |
| latencyMs | number | Randomized per run, not measured from a real call |