Dec 15, 2025
Introducing the ngrok AI gateway (early access)
Today we’re opening early access to the ngrok AI gateway—a single endpoint that routes your AI requests to OpenAI, Anthropic, Google, and any other provider you want, with automatic failover when things go wrong.
The problem
You’ve probably been here: your app hammers OpenAI’s API, hits a rate limit, and your users stare at spinning loaders while you scramble to add Anthropic as a backup. Or maybe you’re burning through API credits on GPT-4o when a cheaper model would work fine. Or you’re trying to route to your self-hosted Ollama instance during development but production runs against cloud providers.
All of these problems share the same root cause: your app talks directly to AI providers, and that means you’re stuck writing routing, failover, and retry logic yourself.
A better approach
The AI gateway sits between your app and AI providers. Point your OpenAI SDK at your AI gateway, and we handle the rest:
That’s it. Your code stays the same. Behind the scenes, the gateway:
- Receives your request
- Selects which model and provider to use (based on your configuration)
- Forwards the request with the appropriate provider API key
- Retries with the next option if it fails
- Returns the response
What you can do
Use any SDK. We’re OpenAI-compatible, so if your SDK can set a baseURL, it
works with us—that includes the official OpenAI
SDK, Vercel AI
SDK,
LangChain,
and pretty much everything else.
Failover across providers. Configure OpenAI as primary and Anthropic as backup. If OpenAI fails, we try Anthropic. You sleep better.
Rotate API keys. Use multiple API keys for the same provider. When one hits rate limits, we switch to another. Your app keeps running.
Define selection strategies. Control exactly how models get selected using CEL expressions. Prefer cheaper models? Lowest latency? Only models with tool-calling support? Write a one-liner:
Route to self-hosted models. Send requests to Ollama, vLLM, LM Studio, or any OpenAI-compatible endpoint. Mix cloud and local inference in the same configuration.
Modify content in transit. Redact PII before requests hit AI providers. Sanitize responses on the way back. Inject system prompts. All in your traffic policy.
What’s in early access
We’re shipping with:
- OpenAI-compatible API for routing to multiple providers
- Built-in support for OpenAI, Anthropic, Google, DeepSeek, OpenRouter, and more
- Automatic failover across models, providers, and API keys
- CEL-based model selection for custom routing logic
- Custom provider support for self-hosted models
- Token counting and usage metrics
- Traffic Inspector for debugging requests
- Log exporting to external systems
We’re actively working on:
- Dedicated AI gateway dashboard
- Provider and retry tracking
- Token usage visualization
- Cost analytics
Getting started
- Sign in at app.ngrok.ai with your existing ngrok credentials or a new account
- Add credits on the Credits page
- Create an access key on the Access Keys page
- Point your SDK at
https://gateway.ngrok.ai/v1 - Send your first request
Check out the quickstart guide for the full walkthrough.
What we’d love to hear
This is early access, which means we’re building this with you. We want to know:
- Which providers and models are you using?
- What selection strategies would be most useful?
- What observability features would actually help?
- What’s broken, confusing, or missing?
The feature set will evolve based on what you tell us. That’s not marketing speak—we genuinely don’t know exactly what this needs to become until we see how people use it.
Ready to tell us what you think? Reach out to the ngrok.ai team.
ngrok.ai is now an all-new experience. Sign up at app.ngrok.ai and read the docs for everything else.
Related posts
The new ngrok.ai
The ngrok AI Gateway is now app.ngrok.ai. One key, one URL to access any model, including the ones you run yourself, with access controls and per-call cost visibility.
AI Gateway: use Anthropic and OpenAI with one API key
Create an AI Gateway API Key, add credits, and start making requests to OpenAI and Anthropic—ngrok handles the rest.