Skip to navigation

Gemma 4 31B

Gemma 4 31B is a balanced model by Google, available through the OpenAI-compatible API under the model id gemma-4-31b-it:free. It is free to use while the promotion runs.

Google · Gemma · Balanced

FreeNew

Gemma 4 31B on the free lane: $0 per token, counted in the daily free allowance.

Gemma 4 31B key facts
VendorGoogle
Model IDgemma-4-31b-it:free
Input price per 1M tokensFree
Output price per 1M tokensFree
Context windowNot published
Max outputNot published
API formatsOpenAI
Prices checked

Model id

gemma-4-31b-it:free

Price per 1M tokens

Input
$0.00
Output
$0.00
Cached input
Not offered

Free while the promotion runs.Models on the free lane (ids ending in :free) carry no rate of their own and share one allowance: 100 requests and 5,000,000 tokens a day for every account, in Chat and through the API. No balance and no card are needed: the $10 sign-up credit pays for priced models first, and once it is gone the models that bill $0 keep their daily requests. A paid subscription, a coupon or the owner raising your account is the only way past the daily number.

Added here 24 Nov 2026 — read the changelog for what changed and why.

1 credit = $1 of usage. All rates

Start using Gemma 4 31B

Set ONEAIAPIKEY_API_KEY to a key from your console, then run any example. Streaming is on so long answers are not cut off by idle-connection timeouts.

curl https://api.oneaiapikey.com/v1/chat/completions \
  -H "Authorization: Bearer $ONEAIAPIKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma-4-31b-it:free",
    "stream": true,
    "messages": [{"role": "user", "content": "Explain the difference between a mutex and a semaphore in plain words."}]
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.oneaiapikey.com/v1",
    api_key=os.environ["ONEAIAPIKEY_API_KEY"],
)

stream = client.chat.completions.create(
    model="gemma-4-31b-it:free",
    messages=[{"role": "user", "content": "Explain the difference between a mutex and a semaphore in plain words."}],
    stream=True,  # recommended for long outputs
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.oneaiapikey.com/v1",
  apiKey: process.env.ONEAIAPIKEY_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "gemma-4-31b-it:free",
  messages: [{ role: "user", content: "Explain the difference between a mutex and a semaphore in plain words." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

More: quickstart · API reference · try it in Chat first

Tokens per day, by model

Last 7 days, UTC days

Hover, tap or drag across any day, or focus the chart and use the arrow keys, to see how every model did that day.

Real tokens served through this gateway, updated every 5 minutes. Ranked by usage, not quality.

Full ranking insights

Gemma line-up

Gemma 4 31B or Gemma 4 31B Alt or DeepSeek V4 Flash 0731 Thinking?

Of the 2 Gemma models on this site, Gemma 4 31B is the top of the line-up and Gemma 4 31B Alt the step down. DeepSeek V4 Flash 0731 Thinking from DeepSeek is the closest-priced balanced-tier model from another vendor. Each comparison lists the published rates and limits, then what favours each side.

Gemma 4 31BvsGemma 4 31B Alt

Gemma 4 31B and Gemma 4 31B Alt bill at identical rates with the same context window, so cost does not separate them.

Pick Gemma 4 31B when

Nothing in the published data puts it ahead of Gemma 4 31B Alt.

Pick Gemma 4 31B Alt instead when

Nothing in the published data puts it ahead of Gemma 4 31B.

Gemma 4 31BvsDeepSeek V4 Flash 0731 Thinking

Gemma 4 31B and DeepSeek V4 Flash 0731 Thinking bill at identical rates with the same context window, so cost does not separate them.

Pick Gemma 4 31B when

  • the work is chat and image questions, which this catalogue lists for Gemma 4 31B and not for DeepSeek V4 Flash 0731 Thinking.

Pick DeepSeek V4 Flash 0731 Thinking instead when

  • your workload looks like reasoning and agent tasks, labels the catalogue gives DeepSeek V4 Flash 0731 Thinking only.

Use cases

What Gemma 4 31B is listed for, and what it costs

The catalogue lists Gemma 4 31B for chat, image questions and coding. Rows with a price show one typical request at the published rates, with the arithmetic shown. Token counts are examples; your prompts will differ.

Model your own traffic

  1. Chat

    One chat reply: 1,500 tokens of conversation history in, 400 tokens out.

    Low per-message cost keeps conversational products affordable at scale.

    “Explain the difference between a mutex and a semaphore in plain words.”

    Same request on Gemma 4 31B Alt $0 and DeepSeek V4 Flash 0731 Thinking $0. No other balanced-tier Gemma model on this site does this job for less.

    $0

    per reply

    0.0015 × $0.00 + 0.0004 × $0.00

  2. Image questions

  3. Coding

    Implementing a function or endpoint: 8,000 tokens of context in, 2,000 tokens of code out.

    Capable across languages for implementation, debugging and explaining code.

    “Write a TypeScript endpoint that returns paginated orders for the signed-in user.”

    Same request on Gemma 4 31B Alt $0 and DeepSeek V4 Flash 0731 Thinking $0. No other balanced-tier Gemma model on this site does this job for less.

    $0

    per task

    0.008 × $0.00 + 0.002 × $0.00

Overview

When Gemma 4 31B fits

Gemma 4 31B is a balanced model from Google, available here under the exact model id “gemma-4-31b-it:free”. It heads the Gemma line-up here, above Gemma 4 31B Alt. Google has not published a release date we can cite; it has been available here since 24 Nov 2026.

It is free to use while the promotion runs: requests bill at $0. Models on the free lane (ids ending in :free) carry no rate of their own and share one allowance: 100 requests and 5,000,000 tokens a day for every account, in Chat and through the API. No balance and no card are needed: the $10 sign-up credit pays for priced models first, and once it is gone the models that bill $0 keep their daily requests. A paid subscription, a coupon or the owner raising your account is the only way past the daily number. After that it returns to the regular rate of $0.00 input and $0.00 output per million tokens.

It is served through the OpenAI-compatible format at https://api.oneaiapikey.com/v1, so any SDK or tool that lets you set a custom base URL, for example Codex CLI, Cursor and Cline, can use it. It is not offered on the Anthropic Messages endpoint; pick an Anthropic-format model for Claude Code.

Use Gemma 4 31B at no cost.

It bills at $0 and never touches the balance. Models on the free lane (ids ending in :free) carry no rate of their own and share one allowance: 100 requests and 5,000,000 tokens a day for every account, in Chat and through the API. No balance and no card are needed: the $10 sign-up credit pays for priced models first, and once it is gone the models that bill $0 keep their daily requests. A paid subscription, a coupon or the owner raising your account is the only way past the daily number.

Gemma 4 31B is developed by Google. Model names and trademarks belong to their owners. One AI API Key is an independent API gateway and is not affiliated with, endorsed by or sponsored by Google.

Offer59 free models are live: DeepSeek V4.1 Flash, Nemotron 3 Ultra, Kimi K3.1 Pro, GLM 5.3, GPT-5 Codex and more. $0 per token, no card. Free models →·Some free models are at the daily cap — refills 05:30 IST; requests auto-route to a live backup. Status →
FREE59 models, $0 per tokenAll 59 free modelsHide list

No card needed. Every id ends in :free. Free limits: 100 requests and 5,000,000 tokens a day per account. Each account can create up to 3 API keys, and each key runs 1 request at a time on free models. This only stops abuse. Copy an id into the model field of an OpenAI-format request to https://api.oneaiapikey.com/v1.Get your free API keyFree models page