Put OpenAI, Anthropic, Gemini, DeepSeek and your local models behind one OpenAI-compatible API — and govern your MCP tools and A2A agents through the same gateway.
Keys out of your code · automatic failover · guardrails · spend limits and usage tracking. One gateway to govern it all — on your device or our cloud.
Every app with a provider key in its config is another secret to protect, rotate, and monitor — and a bill no one is watching. With the gateway, provider keys live in one place — encrypted, injected at the gateway, never in your code. Your apps authenticate with an ha-gw key you can scope and revoke.
Cloud-hosted, on your own device, or both — a guided checklist gets you to a working request in about two minutes.
Add an LLM provider key, or point it at a model running on your own AI Server — local models need no key at all.
Your apps use the OpenAI API with the gateway's base URL. Copy a ready-made snippet or test in the built-in playground.
curl https://api.hostanywhere.ai/v1/chat/completions \ -H "Authorization: Bearer ha-gw-..." \ -H "Content-Type: application/json" \ -d '{"model":"auto","messages":[{"role":"user","content":"Hi"}]}'
Change one URL. Keep your existing OpenAI SDK.
A route is a virtual model: your app calls smart (or the built-in auto) and the gateway resolves it — your local DeepSeek first, a cloud model as fallback, each target with its own timeout and retries. A circuit breaker skips a failing provider for 30 seconds after three consecutive errors, so a dead provider doesn't add its timeout to every request. Add conditional rules to route by header, user, prompt size, or image presence — and change what a name means in the dashboard without touching app code.
Identity (who can call AI), routing (which model answers), guardrails (what's allowed in and out), spend (limits on what's spent), observability (who used what, when):
| Through the gateway | Direct provider calls | |
|---|---|---|
| Provider keys | Encrypted on the gateway | Pasted into every app |
| Guardrails on prompts & responses | Yes — both directions | None |
| Spend | Limits & tracking in one place | Managed separately per provider |
| Provider outage | Automatic failover | Your app breaks |
| Switching models | Edit the route | Redeploy the app |
| Usage visibility | Per route, provider and model | Per provider, if at all |
Guardrails screen traffic in both directions — prompts and tool arguments going in, responses and results coming out. Advanced AI guardrails are part of the Developer plan and above.
AI traffic crosses three boundaries: apps calling models, agents calling tools, and agents calling other agents. The gateway governs all three — one identity layer, one policy layer, one spend layer.
App → model. Routes with automatic failover across 17 cloud providers and your own local models.
Agent → tools & data. Aggregates your MCP servers behind one URL, screens every tool call — arguments in, results out — and injects each server's credential at the gateway.
Agent → agent. Fronts your agents for agent-to-agent calls under the same keys, guardrails, and usage.
Same providers, same routes, same keys, same guardrails, same usage — wherever the gateway runs.
Local: requests to your private AI servers and tools stay on your network.
Cloud: fully hosted — nothing to run on your devices.
Hybrid: hosted endpoint, private upstream — your AI server is never publicly exposed.
Gateways, providers, keys, routes, guardrails, spend limits, and the playgrounds — the complete 17-minute setup guide:
The AI Gateway is included on every plan, including Free. Advanced AI guardrails are part of the Developer plan and above.
Yes — point any OpenAI-compatible SDK or tool at the gateway's base URL with an ha-gw key, and call a route name like auto as the model. Resolution, failover, guardrails and spend tracking happen on the gateway.
OpenAI, Anthropic, Google Gemini, Groq, Mistral, DeepSeek, xAI (Grok), Together, Perplexity, Fireworks, OpenRouter, Cerebras, Cohere, NVIDIA NIM, DeepInfra, Azure OpenAI and AWS Bedrock — plus your own local models via AI Server, which need no provider key.
On your device (ports on your private network), as hosted endpoints at api.hostanywhere.ai, or both. All gateways share one account-level configuration: providers, routes, keys, guardrails, spend limits and usage.
Yes — requests are delivered over your agent's reverse tunnel, so private upstreams on your devices serve hosted traffic without being exposed to the internet.
Policies that screen requests and responses — on the LLM gateway that's prompts in and completions out; on the MCP gateway it's tool arguments in and results out. Set a policy per route. Advanced AI guardrails are available on Developer plans and above.
The Overview checklist walks you from zero to a working, guardrailed call.
AI Gateway documentation · What is an AI gateway? — the complete guide · Pricing