Gemini API: what it is, which models are available and how to call it
What the Gemini API is, which Gemini models are available, how the native format differs from the OpenAI-compatible one, and a first request.
6 min · · API keys · models
The Gemini API is a programming interface to Google's Gemini family of models: you send text to it over HTTP and get the model's answer back as JSON, with no chat window and no copy-pasting. If you are a developer, or you want to build Gemini into a bot, a spreadsheet or a service, the API is what you need. Below: how it works, how Google's native format differs from the OpenAI-compatible one, which models are available and how to send a first request.
Prices are as of October 18, 2026. Google's documentation is at ai.google.dev (the Gemini API section); on the Zukko side the examples below use the standard chat completions endpoint.
What the Gemini API is in plain words
The Gemini model runs on Google's servers. The API gives you an address to send a request to and a key that proves who you are and whose balance to charge. The rest is the message format.
In a request you specify:
- a model name, for example
gemini-3.8-flash; - messages (the conversation history: a system instruction, user and model turns);
- optional parameters: output token limit, streaming mode, tools.
The response contains the text and usage data: how many tokens went to input and output. The price is computed from those tokens. A token is a piece of a word, and in Russian text a word usually takes more than one token. For more on how pricing works see What tokens are in neural networks.
Do not confuse the Gemini API with the Gemini app or a Google AI subscription: the app is for people, the API is for code, and it is billed separately per token.
Two formats: native and OpenAI-compatible
The same Gemini can be called in two ways.
Google's native format. Per the current quickstart at ai.google.dev, the request goes to https://generativelanguage.googleapis.com/v1beta/interactions, the key is passed in the x-goog-api-key header, and the body contains model and input. For Python there is the google-genai package, for JavaScript @google/genai. New Gemini features usually appear in it before they reach the compatible mode.
The OpenAI-compatible format. Google has a mode compatible with the OpenAI library (an address like .../v1beta/openai/), and gateways such as Zukko serve Gemini on the standard POST /v1/chat/completions endpoint. The request looks the same as for GPT: a messages array, a model field, an Authorization: Bearer ... header. The advantage is one codebase for many models: switching from Gemini to GPT or Claude means changing the model string.
| Google native format | OpenAI-compatible format | |
|---|---|---|
| Endpoint | /v1beta/interactions | /v1/chat/completions |
| Request body | model, input | model, messages |
| Key header | x-goog-api-key | Authorization: Bearer |
| Library | google-genai | openai |
| Switching to another vendor's model | requires rewriting code | change one string |
| New Gemini features | usually earlier | as the compatibility layer adds them |
Pick the native format if you need features that are not yet in the compatible mode. Pick the OpenAI format if portability, ready-made integrations (LangChain, LlamaIndex, code editors) and one balance for many models matter.
Which Gemini models are available
Google's models page lists many variants: text, voice, image generation, embeddings. We care about the text models in the Flash line. Through Zukko, two are available as of October 18, 2026:
| Model | Input / output, $ per 1M tokens | Context | Image input | Strength index |
|---|---|---|---|---|
gemini-3.8-flash | 0.125 / 0.6 | 1M | no | 41 |
gemini-3.7-flash | 0.125 / 0.6 | 1M | no | 38 |
The strength index is the Intelligence Index from Artificial Analysis. It does not tell you how well a model fits your task: on classification, data extraction and short answers the gap between models can differ from the gap on long code generation. Test on your own tasks.
Google's official prices for gemini-3.8-flash per our table are $0.75 per 1M input and $3.75 per 1M output tokens. The current list and prices are always available via GET https://api.zukko.pro/v1/models or the Models page in the dashboard.
Two caveats about Gemini 3.x models from Google's documentation: thinking is on by default and reasoning tokens are billed as output, and custom temperature and top_p values are ignored on newer models (3.6 and later).
How to make a first request
You need a key. Get one in the Zukko dashboard on the API keys page: in the creation dialog set a name, optionally a daily and monthly limit, and copy the key. It is shown once.
curl
curl https://api.zukko.pro/v1/chat/completions \
-H "Authorization: Bearer fetch_your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.8-flash",
"messages": [
{"role": "user", "content": "Explain in two sentences what an API is"}
]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.zukko.pro/v1", api_key="fetch_your_key")
r = client.chat.completions.create(
model="gemini-3.8-flash",
messages=[{"role": "user", "content": "Explain in two sentences what an API is"}],
)
print(r.choices[0].message.content)
print(r.usage)The usage field shows tokens spent. Multiply them by the prices in the table to get the cost of a request: for example, 2000 input and 500 output tokens cost 2000 × 0.125 / 1,000,000 + 500 × 0.6 / 1,000,000 = 0.00025 + 0.0003 = $0.00055.
The list of models available to your key is returned by GET /v1/models. If you specify a nonexistent name you get a 404 model_not_found.
What the Gemini API can do
From what Google's documentation describes for the compatibility layer: streaming output, function calling, structured output, embeddings, work with images and audio. It is important to see the boundary: Google lists the capabilities of the models and of its own layer, while what is available to you depends on the model and the access channel. For example, in Zukko's table gemini-3.8-flash and gemini-3.7-flash do not list image input, so for image recognition take a model that has it (say claude-sonnet-5-5, gpt-6.1-sol or qwen3.8-max) and test on your data.
Typical tasks for inexpensive Flash models: ticket classification, extracting fields from text, summaries, translation, chat-bot answers. For hard agent tasks people often pick stronger models; decide by price and strength index, not by name. A comparison of two inexpensive options is in DeepSeek or Gemini Flash.
Where to read the documentation
- Gemini API at ai.google.dev: Quickstart, Models, Pricing, Rate limits and OpenAI compatibility sections.
- Zukko: quick start, models list.
To begin, create a key in the dashboard and repeat the curl example: it takes a couple of minutes.
FAQ
Is the Gemini API the same as Gemini in the browser?
No. The app is for people, the API is for code. They are billed independently, and API requests are charged per token.
Do I need to learn a separate Gemini format?
No. Gemini can be called in the familiar OpenAI format via POST /v1/chat/completions. Google's native format is only needed if you require features missing from the compatible mode.
Which Gemini models are available in Zukko?
As of October 18, 2026: gemini-3.8-flash and gemini-3.7-flash. The list may change: check GET /v1/models.
How do I find out what a request costs?
The response has a usage block with the token counts. Multiply input and output by the prices per 1M tokens and add them up. The actual charge is visible in the dashboard ("Usage").
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- xAI Grok API: Connecting Grok 4.7, Price and the 256K ContextHow to call grok-4.7 through an OpenAI-compatible API, what to do about the 256K context limit and what typical requests cost. Plus a comparison with Grok 4.6.
- Grok API from Russia: connecting without a foreign cardStep by step connection to Grok 4.7, 4.6 and 4.5 through a gateway: key, address, first request in curl and Python, streaming, images and payment by SBP or crypto.
- Claude Sonnet 5.5 via API: connection, prices and cache at October 18, 2026How to call claude-sonnet-5-5 from Python and curl, what a typical request costs with and without cache, and how it differs from Sonnet 5 and Sonnet 4.6.
- Claude on Android in Russia: what to do if the app won't installIf the official Claude app won't install on Android in Russia, you can still use the model from your phone: through the gateway's web chat or a client with your own key.