Why use the AI Gateway?
Start without provider accounts
Use built-in OpenAI and Anthropic with an access key and credits—no OpenAI or Anthropic signup required.
Route to Self-Hosted Models
Route to local models like Ollama or vLLM alongside cloud providers with a model you run yourself.
Automatic Failover
If one provider or key fails, ngrok.ai automatically tries the next model or key.
Compatible With Popular SDKs
Works with official and third-party SDKs. Point the base URL at
gateway.ngrok.ai and use your access key.Quick example
Sign up at app.ngrok.ai and point your SDK at the gateway with your access key:
On each request, the AI Gateway:
- Receives your request with your access key at
gateway.ngrok.ai - Validates the key and loads your account configuration
- Selects which model and provider to use
- Forwards the request using ngrok.ai inference or your provider keys
- Retries with the next key or model on failure
- Returns the response
What can you do?
| Use Case | Description |
|---|---|
| Use without provider accounts | Get started with OpenAI and Anthropic using an access key and credits |
| Per-key routing | Access key configurations scope providers, models, and credentials |
| Multi-model failover | List multiple models in a request; the gateway tries each in order |
| Multi-key failover | Attach multiple provider keys in a configuration routing rule |
| Self-hosted models | Route to Ollama, vLLM, or other servers with a model you run yourself |
Next steps
Quickstart
Get ngrok.ai integrated in 5 minutes
Access Keys
Learn about managing access to ngrok.ai
How It Works
Request flow and failover behavior
SDK Integration
Connect your application to ngrok.ai
Bring Your Own Keys
Use your own provider API keys for providers