Skip to main content
Google AI Studio provides Gemini models. The gateway reaches them two ways:
  • OpenAI-compatible Chat Completions: send requests to /v1/chat/completions with an OpenAI client and change only the model name.
  • Native Gemini: send requests to /v1beta/models/{model}:generateContent or :streamGenerateContent with a Gemini client.
The OpenAI Responses API (/v1/responses) does not 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

Follow the quickstart to create an access key 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.
4

Assign and send requests

Assign the configuration to your access key and send requests with your access key:

Native Gemini API

Point a Gemini client at https://gateway.ngrok.ai and send your access key. The gateway accepts it as Authorization: Bearer or as X-Goog-Api-Key, the header Google’s own SDKs set.
Request and response bodies are forwarded byte-for-byte, so payloads match Google’s own API exactly. Nothing is added to, removed from, or reordered inside a body. The headers are ngrok’s, though. Alongside Content-Type, responses on this surface carry Ngrok-AIG-Request-Id, Ngrok-AIG-Attempts, and Ngrok-AIG-Model. See Response headers.

Available models

See the model catalog.
gemini-2.5-pro, gemini-2.5-flash, and gemini-2.5-flash-lite need a Google project created before mid-2026. Newer projects get a 404 stating the model is no longer available to new users, and the ngrok-managed Google project postdates that cutoff. Reach these models with your own key on an older project, or use a Gemini 3 model instead.

Next steps