Playground: Compare models. Export the code.

Run one prompt across two models, check settled cost, and export the code. Log in required.

Watch two models answer.

How Playground works.

Compare two models side by side.

Send one prompt to two models at once and read both answers in a single view.

  • Streaming is on by default, or turn it off for one complete response
  • Test chat in Compare, or image, speech, transcription, and video in Studio
  • The model picker shows the models your organization can use
Explain idempotency in one sentence.gpt-6-lunaA request isidempotent whenrepeating itchanges nothingafter the firsttime.claude-sonnet-5-5Sending it twicehas the sameeffect as sendingit once.Streaming on by default.Compare for chat, Studio for media.

Inspect cost after it settles.

Streamed turns show Pending while tokens arrive, then resolve to the exact settled cost.

  • No extra Playground fee: tokens bill at the same list price as API calls
  • Managed Playground keys cap spend at $5 per 30 days and 30 requests a minute
  • A key you paste stays in your browser tab and clears when the tab closes
this turnoutput tokens356cost$0.0011Same list price as API calls. No Playground fee.managed key: $5 per 30 days, 30 RPMA key you paste stays in your browser tab.

Generate code from your prompt and settings.

Copy a ready-to-run snippet for Python, TypeScript, Go, or cURL with your model and parameters.

  • Exports snippets pointed at https://api.nrouter.ai/v1 with your model
  • Supports Python, TypeScript, Go, Rust, Java, C#, PHP, Ruby, and cURL
  • Includes framework snippets for LangChain, LlamaIndex, and Vercel AI SDK
PythonTypeScriptcURLclient = OpenAI( base_url="https://api.nrouter.ai/v1",)client.chat.completions.create( model="gpt-6-luna", temperature=0.2)Your prompt, model and settings, ready to run.also Go, Rust, Java, C#, PHP, Ruby

Take a closer look. How the SDK works.

  1. 01

    Install

    One package for your language. Python and TypeScript shown; every official SDK works the same way.

    pip install nrouter-sdknpm install @nrouter_ai/sdk
  2. 02

    Create a client

    nRouter() reads NROUTER_API_KEY from your environment and sends each call to api.nrouter.ai. Provider keys are ours to manage.

    client = nRouter()
  3. 03

    Call any model

    The OpenAI-compatible calls you already know. nRouter’s options ride on the same request; each topic below shows one.

    client.chat.completions.create(…)

Already on the OpenAI SDK? Point its base URL at https://api.nrouter.ai/v1 and keep your code.

The Playground writes the call from your prompt, model and settings, pointed at the nRouter API. Use it with your own API key.

import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.NROUTER_API_KEY,
baseURL: "https://api.nrouter.ai/v1",
});
const response = await client.chat.completions.create({
model: "gpt-6-luna",
max_completion_tokens: 4096,
messages: [
{ role: "user", content: "Parse Retry-After header" },
],
});

Read the docs

FAQs

Is the playground free to test?

There is no extra fee for the Playground itself. You pay for tokens at the same list price as API calls. Latency and token counts show as each reply arrives, and the cost shows once the request settles.

What models can I test?

The chat, image, audio and video models in the nRouter catalogue, 371+ in total. The model picker shows what your organization can use. Embeddings are tested through the API, not the Playground.

Where is my API key stored?

If you paste a key, it stays in your browser’s sessionStorage. It is cleared when you close the tab and is never stored on nRouter servers. If you do not paste a key, the Playground uses your own managed Playground key. Its value is never shown or stored, and it is capped at $5 per 30 days and 30 requests a minute. Master keys are never used for inference.

Does the playground support streaming?

Yes. Streaming is on by default, so you see tokens as the model generates them, and you can stop a reply mid-stream. You can turn streaming off for a single complete response.

Can I export code from the playground?

Yes. The Playground generates code from your prompt, model and settings. Targets include Python, TypeScript and Node, Go, Java, Kotlin, Swift, Rust, C#, PHP, Ruby and cURL. Frameworks include LangChain, LlamaIndex, Vercel AI SDK, CrewAI and AutoGen.

  1. Opening Playground requires logging in to your nRouter account. View-only organization members cannot run billable Playground requests.
  2. Each person gets one managed Playground key per organization, capped at $5 per 30 days, up to 30 requests a minute and 100,000 tokens a minute. A key you paste stays in this browser tab only.
  3. Streamed turns display Pending while tokens arrive and resolve to the settled cost from the spend log after the stream completes.