All routes operationalMọi routes đang hoạt độngCloudflare edge
AnyRouter

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?",
})
Use it withDùng với
OpenAIxAIAnthropic
andmany morenhiều hơn nữa
Hand it to your AI agentĐưa cho AI agent của bạn
Wire AnyRouter into an existing project.Tích hợp AnyRouter vào một project có sẵn.Set up AnyRouter as the LLM provider for this project.
Smart routingSmart routing

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.

Production-readySẵn sàng cho production

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.

Global edgeGlobal edge

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.

BYOK & presets

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.

</>
Your appApp của bạn
OpenAI SDK
sk-ar-…
AnyRouter
openai-prod pool
key_prod_a
p0w4
key_prod_b
p1w4
key_burst
p2w2
key_legacy
cooldown
Pick by priority or weightChọn theo priority hoặc weight

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ố.

Auto-quarantineTự cách ly key lỗi

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.

Per-key usageUsage theo từng key

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.

CapabilitiesTính năng

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ó.

Chat CompletionsChat Completions
OpenAIOpenAI

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.

MessagesMessages
AnthropicAnthropic

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 OutputsStructured Outputs
BetaBeta

Structured outputs, tools, and agent envelopes for modern AI workflows.Structured outputs, tools và agent envelopes cho các workflow AI hiện đại.

Model CatalogDanh mục model
82+82+

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.

Smart FallbackSmart Fallback
ReliabilityTin cậy

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.

Cost AwareTối ưu chi phí
SavingsTiết kiệm

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.

Sort by cost, TTFT, or TPSSắp xếp theo cost, TTFT, hoặc TPS
RoutingĐịnh tuyến

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.

CatalogDanh mục

Latest modelsModels mới nhất

Browse the newest routes with clear provider identity and direct catalog links.Khám phá các routes mới nhất, ghi rõ provider và link đến danh mục đầy đủ.

Why AnyRouterTại sao AnyRouter

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
TypeScript SDK
openai-node
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!" }],
})
MCPMCP

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.

What the client can doClient có thể làm gì
7 tools exposed via JSON-RPC7 tools qua JSON-RPC
list_modelsget_creditslist_keyscreate_keyrevoke_keylist_presetslist_conversations
User picks the permission level on consentNgười dùng chọn permission level khi consent
Read-onlyChỉ đọc
List keys, presets, credits, and models.Liệt kê keys, presets, credits và models.
StandardStandard
Read everything plus mint and rotate API keys.Đọc mọi thứ, cộng thêm tạo và xoay vòng API keys.
Full accessTruy cập đầy đủ
Adds BYOK and management key access.Thêm quyền truy cập BYOK và management keys.
https://anyrouter.dev/api/v1/mcp