Want instructions for a specific coding agent?
Log in to app.ngrok.ai, click Give feedback, and let the team know which one.
What you’ll need
- A coding agent that accepts a custom base URL and API key.
- An access key from app.ngrok.ai.
Connect your agent
Every agent needs the same three values:
Anthropic-format agents append
/v1/messages to the base URL themselves, so leave /v1 off for those.
Agents that fill their model picker from GET /v1/models see the models your access key is allowed to call, listed by full catalog ID such as openai/gpt-5.5.
Those IDs work as the model value, too.
Pick an API format
The gateway serves these endpoints, so an agent can use whichever format it speaks:/v1/messages only reaches providers that support the Anthropic Messages surface.
For a model you run yourself with Ollama, LM Studio, or vLLM, point the agent at /v1/chat/completions or /v1/responses.Authorization: Bearer and x-api-key headers, so you don’t need to match the header your agent sends.
Test the connection
Send a prompt from the agent, then confirm the request in AI Gateway observability in app.ngrok.ai. If the agent reports an error, check Debugging and the error codes reference.Next steps
- Use with other SDKs: Raw HTTP examples for each API format
- Use a model you run yourself: Reach a model on your own machine, such as Ollama or vLLM
- Restrict providers and models: Scope what an access key can call