Quickstart
Change one line. Keep your code.
Final Router speaks the same language as OpenAI. Point your existing client at our endpoint and every request now routes through Final Router - with automatic fallback, spend caps and usage tracking you never had before.
The one line
Almost every AI app already talks to an OpenAI-compatible client, and the first thing it asks for is a base URL - the address your requests go to. Swap that address for ours and keep everything else.
from openai import OpenAI
client = OpenAI(
api_key="sk-...", # your OpenAI key
base_url="https://api.openai.com/v1" # straight to one provider
)from openai import OpenAI
client = OpenAI(
api_key="fr_live_...", # your Final Router key
base_url="https://finalrouter.com/api/v1" # ← the only line you change
)From zero to a routed request
Create a free account and a key
Sign up - no card needed - and generate a gateway key. It starts fr_live_ and replaces the provider key in your code.
Swap the base URL
Change your client's base URL to https://finalrouter.com/api/v1. That is the whole migration. No new SDK, no rewrite.
Call any model - or let us choose
Use a specific model id, a routing policy/<name>, or just "auto" to route by price, latency or quality.
curl https://finalrouter.com/api/v1/chat/completions \
-H "Authorization: Bearer $FINAL_ROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [{"role": "user", "content": "Hello!"}]
}'import OpenAI from "openai";
const client = new OpenAI({
apiKey: "fr_live_...",
baseURL: "https://finalrouter.com/api/v1", // the only change
});
const res = await client.chat.completions.create({
model: "auto", // or "anthropic/claude-sonnet-5", "policy/cheap", ...
messages: [{ role: "user", content: "Hello!" }],
});You now have things the provider never gave you
- Automatic fallback - if a provider is down, the request retries on another model before your user ever sees an error.
- Spend caps - a per-key monthly limit turns a leaked key from an emergency into a line item.
- Usage tracking - every request's cost, tokens and latency on one dashboard, per app and per session.
Prefer to try it without writing anything?
The dashboard has a playground that runs on the same path as the API - the same routing, the same guardrails, the same billing, streamed the same way. It is not a demo with different rules behind it, which means a prompt that behaves there behaves in production, and costs the same to try. Sign in, open Playground, and send the request you were about to write.
Worried about lock-in?
The same one line that brings you in takes you back out - nothing here is a cage. What keeps teams is that their spend history, shared keys, saved prompts and fallback rules end up living here. Try it on one service; if it is not pulling its weight, change the line back.