Skip to content Chat

Gemma API

6 Gemma models on one OpenAI-compatible API and one prepaid balance, up to 10% off the official price for every account.

Get API Key All 6 Gemma models

Up to 10% off

$0.135 / $0.54 $0.15 / $0.60 per 1M input / output tokens

Gemma 4 26B A4B

Gemma models and prices 6

ModelContextPriceDiscount
Gemma 4 26B A4Bgoogle/gemma-4-26b-a4b-it262K$0.135 / $0.54 per 1M tokens $0.15 / $0.60−10%
Gemma 4 31Bgoogle/gemma-4-31b-it262K$0.15 / $0.40 per 1M tokens—
Gemma 3 4Bgoogle/gemma-3-4b-it131K$0.04 / $0.05 per 1M tokens—
Gemma 3 12Bgoogle/gemma-3-12b-it131K$0.05 / $0.15 per 1M tokens—
Gemma 3 27Bgoogle/gemma-3-27b-it131K$0.08 / $0.45 per 1M tokens—
Gemma 2 27Bgoogle/gemma-2-27b-it8K$0.65 / $0.65 per 1M tokens—

Prices as of November 5, 2026. Official price: the model maker's list price. Tier 1–3: OceanToken's standing discounts by cumulative top-up, not limited-time offers.

Call the Gemma API

Any OpenAI-compatible SDK works: set the base URL to https://api.oceantoken.ai/v1, use your OceanToken key and the model id as written.

Python
from openai import OpenAI
# Your API Key from the OceanToken console
client = OpenAI(base_url="https://api.oceantoken.ai/v1",
                api_key="YOUR_API_KEY")
reply = client.chat.completions.create(
    model="google/gemma-4-26b-a4b-it",
    messages=[{"role": "user", "content": "Hello"}])
print(reply.choices[0].message.content)

Why use Gemma on OceanToken

  • One API key and one prepaid balance for nearly 500 models from 73 publishers.
  • OpenAI-compatible: change the base URL and the key, and keep your code.
  • Prepaid, with no subscription and no platform fee. Each API key can have its own spending limit.

Frequently asked questions

How much does the Gemma API cost?

On OceanToken Gemma 4 26B A4B costs $0.135 / $0.54 per 1M tokens, against an official price of $0.15 / $0.60 per 1M tokens. The lowest-priced Gemma model is Gemma 3 4B, at $0.04 / $0.05 per 1M tokens. Every model is billed per use from a prepaid balance, with no subscription.

Are these the official Gemma models?

Yes. You call each model by its own name and get that model, below its official price: up to 10% off on the top tier. Every model page shows the official price next to ours before you call it.

How do I call the Gemma API?

Create an API key in the OceanToken console, set the base URL to https://api.oceantoken.ai/v1 and use the model id, for example google/gemma-4-26b-a4b-it. The OpenAI SDKs and any OpenAI-compatible client work.

Do I need a subscription to use Gemma?

No. You add credits by card, and each request is billed at the model’s price. Purchased credits are valid for 12 months.

Get API Key All models

Other model APIs

Kimi API · MiniMax API · Claude API · GPT API · Gemini API · Grok API · Mistral API · Llama API · Nemotron API · Hunyuan API · Seed API · Sonar API · Command API · Nova API · Veo API · Kling API · Wan API · Hailuo API · Nano Banana API · Seedream API · GPT Image API · FLUX API · Qwen Image API · Grok Imagine API · Recraft API · MAI Image API · Whisper API · Voyage API