Skip to main content
Google AI Studio provides Gemini models.
Even though Google is a built-in provider, it still requires you to bring your own key because ngrok.ai inference is not available for it at this time.

Setup

1

Create an access key

Follow the quickstart to create an access key in app.ngrok.ai.
2

Store your Google API key

Generate a key 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:
from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.ngrok.ai/v1",
    api_key="ng-xxxxx-g1-xxxxx",
)

response = client.chat.completions.create(
    model="gemini-2.5-flash",
    messages=[{"role": "user", "content": "Hello!"}]
)

Available models

See the model catalog.

Next steps