MMOOZZGG.com

Neural network API

How to get a Gemini API key: the official path, storage and options for Russia

7 min read9 sources

A Gemini API key is created in Google AI Studio, and only in a country on Google’s list of available regions. As of 16 October 2026, Russia is not on that list, so a company from Russia cannot officially get a key. Below are the official path for a legal entity in an available country, the rules for storing the key, and lawful options for a company in Russia. We give no instructions for workarounds.

In short: the answer as of the check date

As of 16 October 2026 the steps are: sign in to Google AI Studio, accept the terms, get the key on the API Keys page, then move to the paid tier if needed. Russia and Belarus are not on the Gemini API list of regions.

If the company has a legal entity or a branch in a country on Google’s list, the key is issued to that entity. If not, the practical path is different: an open model with an OpenAI-format API. You can also run it on your own servers, and then requests do not leave the company.

  • Key: created in Google AI Studio on the API Keys page.
  • Project: for a new user, AI Studio creates a Google Cloud project and a key by itself.
  • Payment: a free tier for some models, a paid tier after you link a Google Cloud billing account.
  • Storage: the GEMINI_API_KEY environment variable on the server.

The official path: AI Studio, project, key

The steps are described in Google’s guide to Gemini API keys, updated on 6 October 2026. A new user signs in to Google AI Studio and accepts the terms, and then the service creates a Google Cloud project and a default key by itself.

If the company already has Google Cloud projects, AI Studio does not create a default project. You import the project you need on the projects tab and then create a key on the API Keys page. The employee needs project editor rights for this.

The key goes into the GEMINI_API_KEY or GOOGLE_API_KEY environment variable, and Google libraries read it by themselves. If both are set, GOOGLE_API_KEY wins. Google advises writing the key directly in code only when environment variables are not available.

New accounts start on the free tier, which gives access to some models. For the paid tier, you link the project to a Google Cloud billing account and prepay from $5. The billing account has a monthly spending limit: $250 on the first tier and $2,000 on the second.

The tier also matters for data. On the free tier, Google uses prompts and answers to improve its products, and human reviewers may read them. On the paid tier, requests are not used for this, and logs are kept for a limited time to detect abuse. Models and terms are on the page on the Gemini API, and the rates in numbers are in the API price comparison.

How to store the key

Google asks you to treat the key like a password. A leaked key lets others send requests at your project’s expense, so set the storage rules before the first production request.

For production systems, Google advises a secret store, such as Secret Manager in Google Cloud, rather than settings files. The other rules from the same guide are simple, and each one closes its own leak path:

  • Do not store the key in Git or other version control systems.
  • Do not embed the key in a website or a mobile app: requests go through your server.
  • Restrict the key to the Gemini API only, and for production systems add a restriction by IP address.
  • Turn on spending alerts in Google Cloud and check the billing and usage logs.
  • If the key leaked, issue a new one, switch your systems to it, and only then disable the old one.

Why you should not use someone else’s key

Someone else’s key always belongs to another owner’s Google Cloud project. There are four reasons not to use it, and each follows from Google’s documents as of 16 October 2026.

There is a fifth reason, from practice. On 2 May 2023, Samsung banned generative AI for its staff after engineers uploaded internal source code to ChatGPT. Through someone else’s key, your texts go where you control neither access nor logs.

  • Terms: under the Gemini API additional terms, the service may be used only in available regions. Someone else’s key does not change this.
  • Control: the project owner disables the key. Any day, the owner can issue a new key and disable the old one, and your system will stop.
  • Data: if the owner’s project is on the free tier, your requests go to improve Google’s products and may reach reviewers. You have no contract with Google.
  • Costs: the spending limit and the payments belong to the owner of the billing account, and your access depends on that owner’s balance.

If the company is in Russia

The first honest path: the key is issued by the company’s legal entity or branch in a country on Google’s list of regions, with its own data and its own payment. Google’s terms are met, and responsibility for the data is clear.

The second path: an open model. As of 16 October 2026, DeepSeek and Qwen in Alibaba Cloud accept requests in the OpenAI format, and open weights can run on your own servers. A vLLM server gives an open model OpenAI-compatible interfaces, so existing code switches by changing the address and the key. How to choose the option for your task and volume is covered on the page on buying AI model APIs.

Even with an official account, 152-FZ, Russia’s personal data law, applies. Since 1 March 2023, before a cross-border transfer of personal data, the operator must notify Roskomnadzor, the Russian data protection regulator (Part 3 of Article 12), and the data of Russian citizens is collected and stored in databases in Russia (Part 5 of Article 18). The status of other providers is on the page on AI model APIs in Russia.

We help with both paths: connect the company’s official account where the Gemini API works, or pick an open model by a test on your own requests. We do not resell Gemini access.

Questions and answers

Where do I find my Gemini API key? Keys are created and listed in Google AI Studio on the API Keys page. For a new user, AI Studio creates a key by itself after the terms are accepted.

As of 16 October 2026, Russia is not on Google’s list of regions, so this path is officially closed from Russia.

Is the Gemini API key free? New accounts start on the free tier, which gives access to some models. But on it, Google uses requests to improve its products, so client data must not go there.

Work tasks need the paid tier, with a prepayment from $5.

What should I do if the key leaked? Whoever got the key sends requests at your project’s expense. Google advises issuing a new key, switching your systems to it, and only then disabling the old one, and then checking the billing logs.

Spending alerts in Google Cloud show unusual growth early.

Sources and dates

Contact us