One edge for all your AI traffic

Key load balancing, provider fallback, and cost-aware routing — all from the edge, behind one API.

Start routingOpen Models
29
Models
13
Providers
4
Categories

Start routing in minutes

Drop in your existing OpenAI client with a new base URL. No code changes beyond configuration.

TypeScript
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://anyrouter.dev/api/v1",
  apiKey: "sk-ar-...",
});

const completion = await openai.chat.completions.create({
  model: "google/gemini-3.1-flash-lite",
  messages: [
    { role: "user", content: "Hello!" }
  ],
});

console.log(completion.choices[0].message);

Production-ready features

Everything teams need to route AI reliably without changing their existing app structure.

Chat Completions

POST to /api/v1/chat/completions with any OpenAI-compatible client.

Messages

POST to /api/v1/messages for Anthropic-format requests.

Structured Outputs

Structured outputs, tools, and agent-friendly envelopes for modern AI workflows.

Model Catalog

Compare routes, context windows, and per-token pricing across all providers.

Smart Fallback

Automatic provider failover when a model is down or rate-limited. Zero downtime.

Cost Aware

Route traffic based on cost. Set preferences to balance quality and spend automatically.

Fresh from the catalog

Browse the latest routes with clear provider identity and fast access to Open Models.

Qwen
Qwen3 Embedding 0.6Bqwen/qwen3-embedding-0.6b
Moonshot AI
Kimi K2.6moonshotai/kimi-k2.6
Google
Gemini 3.1 Flash Litegoogle/gemini-3.1-flash-lite
Google
Gemma 4 26B A4Bgoogle/gemma-4-26b-a4b-it
Open Models

Why AnyRouter

Ship with one API, one dashboard, and one edge. Keep your current integrations, switch to base URL, and route traffic with fallback built in.

  • OpenAI-compatible — change base URL only
  • BYOK key pools with weighted round-robin
  • Provider fallback with health checking
  • Cost-aware routing at the edge
  • Real-time usage tracking per key and model
Start routingOpen Models
cURL
curl https://anyrouter.dev/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-ar-..." \
  -d '{
  "model": "google/gemini-3.1-flash-lite",
  "messages": [{"role": "user", "content": "Hello!"}]
}'