One endpoint for every model.
MIT-licensed AI gateway with one OpenAI- and Anthropic-compatible endpoint for 30+ LLM providers: failover, caching, budgets, MCP, and usage analytics.
Open-source AI gateway
An MIT-licensed LLM gateway for 30+ providers. Route, cache, and meter every model call, keep provider keys private, and give your team control over reliability and spend, without changing your SDK. Deploy it to NEXUS AI in one click, including on the Free plan, or self-host it with Docker or a single binary.
See the AI Gateway in action
Explore provider configuration, audit logs, usage analytics, budgets, API keys, workflows, plugins, and guardrails in the NEXUS AI Gateway dashboard.
Failover and routing
Route across providers with retries, circuit breakers, model fallbacks, and virtual model aliases your apps can call by a stable name.
Caching, budgets, and rate limits
Serve repeated requests from an exact-match cache and an optional semantic cache. Cap requests and tokens per minute, in-flight concurrency, and spend per user path, provider, model, or request label, and track tokens and estimated costs in one dashboard.
Security, guardrails, and MCP
Provider credentials stay in the gateway; apps use gateway keys you can rotate or revoke. Apply request and response guardrails, keep an audit log of every model call, and aggregate MCP servers behind one authenticated endpoint with namespaced tools.
OpenAI and Anthropic compatible
Chat, embeddings, audio, images, files, batches, and realtime on /v1, plus Anthropic Messages on /v1/messages. Change the base URL, use a gateway key, and the official SDKs work unchanged.
Open source and Pro
Routing, failover, caching, budgets, rate limits, guardrails, audit logs, the MCP gateway, the dashboard, workflows, and plugins are MIT-licensed. AIGateway Pro is an optional commercial build that adds prompt compression, intelligent routing (beta), OIDC single sign-on, and quota templates; without a license it runs as the open-source gateway.
30+ model providers
OpenAI, Anthropic, Google Gemini, Google Vertex AI, Azure OpenAI, Amazon Bedrock, xAI Grok, DeepSeek, Groq, Cerebras, Fireworks AI, Cohere, OpenRouter, Hugging Face, Cloudflare Workers AI, Oracle GenAI, Alibaba Cloud Model Studio, MiniMax, Z.ai, Xiaomi MiMo, Kimi Code, Meta Llama, ElevenLabs, Chutes, Kilo, OpenCode Go, Hetzner, and ChatGPT subscriptions, plus self-hosted Ollama, vLLM, llama.cpp, SGLang, and llm-d.
Works with coding agents and chat UIs
Setup guides cover Claude Code, Codex, Cursor, OpenCode and other coding agents, Open WebUI, LibreChat, n8n, the OpenAI Agents SDK, Langfuse, OpenTelemetry, Prometheus, and Caddy.
Quick start
Deploy to NEXUS AI with the button or with nexus deploy source and choose the username and password for the first dashboard admin. Sign in at /admin/dashboard, add your providers, and create API keys for your apps, then call /v1/chat/completions with one of those keys. On the Free plan data lives in SQLite inside the container; attach PostgreSQL for data that lasts.
Frequently asked questions
What is an AI gateway?
An AI gateway, also called an LLM gateway, sits between your applications and model providers. Your app calls one endpoint, and the gateway handles provider selection, failover, credentials, caching, budgets, and usage tracking, so that logic lives in infrastructure instead of in every service you write.
Is NEXUS AI Gateway open source?
Yes. The gateway is MIT-licensed and the full source is on GitHub, including routing, failover, caching, budgets, rate limits, guardrails, audit logs, the MCP gateway, and the dashboard. AIGateway Pro is an optional commercial build that adds prompt compression, intelligent routing, OIDC single sign-on, and quota templates. Without a license it runs as the open-source gateway.
Do I have to rewrite my code to use NEXUS AI Gateway?
No. The gateway accepts OpenAI-compatible requests at /v1 and Anthropic-compatible requests at /v1/messages, so the official SDKs work once you change the base URL and use a gateway key. Your prompts, models, and response handling stay as they are.
Which model providers are supported?
More than 30, including OpenAI, Anthropic, Google Gemini and Vertex AI, Azure OpenAI, Amazon Bedrock, xAI Grok, DeepSeek, Groq, Cerebras, Fireworks AI, Cohere, OpenRouter, Hugging Face, and Cloudflare Workers AI, plus self-hosted models on Ollama, vLLM, llama.cpp, SGLang, and llm-d. Apps address a stable virtual model name while the gateway routes to the provider behind it.
How does it reduce AI spend?
Caching serves repeated requests without calling a model, virtual models let you move traffic to a cheaper model without changing application code, and budgets and rate limits cap what any user path, team, or model can spend. Usage analytics show where the cost actually goes. AIGateway Pro adds prompt compression and intelligent routing for further savings.
What happens when a provider fails or rate limits?
The gateway fails over to the next provider in the route, so a single provider outage or rate limit does not take your feature down. Retries, fallbacks, and circuit breakers are configured once in the gateway rather than in each application.
Are my provider API keys exposed to applications?
No. Provider keys are held by the gateway. Applications authenticate to the gateway with their own key, which means you can rotate a provider credential, or revoke one app's access, without redeploying anything.
Can I use it with Claude Code, Cursor, or Codex?
Yes. Point the tool at the gateway instead of the provider and it keeps working, with every request tracked, budgeted, and logged. The gateway docs include setup guides for Claude Code, Codex, Cursor, OpenCode, Open WebUI, LibreChat, n8n, and the OpenAI Agents SDK.
How is it different from LiteLLM or Portkey?
All three put one API in front of many model providers. NEXUS AI Gateway is a single Go binary, MIT-licensed, with the dashboard, audit logs, budgets, guardrails, and MCP gateway built in, and it deploys to NEXUS AI in one click. Compare the features you need on each project's own documentation before choosing.
How do I run the gateway myself?
Use the Deploy to NEXUS AI button to run it in your own NEXUS AI account in a few clicks, run the Docker image anywhere, or build the binary from source. On the Free plan it stores data in SQLite inside the container, which is reset when the container is recreated; for lasting data, attach PostgreSQL or use MongoDB.
About NEXUS AI
NEXUS AI is an agentic AI app builder and full-stack deployment platform. Explore the AI App Builder, learn more on the About page, read the documentation, or contact the team through nexusai.run/contact.
Start for free · Read the documentation · About NEXUS AI · Contact