- OpenAI-compatible Chat Completions: if your OpenAI client already uses the gateway URL and your ngrok access key, change only the model name and send requests to
/v1/chat/completions. - Native Gemini GenerateContent: send requests to
/v1beta/models/{model}:generateContentor:streamGenerateContentwith a Gemini client. - Native Gemini Interactions: send stateless create requests to
/v1beta/interactions, with a JSON response or a stream of server-sent events (SSE).
/v1/responses) doesn’t reach Google models.
Google is a built-in provider with ngrok.ai inference available, so a provider key is optional.
Add your own Google key to bill usage to your Google account instead of your ngrok credits.
Setup
1
Create an access key and add credits
Follow the quickstart to create an access key and purchase credits in app.ngrok.ai.
2
Store your Google API key (optional)
Skip this step to use ngrok.ai inference.
To bring your own key, generate one at aistudio.google.com, then add a provider key.
3
Create a configuration
Create an access key configuration with a
google routing rule and allow Google in the access scope.
To use your own Google key, set the routing rule to Bring your own API key and select your stored Google key.4
Assign and send requests
Assign the configuration to your access key.
Follow the Google Gen AI SDK guide to install the SDK and send requests.