Categories
Self-Hosted Developer Tools AI Gateway Coding Agents API Management OpenAI Compatible Usage Analytics LLM RouterStars
Forks
Watchers
Developer links
TRouteAI
More than 290 AI providers sit behind one OpenAI- and Anthropic-compatible address in TRouteAI, and a combo moves to its next model when the current one fails or hits a usage limit. A combo is one model name that chooses among several provider models by one of 19 routing strategies, including in order, round robin, weighted, and cost-optimized. An account whose 5-hour, weekly, or daily limit is used up is skipped without a request until it resets. Chat, Responses, embeddings, images, and audio follow the OpenAI format, and /v1/messages follows Anthropic's. Any compatible server can join as a custom provider. Claude Code connects with a base URL, a key, and a combo name, /model lists the gateway's models once discovery is on, and context-limit errors arrive in wording that lets it compact and carry on. Create one API key per app to follow its requests, tokens, and estimated cost, find its calls in Logs, or switch it off at any time. When every slot of a round-robin combo is busy, requests queue for two minutes by default, a priority header or per-key default puts interactive ones first, and a busy answer carries a Retry-After. Provider credentials are encrypted at rest, nothing is sent as telemetry, and Settings swaps the app's name and logo for your own. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. MIT licensed.
Benefits
- Keep working when a model fails
- Combos fall back on errors and limits, accounts with spent quotas are skipped without a request, and a busy round-robin combo holds requests in one queue instead of refusing them at once.
- One base URL for every client
- Claude Code, Codex CLI, the OpenAI and Anthropic SDKs, and curl share one base URL, and the Endpoints page prints copy-paste setup for curl, Python, JavaScript, and Claude Code.
- See what every app costs
- The key list shows each key's requests, spend, and last use, while Usage charts tokens and estimated cost for all keys or one over ranges from one day to all time.
- Installs with one npm command
- Run npm install -g trouteai, then trouteai, and the dashboard and API start on port 20017. Node.js 26 is recommended, trouteai update upgrades it, and one data folder holds the database, settings, and logs.
Features
- One API for Every Provider
- Serves chat completions, Responses, models, embeddings, images, and audio in OpenAI format and /v1/messages in Anthropic format, fronting 290+ providers added by API key or account sign-in.
- 19 Routing Strategies
- Choose priority, weighted, round-robin, fill-first, least-used, cost-optimized, cache-optimized, or context-optimized ordering, plus auto/* combos that resolve from the providers you have connected.
- Made for Coding Agents
- Claude Code model discovery, effort and thinking settings passed through, the conversation sent as the client built it, and Codex CLI served through /v1/responses.
- Request Queue and Priority
- A busy round-robin combo holds requests for up to two minutes; the x-trouteai-priority header or a per-key default places interactive requests ahead of background ones.
- Logs and Usage Analytics
- Request logs show status, model, provider, key, combo, tokens, speed, and duration with export; Usage adds utilization, combo health, cache health, and route trace tabs.
- Locked Down by Default
- The trouteai command listens on this computer only until HOST is set; the dashboard needs a password, /v1 needs an API key, and logins are rate-limited.