Documentation

One API Key. Zero Lock-In.

FreeRouter is a meta router for LLM inference — think ad mediation for AI. Point your app at one OpenAI-compatible endpoint, bring your own provider keys, and route every request across OpenRouter, Vercel AI Gateway, Cloudflare AI Gateway, and more with rules you control.

Jump in

What is FreeRouter?

FreeRouter sits between your application and the LLM gateways you already use. You integrate against a single, OpenAI-compatible API. Behind the scenes, FreeRouter picks a target gateway per request according to your routing rules, swaps in the right provider key, normalizes the request and response format, and forwards it. Your code never changes when you re-balance traffic or add a new provider.

The name is about freedom, not price — free from vendor lock-in. If a gateway raises prices, drops a model, or degrades, you flip a routing rule instead of rewriting your integration.

Preview FreeRouter is free to use during the preview period. You bring your own provider keys (BYOK) and pay those providers directly.

Core Concepts

  • Provider key (BYOK) — a key you already hold for a gateway like OpenRouter or Vercel AI Gateway. You add it to FreeRouter; it is encrypted at rest and used only to forward your requests.
  • FreeRouter API key — the single key your application sends. It carries your routing configuration and API shape.
  • API shape — the request/response format a key speaks. Default is OpenAI; per key you can switch to OpenRouter, Anthropic, or Google shapes.
  • Routing rule — how requests are distributed across gateways: a %-split, or a priority order with failover.
  • Workspace — a personal or team container for keys, providers, and rules.

The Drop-In Promise

Adoption shouldn't cost you a rewrite. FreeRouter is a drop-in replacement for the OpenAI API and its common cousins:

  • Change your base URL to https://api.freerouter.com/v1.
  • Swap your API key for your FreeRouter key.
  • Keep calling /v1/chat/completions exactly as you do today.

See the Quickstart for copy-paste curl, Python, and Node examples.

How a Request Flows

1
Your app calls FreeRouter
A standard OpenAI-style request hits https://api.freerouter.com/v1/chat/completions with your FreeRouter key in the Authorization header.
2
FreeRouter selects a gateway
The key's routing rule decides which gateway handles this request — a weighted pick for %-split, or the highest-priority healthy gateway for failover.
3
Keys swapped, format normalized
FreeRouter substitutes your stored provider key, translates the request into the gateway's format if needed, and forwards it.
4
Response normalized back
The gateway's response is normalized to the shape your key speaks and streamed or returned to your app. On failure, failover rules can retry the next gateway.
Next Getting Started