Prerequisite: Complete the Quickstart to create an access key on app.ngrok.ai.
- One access key for every provider in the model catalog, billed to your credits or your own provider keys
- Per-request observability, with usage you can group by access key
- Fallback models and automatic retries when a provider fails
- Limits on which providers and models each key can call
- A path to models you run yourself, such as Ollama or vLLM
Supported agents
Claude Code
Anthropic’s agentic coding tool, configured with two environment variables
Codex
OpenAI’s terminal coding agent, configured as a custom model provider
Cursor
AI code editor, configured with an OpenAI base URL override
Hermes
Nous Research’s terminal agent, configured with the ngrok plugin
OpenCode
Open-source terminal agent, configured as a custom provider
Pi
Terminal coding agent, configured in its models file
Zed
Code editor with an agent panel, configured as an OpenAI-compatible provider
Other agents
Any agent that accepts a custom OpenAI or Anthropic base URL
How each agent connects
Each agent speaks one API format, which decides the base URL it needs:
The format also decides which models an agent can reach.
Chat Completions reaches the most providers.
The Messages and Responses formats only reach providers that support them, so Claude Code works with Claude models and Codex works best with OpenAI models.
Set up for agent traffic
Coding agents send long, streaming requests, often many per task. A few settings keep that traffic manageable:- Create a separate access key for each agent or teammate, so you can group usage by access key and revoke one without touching the others.
- Set
totalTimeoutto15min account settings. A saved total timeout caps the whole stream, and saving any account setting stores the2mdefault, which can cut off a long agent response. - Scope each key to the models it needs with an access key configuration.
Next steps
- Claude Code: Route Claude Code through the gateway
- Codex: Add the gateway as a Codex model provider
- Use a model you run yourself: Reach a model on your own machine, such as Ollama or vLLM