One API for every AI model.Một API cho mọi model AI.
Route traffic across providers with fallback, observability, and BYOK — from a single OpenAI-compatible endpoint built on Cloudflare's edge.Routing traffic giữa nhiều provider với fallback, observability và BYOK — từ một endpoint OpenAI-compatible chạy trên Cloudflare edge.
import { streamText } from "ai"
const result = streamText({
model: "openai/gpt-5.5",
prompt: "Why is the sky blue?",
})Provider fallback, weighted pools, and cost-aware policies — all without rewrites.Provider fallback, weighted pools và chính sách tối ưu chi phí — không cần viết lại code.
Per-key rate limits, BYOK isolation, and audit logs from day one.Rate limit theo từng API key, cô lập BYOK và audit logs ngay từ ngày đầu.
Built on Cloudflare Workers — low latency anywhere, no cold starts.Chạy trên Cloudflare Workers — độ trễ thấp ở mọi nơi, không có cold start.
Pool your provider keys, or front many models with one preset name.Gom API key thành pool, hoặc đặt nhiều model sau một tên preset.
Drop multiple OpenAI, Anthropic, or Google keys into a single pool — or bundle models from many providers behind @preset/name. AnyRouter spreads load across healthy keys and quarantines burned ones automatically — no client changes.Cho nhiều keys OpenAI, Anthropic hoặc Google vào chung pool — hoặc gom model từ nhiều nhà cung cấp sau @preset/name. AnyRouter phân bổ load giữa các keys còn hoạt động và tự động cách ly key bị burn — không cần sửa client.
Pin a primary key with fallback, or split traffic proportionally by weight.Cố định một key chính với fallback, hoặc chia traffic theo trọng số.
Keys returning 401 / 429 are parked until they recover — no client changes.Key trả 401 / 429 được cách ly tự động đến khi hồi phục — không cần sửa client.
See spend, RPS, and error rate broken down by individual upstream key.Xem chi phí, RPS và tỉ lệ lỗi theo từng upstream key.
Production-ready building blocksKhối xây dựng sẵn sàng cho production
Everything teams need to route AI reliably without changing their existing app structure.Mọi thứ team cần để routing AI ổn định mà không phải thay đổi cấu trúc ứng dụng hiện có.
POST to /api/v1/chat/completions with any OpenAI-compatible client.POST tới /api/v1/chat/completions từ bất kỳ client OpenAI-compatible nào.
POST to /api/v1/messages for Anthropic-format requests.POST tới /api/v1/messages cho các yêu cầu theo định dạng Anthropic.
Structured outputs, tools, and agent envelopes for modern AI workflows.Structured outputs, tools và agent envelopes cho các workflow AI hiện đại.
Compare routes, context windows, and per-token pricing across providers.So sánh routes, context window và giá theo token giữa các provider.
Automatic provider failover when a model is down or rate-limited.Tự động failover sang provider khác khi một model lỗi hoặc bị rate-limit.
Route traffic based on cost. Balance quality and spend automatically at the edge.Routing theo chi phí. Cân bằng chất lượng và chi tiêu tự động tại edge.
Set provider.sort to cost, ttft, or tps and we rerank upstreams from live traffic on every request.Đặt provider.sort thành cost, ttft hoặc tps để xếp hạng lại upstream từ traffic thực mỗi request.
One API, one dashboard, one edgeMột API, một dashboard, một edge
Keep your current integrations. Switch the base URL and route traffic with fallback, usage tracking, and cost awareness built in.Giữ nguyên integrations hiện tại. Chỉ cần đổi base URL và routing traffic với fallback, usage tracking và tối ưu chi phí có sẵn.
- OpenAI-compatible — change base URL onlyOpenAI-compatible — chỉ cần đổi base URL
- BYOK key pools with weighted round-robinBYOK key pools với weighted round-robin
- Provider fallback with health checkingProvider fallback với health check
- Cost-aware routing at the edgeRouting tối ưu chi phí tại edge
- Real-time usage tracking per key and modelTheo dõi usage real-time theo từng key và model
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!" }],
})AnyRouter inside Claude, Cursor, and OpenCodeAnyRouter ngay trong Claude, Cursor và OpenCode
The AnyRouter MCP server lets any Model Context Protocol client browse the catalog, manage API keys, and check credits — all from inside the editor.MCP server của AnyRouter cho mọi client hỗ trợ Model Context Protocol duyệt catalog, quản lý API keys và xem credits ngay trong editor.