Docs
Gemini API key
How to get a Gemini API key and call Gemini 2.5 Pro and Flash through an OpenAI-compatible endpoint — the direct Google AI Studio route, and the one-key Kunavo route that also reaches Claude, Sora and 200+ models.
A Gemini API key authenticates your calls to Google's Gemini models. You can get one directly from Google AI Studio, or use a single sk-kunavo- key that reaches Gemini through the same OpenAI-compatible API you already use for everything else.
/app/keys, set base_url=https://api.kunavo.com/v1, then call model="gemini-2-5-flash". No Google Cloud project required, and the same key also works for Claude, GPT-Image, Veo and Sora.What a Gemini API key is
A Gemini API key is a bearer credential that authorizes requests to Google's Gemini family. Every request carries the key in an Authorization header; the platform meters usage against it and bills per token. On Kunavo today that means gemini-2-5-pro and gemini-2-5-flash, called through the OpenAI-compatible endpoint.
There are two ways to obtain a working key, depending on whether you want Gemini alone or Gemini alongside the other frontier models.
Option A — a key direct from Google AI Studio
- Go to
aistudio.google.comand sign in with a Google account. - Open Get API key → Create API key. Keys look like
AIza.... - For production volume, attach the key to a Google Cloud project with billing enabled.
This is the right path if Gemini is the only model you will ever call. If you also use Claude, image or video models, you would end up managing a separate key, SDK and invoice per provider.
Option B — one Kunavo key for Gemini and everything else
Kunavo fronts Gemini behind an OpenAI-compatible API. One sk-kunavo- key reaches Gemini and every other model, with a single Stripe-billed balance.
| Google AI Studio key | Kunavo key | |
|---|---|---|
| Models | Gemini only | Gemini + Claude, GPT-Image, Veo, Sora, 200+ |
| Endpoint | Google GenAI API | https://api.kunavo.com/v1 |
| Billing | Google Cloud account | One Stripe wallet |
| Free credit | Free tier (rate-limited) | $2 on sign-up |
| Key format | AIza... | sk-kunavo-... |
- Create a Kunavo account — you get $2 of free credit.
- Generate a key at
/app/keys. It is shown once; store it in an environment variable. - Point the OpenAI SDK at
https://api.kunavo.com/v1and call a Gemini slug.
Call Gemini with Python
Keep the official OpenAI SDK. Change base_url and the model name — nothing else.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["KUNAVO_API_KEY"],
base_url="https://api.kunavo.com/v1", # the only line that changes
)
resp = client.chat.completions.create(
model="gemini-2-5-flash",
messages=[{"role": "user", "content": "Summarize the plot of Dune in two sentences."}],
)
print(resp.choices[0].message.content)Call Gemini with Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.KUNAVO_API_KEY,
baseURL: "https://api.kunavo.com/v1",
});
const resp = await client.chat.completions.create({
model: "gemini-2-5-flash",
messages: [{ role: "user", content: "Summarize the plot of Dune in two sentences." }],
});
console.log(resp.choices[0].message.content);baseURL in Node and base_url in Python. Both point at the same endpoint.Or call it with curl
curl https://api.kunavo.com/v1/chat/completions \
-H "Authorization: Bearer $KUNAVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2-5-flash",
"messages": [{"role": "user", "content": "Hello, Gemini"}]
}'Which Gemini model to use
- gemini-2-5-flash — fast, extremely inexpensive default for chat, extraction and summarization.
- gemini-2-5-pro — stronger reasoning, vision and long-context analysis.
Security checklist
- Never expose a key client-side. Browser and mobile bundles are public — always proxy through your own server.
- Use one key per project or environment so a leak can be revoked without taking down everything else.
- Rotate quarterly. Kunavo allows multiple live keys, so rotation is a clean overlap rather than a hard cutover.
- Watch
/app/usagefor unexpected traffic broken down by key.
FAQ
Is a Gemini API key free?
Google AI Studio issues a free-tier key with low rate limits, fine for prototyping. Production traffic moves to paid billing. On Kunavo you start with $2 of free credit and then pay per token — no separate Google Cloud billing account required.
Can I use Gemini with the OpenAI SDK?
Yes. Kunavo exposes Gemini behind the OpenAI-compatible /v1/chat/completions endpoint, so you keep the official OpenAI SDK and only change base_url to https://api.kunavo.com/v1 and set the model name to a Gemini slug such as gemini-2-5-flash.
What is the difference between a Google Gemini API key and a Kunavo API key?
A Google key calls only Gemini and bills through a Google Cloud account. A Kunavo key calls Gemini plus Claude, GPT-Image, Veo, Sora and 200+ other models through one OpenAI-compatible API, billed once via Stripe.
Which Gemini model should I start with?
Start with gemini-2-5-flash for everyday chat, extraction and summarization — it is fast and extremely inexpensive. Move to gemini-2-5-pro for harder reasoning, vision and long-context analysis.