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. The list also includes your virtual models, with owned_by set to virtual-model.

Pick an API format

The gateway serves these endpoints, so an agent can use whichever format it speaks:
Each endpoint also reaches models that use other API formats. The gateway translates the request and returns the response in the agent’s format. See Use any model with any SDK for what translates.
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