One API for all your AI.

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.

Start free Watch the walkthrough
Included on every plan OpenAI-compatible 17+ AI providers + local models

Stop scattering API keys across your apps.

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.

1

Enable a gateway

Cloud-hosted, on your own device, or both — a guided checklist gets you to a working request in about two minutes.

2

Connect a destination

Add an LLM provider key, or point it at a model running on your own AI Server — local models need no key at all.

3

Create a key and call

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.

💻Your appknows one ha-gw key
→
🛡Gatewayholds the real keys
→
☁OpenAI · Anthropic · Gemini …+ your local models

Call a name, not a model.

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.

Governance that actually governs

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 gatewayDirect provider calls
Provider keysEncrypted on the gatewayPasted into every app
Guardrails on prompts & responsesYes — both directionsNone
SpendLimits & tracking in one placeManaged separately per provider
Provider outageAutomatic failoverYour app breaks
Switching modelsEdit the routeRedeploy the app
Usage visibilityPer route, provider and modelPer 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.

And it doesn't stop at models.

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.

/v1 · OpenAI API

LLM Gateway

App → model. Routes with automatic failover across 17 cloud providers and your own local models.

/mcp

MCP Gateway

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.

/a2a

A2A Gateway

Agent → agent. Fronts your agents for agent-to-agent calls under the same keys, guardrails, and usage.

Run it where you want. Local. Cloud. Hybrid.

Same providers, same routes, same keys, same guardrails, same usage — wherever the gateway runs.

💻App
→
🛡Gateway on your device
→
🤖Your AI server

Local: requests to your private AI servers and tools stay on your network.

💻App
→
☁Hosted gatewayapi.hostanywhere.ai
→
🌐Cloud AI provider

Cloud: fully hosted — nothing to run on your devices.

💻App
→
☁Hosted gatewayapi.hostanywhere.ai
→encrypted reverse tunnel
🤖Your private AI server

Hybrid: hosted endpoint, private upstream — your AI server is never publicly exposed.

Ready to build? The full walkthrough.

Gateways, providers, keys, routes, guardrails, spend limits, and the playgrounds — the complete 17-minute setup guide:

Questions

Is it free?

The AI Gateway is included on every plan, including Free. Advanced AI guardrails are part of the Developer plan and above.

Is it a drop-in OpenAI API replacement?

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.

Which providers are supported?

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.

Where does it run?

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.

Can the hosted gateway use models on my own hardware?

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.

What are guardrails, concretely?

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.

Connect your first AI provider in two minutes.

The Overview checklist walks you from zero to a working, guardrailed call.

Start free

AI Gateway documentation · What is an AI gateway? — the complete guide · Pricing

Solutions
Private Network Phone Backup Private AI Server AI Gateway Internet Gateway VPN Gateway Public URLs
More
Docs Blog Pricing Download