Creating a Gemini API key
This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.
Distilled from Google’s own documentation: Using Gemini API keys, Gemini API reference and Manage API keys. Retrieved 2026-10-25.
A Gemini API key belongs to a Google Cloud project, which is billed for the key’s usage. Create it in Google AI Studio, not on the Cloud console’s Credentials page, and keep it apart from any key you use for other Google APIs.
- Open Google AI Studio and sign in with the Google account that owns or can edit the project to bill.
- If you are new to AI Studio, it creates a project for you, so go to step 4.
- To use an existing Google Cloud project, open Dashboard → Projects and click Import projects. AI Studio does not list all your Cloud projects by default.
- Open API Keys and click Create API key. Pick the project to bill.
- Copy the key and paste it into the connection.
Notes:
- Since 28 May 2026, new keys AI Studio creates are authorization keys. They are bound to a service account and restricted to the Gemini API (the Generative Language API) by default, so the same key cannot call Translation, Places or other Google APIs. Those need a separate key and a separate Google API key connection.
- The Gemini API rejects standard keys that carry no API restriction. If you create a standard key in the Cloud console instead, restrict it to the Generative Language API before using it here.
- AI Studio shows only keys that are unrestricted or restricted to the Generative Language API. Manage any other key on the Cloud console Credentials page.
- Every request sends the key in the
x-goog-api-keyheader.
Connect it to Publicus
Section titled “Connect it to Publicus”Open Connections under Credentials, choose Google, and pick Gemini API key. Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.
See also: Google in the catalog.
This guide is maintained by Publicus and published under CC BY 4.0.