Quickstart
Verify the route, create a key, and send your first request.
On this page
Paste a key to fill it into every prompt and command on this page. It stays in this browser tab and is never saved or sent. No key yet? Create one in guided setup.
Send one short chat request, then choose the integration guide for your editor, agent, or app.
1. Create your key #
- Create an account and verify your email.
- Open guided setup, choose your tool and model, and create a setup key. Eligible verified accounts receive $1 in test credit once.
- Save your key. Guided setup can reveal it again until your first successful request. Keys created separately on API Keys are shown only once.
2. Make a request #
Use the commands for your shell. Replace YOUR_ROUTERPLEX_API_KEY with your key. You can replace claude-sonnet-4-6 with a chat model from the catalog that your key allows.
macOS / Linux — Bash or Zsh
export ROUTERPLEX_API_KEY='YOUR_ROUTERPLEX_API_KEY'curl --fail-with-body https://api.routerplex.com/v1/chat/completions \-H "Authorization: Bearer $ROUTERPLEX_API_KEY" \-H "Content-Type: application/json" \-d '{"model":"claude-sonnet-4-6","max_tokens":256,"messages":[{"role":"user","content":"Reply with exactly: RouterPlex connected."}]}'
Windows — PowerShell
$env:ROUTERPLEX_API_KEY = 'YOUR_ROUTERPLEX_API_KEY'$body = @{ model = 'claude-sonnet-4-6'; max_tokens = 256; messages = @(@{ role = 'user'; content = 'Reply with exactly: RouterPlex connected.' }) } | ConvertTo-Json -Depth 5Invoke-RestMethod -Uri 'https://api.routerplex.com/v1/chat/completions' -Method Post -Headers @{ Authorization = "Bearer $env:ROUTERPLEX_API_KEY" } -ContentType 'application/json' -Body $body
PowerShell uses Invoke-RestMethod so these commands also work when curl is a PowerShell alias. Do not paste the Bash line continuations into PowerShell.
3. Confirm the result #
Look for RouterPlex connected. in choices[0].message.content, then check Usage for the request. Guided setup confirms a successful request automatically.
A 401 means the key is missing or invalid. A model error means the ID or key allowance does not match. A balance or budget error means you need available credit or a higher key budget. See Errors.
Keep building #
- Use the OpenAI SDKs or Anthropic SDK from your application.
- Choose an editor or agent for tool-specific instructions.
- Learn how to set environment variables for a new terminal, VS Code, or WSL.
- After the test credit is used, top up from $5 by card or $15 by crypto and keep the same key.
No code yet? Try the playground.