Playground
Test, compare, and benchmark LLM models interactively in the nRouter Playground. Experiment with prompts, parameters, guardrails, and inspect token latency.
Test, compare, and benchmark LLM completions interactively through the production nRouter gateway without writing client code. Experiment with prompts, tune inference parameters, test guardrails, and inspect token latency and cost before deploying.

Execution & Environments
The Playground executes against POST /v1/chat/completions with production parity, using an ephemeral key (sk-nrouter-...) in sessionStorage (purged on tab close). Calls consume RPM/TPM allocations, enforce budget ceilings, log latency in Logs, and settle via x-nr-request-cost and x-nr-request-id. Available in the dashboard (/[organization]/playground) and public surface (/product/playground). See Authentication.
Parameters & Status Codes
| Parameter | Range | Function |
|---|---|---|
temperature | 0.0–2.0 | Sampling entropy (0.0 deterministic, 1.0 balanced). |
max_completion_tokens | 1–max | Upper limit on generated completion tokens. |
top_p | 0.0–1.0 | Nucleus sampling probability cutoff. |
system | Text | Baseline system prompt behavior and constraints. |
Common responses: 401 (invalid_api_key), 402 (insufficient_quota), 429 (rate_limit_exceeded), and 400 (guardrail_blocked). Export code to cURL, Python, or TypeScript via View Code.
Frequently asked questions
Do I need to write any code to use the Playground?
No; paste a virtual key, pick a model, and chat in the browser, or click View Code to export snippets.
Which key do I paste, and is it stored anywhere?
Paste your sk-nrouter-... virtual key; it is kept only in browser sessionStorage and never persisted server-side.
Do Playground requests cost real money and count against my credits?
Yes; requests call https://api.nrouter.ai/v1/chat/completions and settle at exact list price via x-nr-request-cost.
Do my rate limits, budgets, and guardrails apply in the Playground?
Yes; all rate limits, per-key budgets, and content guardrails apply identically to production API calls.
Can I cap how much the Playground is allowed to spend?
Yes; assign a spend ceiling to the virtual key used in the Playground via Budget Controls.
How do I turn a Playground conversation into code I can ship?
Click View Code to generate runnable snippets for cURL, Python, Node.js, and client SDKs.
Next Steps
- Quick Start — Make the same call from your code
- Authentication — How virtual keys work
- Chat Completions — Full API reference for the endpoint the Playground calls
- Budget Controls — Cap playground spend with a per-key budget