A Gemini API key is a bearer credential that authenticates calls to Google's Gemini models. There are two ways to get one: directly from Google AI Studio (the official route), or through Kunavo—one OpenAI-compatible key for Gemini, Claude, GPT, and image/video, without setting up a Google Cloud project. This guide walks through both options step by step so you can call Gemini in minutes.
Option 1 — Google AI Studio (official)
If you only plan to use Gemini, you can get a key directly from Google:
- Sign in to
aistudio.google.comwith a Google account. - Go to Get API key → Create API key. Keys start with
AIza.... - There is a rate-limited free tier for prototyping.
- For production volume, you need to link the key to a Google Cloud project with billing enabled.
This is the right path when Gemini is the only model you plan to call. If you also use Claude, image, or video models, you will have to manage a separate key, SDK, and bill for each provider.
Option 2 — Kunavo (recommended for production)
Kunavo serves Gemini behind an OpenAI-compatible API. One sk-kn- key reaches Gemini and every other model through an OpenAI-compatible endpoint — no Google Cloud project required. Gemini is priced about %70 below Google’s rates, one Stripe balance covers everything, and you can start with $10 on a pay-as-you-go basis.
- Create a Kunavo account and add $10 — pay as you go, with a balance that never expires.
- Create a key on the
/app/keyspage. The key is shown only once, so store it in an environment variable. - Point the OpenAI SDK to
https://api.kunavo.com/v1and call a Gemini slug. - Make the call — set the model field to something like
gemini-2-5-flash, and that’s it.
Quick start
Keep the official OpenAI SDK. Change only base_url and the model name — nothing else:
import os
from openai import OpenAI
# Resmi OpenAI SDK'sını koruyun; yalnızca base_url ve model değişir.
client = OpenAI(
api_key=os.environ["KUNAVO_API_KEY"],
base_url="https://api.kunavo.com/v1", # değişen tek satır
)
resp = client.chat.completions.create(
model="gemini-2-5-flash",
messages=[{"role": "user", "content": "Merhaba Gemini, kendini bir cümleyle tanıt."}],
)
print(resp.choices[0].message.content)Keep your key secure
- Never expose your key client-side. Browsers and mobile packages are public — always proxy through your own server. Keep keys in
.envfiles and environment variables; never hard-code them into source code. - Use separate keys for each project or environment so a leak can be revoked without disrupting everything else.
- Rotate keys regularly. Kunavo allows multiple live keys at once, so rotation can be a clean transition with overlap instead of a hard cutover.
- Set spending limits per key. Set a limit for each key in the dashboard and track unexpected traffic by key on the
/app/usagepage.
FAQ
Is the Gemini API free?
Google AI Studio provides a free-tier key suitable for prototyping with low rate limits. Production traffic moves to paid billing. Kunavo uses pay-as-you-go with a $10 minimum top-up; no separate Google Cloud billing account is required, and your balance never expires.
Can I get a Gemini key without a Google Cloud account?
Yes. Kunavo offers Gemini behind an OpenAI-compatible API, so you do not need to set up a Google Cloud project or billing account. Sign up, create an sk-kn- key, set base_url to https://api.kunavo.com/v1, and call a Gemini model such as gemini-2-5-flash.
What is the difference between a Google Gemini key and a Kunavo key?
A Google key calls Gemini only and is billed through a Google Cloud account. A Kunavo key calls Gemini, Claude, GPT, image, and video models through one OpenAI-compatible API and is billed from a single Stripe balance.
Which Gemini model should I start with?
Start with gemini-2-5-flash for everyday chat, extraction, and summarization—it is fast and very inexpensive. Move up to gemini-3-1-pro for harder reasoning, image analysis, and long-context analysis. See the Gemini API pricing guide for per-model rates and example cost calculations.