Skip to content

Playground

Send a prompt to any model you can use from the Tokens dashboard, see the answer and what the request cost, and copy the same request as cURL, Python or a coding-agent config. Covers billing, settings and limits.

On this page

The playground is a page in the dashboard where you send one prompt to a model and read the answer, without writing any code. Use it to try a model, check that a key works, or draft the request you will later make from your own code. This page covers how to use it, what it costs, what each setting does, how to copy the request as code and the limits.

Open /dashboard/playground, titled "Developer Inference Playground".

Run a request#

  1. Under Inference Parameters, choose an API Key Context. Only your active keys are listed. If you have none, the page links to API keys & limits so you can generate one.
  2. Choose a Model Target. The model's context window is shown next to the label. Models that your plan does not include are shown with a lock and "(Upgrade Required)" and cannot be chosen.
  3. Optionally edit the System Prompt (Optional). The default is "You are a helpful and concise coding assistant."
  4. Write your User Prompt. A counter under the box shows characters and an estimate of tokens.
  5. Press Send Request, or press Ctrl+Enter (Cmd+Enter on macOS) in the prompt box.

The answer appears under Model Output when the model has finished. It is not streamed. A Copy button copies the answer. Below it, the stats bar shows what the request cost and how long it took.

Each run is one single-turn request: your system prompt and your user prompt. The playground has no conversation history and no tool calling. For those, call the API from curl or an SDK.

What it costs#

The playground is not free and not separate from your balance. A playground request goes through the same metering as a call to /v1, so it is paid the same way: from your plan's credits when your plan covers the model, and from your wallet when it does not or when your plan is set to fall back to the wallet. See Plans, credits and wallet.

  • After each run, the stats bar shows "This request cost" and the amount in dollars. That figure is what was charged.
  • The run also appears in your usage, like any other request.
  • Your key's own limits apply: its allowed-model list and its monthly spend cap. See API keys.
  • Before the request starts, the same checks as the API apply: a used-up usage window, an empty wallet or an outstanding debt stop it with an error.
  • Some plans are set not to count playground use. On those plans the playground does not use your credits or wallet. If the amount shown is zero and your model is not a free one, ask support whether your plan counts playground use.

Lowering Max Tokens lowers the most a single run can cost, because that is the longest answer you allow.

What the settings do#

SettingRange in the pageWhat it does
Temperature0 to 1.5, steps of 0.05, default 0.7Lower values make answers more predictable, higher values more varied. 0 is the most repeatable.
Max Tokens256 to 4096, steps of 128, default 2048The longest answer the model may write. If the answer is cut off, raise it.
System PromptFree textInstructions that apply to the whole request, such as a role or output format. Leave it empty to send none.

The playground caps Max Tokens at 4096. If you need longer answers, call the API from your own code.

Copy the request as code#

The Integration Snippets box under the settings builds the request you just configured. Your Model Target, System Prompt, User Prompt and Temperature are filled in, and the address is the Tokens address. Choose a tab and press Copy:

  • cURL
  • Claude Code
  • Cursor
  • Cline
  • OpenCode
  • Aider
  • Python

The key in every snippet is the placeholder YOUR_API_KEY. The page never shows your secret, and existing keys cannot be shown again, so put your own key in before you run it. Keep it in an environment variable and out of files you commit (see API keys).

The cURL tab produces a request of this shape:

bash
curl -X POST "https://tokens.bd/v1/chat/completions" \
  -H "Authorization: Bearer $TOKENS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-v4.1-flash",
    "messages": [
      {"role": "system", "content": "You are a helpful and concise coding assistant."},
      {"role": "user", "content": "Say hello in one short sentence."}
    ],
    "temperature": 0.7
  }'

The snippet does not include Max Tokens. Add "max_tokens": 2048 to the body if you want the same limit as in the page. The request format is described in Chat Completions. For the agent tabs, the full setup pages are better: see Claude Code, OpenCode and the other coding agents.

Limits#

  • 10 requests per minute. The playground has its own limit, separate from the one on your API calls. Over it you get a rate-limit error; wait for the next minute.
  • One prompt per run. No chat history, no streaming, no tools, no images.
  • Max Tokens up to 4096.
  • Needs an active key. Revoked or suspended keys are not listed.
  • In a team, only owners, admins and developers have keys, so billing and viewer members have nothing to run with. See Teams and roles.
  • Usage windows. If your plan's usage window is already full, the playground refuses the request with an insufficient_quota error and says when it resets. See Usage, limits and alerts.

If a run fails#

The red "Execution Failed" box shows the message and, when there is one, a Request ID. Quote that ID to support.

Message or symptomCause and fix
"Please select an API key to run completions."No key is selected. Generate one on the keys page.
"The selected API key is either invalid, expired, or does not belong to you."The key was revoked or is not yours. Pick another key.
Wallet or credit error (402)Your plan or wallet cannot cover the request. Top up or change plan. See Errors.
Rate limit error (429)More than 10 runs in a minute, or a usage window is full. Wait and retry.
A model is greyed out with a lockYour plan does not include it. Pick another model, or see the model catalog.

Was this page helpful?

Still stuck? Open a support ticket

Need help configuring your agent?

Test your connection with the connection tester, or create an API key.