Skip to main content
Coding agents that let you replace their built-in provider with a custom endpoint can usually reach the AI Gateway, even without a dedicated guide.
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

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.
Access keys work in both the 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