SubFly

How to Get a Free Gemini API Key for Subtitle Translation

Using SubFly · 6 min read · Updated 21 October 2026

Create a free Gemini API key in Google AI Studio, keep it safe, understand free-tier limits, and fix the common "key rejected" errors in subtitle tools.

Google's Gemini models power a lot of AI subtitle translation, including SubFly's. To use them on the free plan, you need a Gemini API key - a long string that lets an application make requests to Gemini on your behalf. Creating one is free and takes about two minutes. This guide walks you through it, explains the limits of the free tier, and shows how to fix the errors people most often hit.

What an API key is (and isn't)

An API key is like a password for an application rather than a person. When SubFly translates your subtitles with your key, Google sees the requests as coming from your Google Cloud project, applies your project's limits, and - if you've enabled billing - bills that project.

A few things to know up front:

  • It's free to create. You don't need a credit card for the free tier.
  • It's tied to a Google Cloud project. Google AI Studio creates one for you if you don't have one.
  • Treat it like a password. Anyone with your key can use your quota. Don't paste it into public chats, screenshots or code repositories.

Step-by-step: create a key in Google AI Studio

  1. Go to Google AI Studio at aistudio.google.com and sign in with your Google account.
  2. Open the API keys page (also reachable from "Get API key" in the AI Studio menu).
  3. Choose Create API key. If asked, pick an existing Google Cloud project or let AI Studio create a new one.
  4. Copy the key. Gemini keys usually start with AIza.
  5. In SubFly, open API keys, choose Add key, paste it, and give it a label you'll recognise (for example "Personal - Gmail").

SubFly checks the key with Google when you add it, encrypts it with AES-256-GCM before storing it, and never shows it again - only a masked preview such as AIza…9xK1.

Free-tier limits: what to expect

Google's free tier is generous for trying things out, but it is rate-limited. Limits are set per project and per model, and they come in a few shapes:

  • Requests per minute - how many calls you can make in a short burst.
  • Tokens per minute - how much text those calls can contain.
  • Requests per day - a daily cap that resets every 24 hours.

The exact numbers vary by model and change over time, so check the rate-limits page in Google AI Studio for current values. Faster, lighter models generally have more generous free limits than the most capable ones.

What this means for subtitles: a single episode is usually well within a day's free limits, but translating a whole season in one sitting can hit them. When a request is rate-limited, SubFly waits and retries automatically, and if you've added more than one key it rotates to the next one. If every key's daily limit is used up, the job stops with a clear message - and because finished batches are saved as they complete, retrying later picks up where it left off instead of starting again.

Data and the free tier

Read Google's terms for the Gemini API before translating anything sensitive. Google treats free (unpaid) usage and paid usage differently: content sent through unpaid services may be used to improve Google's products, while paid usage generally isn't. If your subtitles are confidential - an unreleased film, client work - use a project with billing enabled, or a plan where translation runs on keys covered by paid terms.

Keep your key safe

  • Never share it publicly. If you think a key has leaked, delete it in Google AI Studio or the Google Cloud console and create a new one. Google also detects keys that have been published online and may block them automatically.
  • Use one key per purpose. A separate key for subtitle translation makes it easy to see usage and to revoke it without breaking anything else.
  • Restrict it sensibly (see below) - but not in a way that blocks the server using it.

Fixing "the provider rejected this key"

If SubFly says Google rejected your key, press Test next to the key to see the reason Google gave. The common ones:

The key is invalid or was deleted

Google returns "API key not valid". This happens if the key was mistyped, deleted, or regenerated. Copy it again from Google AI Studio, or create a new one.

The key is restricted to websites or apps

In the Google Cloud console, keys can be limited to specific websites (HTTP referrers), IP addresses or apps. A key restricted to "websites" is blocked when a server uses it, because server requests don't come from a browser page. Fix: open the key in Google Cloud console → APIs & Services → Credentials, and under Application restrictions choose None.

The key isn't allowed to use the Gemini API

Under API restrictions, a key can be limited to certain APIs. If the list doesn't include the Generative Language API (the service behind Gemini), requests are refused. Fix: either choose "Don't restrict key", or add the Generative Language API to the allowed list.

The API isn't enabled for the project

Keys created in AI Studio normally have the API enabled. If you created the key yourself in the Cloud console, open APIs & Services → Library, search for Generative Language API, and enable it.

Rate limited or quota exhausted

This isn't a broken key - it's a busy one. Wait for the limit to reset, add a second key from another project, or move to a plan that runs on SubFly's keys.

Do you even need a key?

Not always. In SubFly, your first translation on the free trial runs on our keys, so you can try the full workflow before creating anything. After that, the free plan uses your own key - Google bills that usage to you, which on the free tier means nothing. Paid plans run translations on SubFly's keys, so you never need to manage a key at all. See Pricing for what each plan includes.

Quick checklist

  1. Create the key in Google AI Studio.
  2. Add it under API keys in SubFly and run Test.
  3. If it's rejected, check application restrictions (None) and API restrictions (Generative Language API allowed).
  4. Add a second key if you translate large batches.
  5. Keep it private; rotate it if it leaks.

Once your key is in, you're ready to translate. Start with the complete guide to translating anime subtitles, or go straight to creating your account.

Related guides