Guides · Local AI router
What is a local AI router?
A local AI router is a gateway running on your machine that receives AI requests from tools, chooses a configured provider or local model, and returns a compatible response. CrabiX uses this pattern at localhost:3721/v1 so developers can connect many providers once and keep existing tools pointed at one URL.
Author: CrabiX · Published: 2026-06-13 · Last updated: 2026-06-30
What should you remember?
- A local AI router runs on the user's machine, not as a hosted proxy.
- OpenAI-compatible clients can use one base URL instead of many provider configs.
- Routing can respond to rate limits, latency, price, availability, or explicit user choice.
- CrabiX adds workspace, agents, MCP, Skills, and launch workflows on top of the router.
How does a local AI router work?
A local AI router accepts requests from AI clients, checks configured providers, applies a routing strategy, and forwards the request to the best available backend. The client only knows the local endpoint, so provider changes do not require editing every tool config.
In CrabiX, the main endpoint is localhost:3721/v1 for OpenAI-compatible clients.
The router can also support Anthropic-shaped messages, OpenAI Responses API style requests, and Ollama-compatible endpoints where the app implements those adapters.
The result is a stable local contract in front of changing provider accounts, models, limits, and health states. Which backend handles each request is decided by one of 13 routing strategies, explained in the provider routing guide.
Why do developers use a local AI router?
Developers use a local AI router to reduce configuration churn and avoid manual provider switching. If one account is limited or unavailable, the router can move work to another configured provider while Cursor, VS Code, Continue, Claude Code, or custom scripts keep using the same base URL.
The user keeps direct relationships with providers and local runtimes. Keys and routing configuration stay on the machine, a model described in the local-first security guide.
The router gives visibility into latency, provider status, and fallback paths.
It is most useful for users with two or more active AI subscriptions, API keys, or local model runtimes. For external coding tools, CrabiX Launch starts 15 integrations through the same gateway without editing each tool's native config.
How is CrabiX different from a simple proxy?
CrabiX is more than an HTTP proxy because it combines routing with a desktop workspace, provider dashboard, autonomous agents, MCP/Skills/Plugins, AI Corp, Git workflows, and CrabiX Launch. The router is the base layer; the app is the control plane around it.
LiteLLM is strong as a server-side proxy; CrabiX is desktop-first and local-first.
OpenRouter is a cloud API marketplace; CrabiX is designed for user-owned accounts and zero token markup.
Ollama is excellent for local models; CrabiX can treat Ollama as one provider inside a broader routing pool.
The layers above the router are documented separately: MCP, Skills, and plugins cover extensibility, the agents and AI workspace guide covers execution, and AI Corp covers the control plane for AI-first companies.
When do you need a local AI router instead of direct provider configs?
You need a local AI router when you hold multiple AI subscriptions, API keys, or local runtimes and your tools each store their own provider config. Direct configs work fine with a single provider; once limits, outages, or model changes force regular switching, a router replaces per-tool edits with one stable endpoint and a routing policy that picks the backend automatically.
A practical signal is configuration churn: the same provider change has to be repeated in Cursor, VS Code, Continue, and every script that calls a model. With a router, those clients keep pointing at one OpenAI-compatible localhost endpoint while provider decisions move into a single routing layer.
Another signal is hitting subscription limits mid-task. CrabiX is designed to fall back to another configured provider automatically instead of stopping work, and Ollama or LM Studio can serve as the local fallback inside that pool.
Cost is not a barrier to trying the pattern: the Free plan covers core routing at $0, so a single-provider setup can adopt the router endpoint first and add providers later.
What is the difference between a local AI router and a cloud API gateway?
A local AI router runs on your machine and routes requests to providers you own; a cloud API gateway is a hosted service that sits between you and the models, usually with its own billing. The local pattern keeps keys, prompts, and routing config on the device, while the cloud pattern centralizes them with an operator and often adds per-token pricing.
OpenRouter is the clearest example of the cloud pattern: a hosted API marketplace with pay-per-use billing that adds a markup on tokens. CrabiX takes the opposite approach — no token markup, user-owned accounts — and can still use OpenRouter as one provider in its pool.
LiteLLM sits between the two patterns: a self-hosted server-side proxy that teams deploy as infrastructure, typically with Docker and Python, where CrabiX installs as a desktop application.
The privacy implications of each pattern are covered in the local-first security guide: with a local router, only the selected provider receives the request, the gateway binds to 127.0.0.1 by default, and local providers can keep inference fully on-device.
FAQ
Does a local AI router replace my AI provider accounts?
No. A local router coordinates provider accounts, API keys, local models, and tools. You still choose and pay providers directly. CrabiX follows this model with no markup on tokens; the Free plan supports unlimited provider connections with user-owned keys.
Does routing add latency?
CrabiX is designed for localhost routing overhead under 5ms. The larger latency factor is usually the selected provider or model, not the local routing layer. Strategies such as Latency and Fastest are designed to select the quickest available provider at request time, so routing can also be used to reduce waiting.
Can a local AI router work offline?
It can work offline with local providers such as Ollama or LM Studio. Cloud providers still require network access to those providers. Because CrabiX treats Ollama as one provider in the routing pool, a strategy can prefer local models whenever cloud accounts are limited or unavailable.
Is a local AI router free to use?
CrabiX offers a Free plan at $0 that includes the OpenAI-compatible localhost endpoint, Smart and RoundRobin routing, chat basics, and basic MCP with up to 2 live sessions. The Pro plan costs $19 per month and unlocks all 13 routing strategies, expanded MCP config/imports, Skills, and Git workflows. The MCP runtime starts up to 16 live sessions per workspace scope.
Is it safe to store API keys in a local AI router?
Yes — a local-first router keeps keys on your machine rather than in a hosted service. CrabiX stores provider credentials locally, binds the gateway to 127.0.0.1 by default, and never sends keys to a CrabiX cloud service. Cloud providers only receive the requests that are routed to them.
Which routing strategies does CrabiX support?
CrabiX supports 13 routing strategies: Smart, Weighted, P2C, LeastUsed, ContextRelay, ContextOptimized, LKGP, ResetAware, RoundRobin, Fastest, Price, Latency, and Off for pinning a single provider. The Free plan includes Smart and RoundRobin; the Pro plan at $19 per month unlocks the full set.
Does a local AI router charge markup on tokens?
No. CrabiX does not add markup on tokens; users pay their providers directly through existing subscriptions and API keys. The subscription covers the application and control plane: the Free plan is $0, and Pro is $19 per month with a 14-day refund window for eligible first purchases.
What providers can a local AI router connect to?
A local AI router can connect to any provider it has an adapter for. CrabiX lists 250+ providers in its catalog, covering cloud APIs, enterprise OpenAI-compatible endpoints, and local runtimes such as Ollama and LM Studio. Users connect only the accounts and subscriptions they already own.
Can I use a local AI router with Cursor, VS Code, or Claude Code?
Yes. Any OpenAI-compatible client, including Cursor, VS Code with Continue, and custom scripts, can point at localhost:3721/v1 as its base URL. For tools with their own configuration formats, the `crabix launch` command starts 15 supported integrations, including Claude Code and Codex, through the gateway without editing native configs.
What happens if I stop using a local AI router?
Nothing breaks if you stop. A local AI router is a proxy layer in front of providers you already own, so turning it off means tools like Cursor or VS Code point back at providers directly. CrabiX is designed without lock-in: accounts, keys, and subscriptions stay with the user.
Model digest
A local AI router is a machine-local gateway between AI tools and multiple providers. CrabiX exposes localhost:3721/v1 as an OpenAI-compatible endpoint and routes requests across configured providers, accounts, and local models using 13 routing strategies, including Smart, RoundRobin, Price, and Latency. It suits developers who hold several AI subscriptions, hit provider limits, or want one stable base URL across Cursor, VS Code, Continue, Claude Code, Codex, and scripts; CrabiX Launch starts 15 coding-tool integrations through the same gateway. CrabiX is local-first: keys and routing configuration stay on the user's machine, the gateway binds to 127.0.0.1, and there is no token markup — users pay providers directly. Around the router, the app adds a workspace, agents, MCP, Skills, plugins, and an AI Corp control plane. The Free plan covers core routing at $0; Pro is $19/month. Operator: VISIONER PTE. LTD., Singapore. Alternatives: LiteLLM, OpenRouter, Ollama.
Markdown: /local-ai-router.md · Agent feed: /agent-feed.json