Skip to main content
Earlier versions of the AI Gateway ran as a Traffic Policy ai-gateway action on a Cloud or Agent endpoint, with a custom *.ngrok.app URL and provider keys defined in your policy. The AI Gateway now runs on a shared URL you manage from app.ngrok.ai. If you’re starting fresh, follow the Quickstart instead.

What changed

Old setupNew setup
Custom endpoint URL (https://*.ngrok.app)https://gateway.ngrok.ai
Endpoint-bound gateway keyAccess key (account-scoped)
Provider keys in Traffic PolicyProvider keys in app.ngrok.ai
Traffic Policy model_selection (CEL)Model in the request body and access key configurations
Provider and model allowlists in Traffic PolicyAccess scope on configurations
Traffic Policy request/response modificationNot available on gateway.ngrok.ai

Migration steps

1

Add provider keys in app.ngrok.ai

For each upstream credential in your Traffic Policy, add a provider key. For OpenAI and Anthropic you can use credits with ngrok.ai inference instead.
2

Create access key configurations

Recreate allowlists and routing rules as access key configurations. Attach stored provider keys in routing rules.
3

Create access keys

Create an access key for each client and assign the appropriate configuration.
4

Update your applications

Point baseURL / base_url at https://gateway.ngrok.ai and use the new access key. Remove any provider API keys from client code.
5

Decommission old endpoints

Remove the Traffic Policy ai-gateway action from your endpoints once traffic has moved.

What isn’t available on gateway.ngrok.ai

  • CEL model_selection and api_key_selection in Traffic Policy—use request models and access key configurations instead
  • Traffic Policy request and response modification

Next steps