Quickstart — Starting Fresh

No gateway account yet? Go from zero to your first routed request in about 10 minutes: sign up for FreeRouter, pick one or more gateways, connect your provider keys, set a routing rule, and call it from your code.

Step 1 — Sign up for FreeRouter

1
Create your account with email + OTP
Go to app.freerouter.com/app/signup and enter your email. We send a one-time passcode — no password to manage. Enter the code to land in your personal workspace (create a team workspace later if you're working with others).

Step 2 — Pick one or more gateways

FreeRouter is bring-your-own-keys (BYOK): you hold the accounts and pay the gateways directly — FreeRouter just routes across them. You only need one gateway to start, but routing gets interesting with two (failover or a cost blend). Any of these is a solid first pick:

GatewayWhy pick itGet a key
OpenRouter Broadest model catalog; a common default primary. Keys live under its Keys page. openrouter.ai/keys
Vercel AI Gateway Fast setup if you already deploy on Vercel; a strong failover partner. Create a key from the AI Gateway API Keys page. vercel.com/ai-gateway
Cloudflare AI Gateway Edge gateway with caching and rate limiting. You'll also note your account ID and gateway name. Get started guide

More options — OrcaRouter, Requesty, Concentrate, LLM Gateway, Baseten, Darkbloom — are on the Providers page. Create an account on your chosen gateway(s), generate an API key on each, and keep those keys handy for the next step.

Start with two if you can Two providers unlock both routing strategies on the Routing Rules page: a %-split cost blend and priority failover. You can always add more later without touching your code.

Step 3 — Add your provider keys to FreeRouter

2
Providers → Add provider
In the dashboard, go to Providers, choose the gateway, and paste the API key you just created. FreeRouter encrypts it at rest and uses it only to forward your traffic. Repeat for each gateway. (Cloudflare also asks for your account ID and gateway name — the form's How to find this links show where each value lives.)
Your keys stay yours Provider keys are scoped to your workspace, never returned after you save them, and removable anytime — deleting a provider stops its use immediately. See how your keys are used.

Step 4 — Create a FreeRouter key and set a routing rule

3
Keys → Create key
Go to API Keys and create a key. Keep the default API shape (openai) unless your code speaks another format, attach a routing rule, and copy the key — it looks like fr_live_... and is shown only once.

For your first key, either rule works — pick based on how many providers you added:

One provider? Use priority failover

Put your provider first in a priority rule. When you add a second gateway later, append it as a backup — no code changes.

Two providers? Try a 50/50 split

A %-split rule spreads traffic across both gateways so you can compare cost, latency, and quality from day one.

The full reference — weights, failover behavior, and canary patterns — is on the Routing Rules page.

Test before you integrate Each key card has a Test key button that sends a tiny live completion through the key's own routing and shows which gateway answered. One small inference spend per click — cheaper than debugging your app against a misconfigured rule.

Step 5 — Integrate with your code

Point any OpenAI-compatible client at https://api.freerouter.com/v1 with your fr_live_... key. Pass a provider/model id such as openai/gpt-4o-mini — your routing rule decides which gateway actually serves it.

curl

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": "openai/gpt-4o-mini",
    "messages": [
      { "role": "user", "content": "Hello from FreeRouter!" }
    ]
  }'

Python (openai SDK)

# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.freerouter.com/v1",
    api_key=os.environ["FREEROUTER_API_KEY"],
)

resp = client.chat.completions.create(
    model="openai/gpt-4o-mini",
    messages=[
        {"role": "user", "content": "Hello from FreeRouter!"},
    ],
)

print(resp.choices[0].message.content)

Node (openai SDK)

// npm install openai
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.freerouter.com/v1",
  apiKey: process.env.FREEROUTER_API_KEY,
});

const resp = await client.chat.completions.create({
  model: "openai/gpt-4o-mini",
  messages: [{ role: "user", content: "Hello from FreeRouter!" }],
});

console.log(resp.choices[0].message.content);

Step 6 — Verify and tune

  • Check the X-FreeRouter-Provider response header — it names the gateway that served the request, so you can confirm your rule is doing what you expect.
  • List what's available to your key with GET /v1/models.
  • Watch volume, errors, and latency on the Usage & Spend page, then rebalance weights or reorder priorities on the Routing Rules page — changes apply to the next request, no redeploy.
Already have code calling another gateway? Use Migrating from a gateway instead — it's the two-edit base-URL swap plus a wizard that drafts a migration plan for your coding agent.
Next Quickstart — Migrating from a gateway