Getting Started
Prerequisites
- An email address (or a Google account) to sign up.
- An API key for at least one supported gateway, such as OpenRouter — see Providers. New accounts do not come with inference credit.
- Your gateway account needs credit, or use a free model:
openrouter/freeanswers on any OpenRouter key, funded or not. A paid model on an unfunded account comes back as a 402 (why). - A terminal with
curl, or any SDK that takes a base URL — see Use your SDK. The dashboard playground works from the browser with no code at all.
Step 1 — Create your account
Step 2 — Add your provider key
fr_live_…). The provider keys you paste under Providers are encrypted at rest and never returned after you save them; on each request the proxy decrypts the one its routing rule picked and sends it to that gateway. Delete a provider key and every rule that referenced it stops using it at once.Step 3 — Create a FreeRouter key
openai). Under Route this key to, your providers are listed in priority order and already checked — all of them if you have up to three, otherwise the first one, and you tick the others it should fail over to (a filter helps on a long list). The key is saved with that rule, so it works on the first request. Copy the key — it looks like fr_live_... and is shown only once, next to a ready-to-paste request for its shape. A key with no routing targets answers 402 (no_route).You can create multiple FreeRouter keys — for example a openai-shaped key for production and an anthropic-shaped key for a service that speaks the Messages API. Each key carries its own shape and routing rule.
Keys are manageable from their cards: rotate a secret (the old one stops immediately, or keeps working for 15 minutes, 1 hour or 24 hours so your apps can switch without downtime), revoke a compromised key, or delete one that never served traffic. Providers can be disabled to pause routing without losing their place in your rules, and re-enabled anytime.
Step 4 — First success, no code
openrouter/free costs nothing — and hit Send: you get the response JSON, the routing trace, and a curl command that reproduces the call. Neither is written to request logs. Details: Usage & Spend → Playground.Step 5 — Make your first request from code
Point any OpenAI-compatible client at FreeRouter's base URL and pass the fr_live_... key you just created. Here it is with curl, on the free model so it works before the gateway account is funded:
# Set your FreeRouter key
export FREEROUTER_API_KEY="fr_live_your_key_here"
curl https://api.freerouter.com/v1/chat/completions \
-H "Authorization: Bearer $FREEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openrouter/free",
"messages": [
{ "role": "user", "content": "Hello from FreeRouter!" }
]
}'
Once the gateway account has credit, swap in any provider/model id it lists, such as openai/gpt-4o-mini — GET /v1/models shows what your key can reach. The same two values (base URL, key) drop into the OpenAI, Anthropic, Vercel AI, LangChain and LiteLLM SDKs: Use your SDK.
A successful response is a standard OpenAI chat completion object:
{
"id": "chatcmpl-...",
"object": "chat.completion",
"model": "openrouter/free",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Hello! How can I help?" },
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 12, "completion_tokens": 9, "total_tokens": 21 }
}
X-FreeRouter-Provider response header naming the gateway that served the request, so you can confirm your routing rule is doing what you expect. Got a 401, 402 or 404 instead? Troubleshooting lists every code with its fix.
Next steps
- Use your SDK — the same swap for OpenAI, Anthropic, Claude Code, Vercel AI SDK, LangChain, LiteLLM, Responses and Gemini, with streaming.
- Quickstart — pick your path: starting fresh (choosing gateways and a rule) or migrating (before/after per gateway, agent prompt).
- Troubleshooting and What's different — every error code, and what changes behind the proxy.
- API Reference — endpoints, auth, and the per-key API shapes.
- Routing Rules — configure %-split and priority failover.
- Providers — supported gateways and how provider keys are used.