aiapicompareaiapicompare
aiapicompare › All models › Gemma 4 31B

Gemma 4 31B: API pricing compared

Gemma 4 31B is available from 5 provider(s). Cheapest: OpenRouter at free per 1M input tokens and free per 1M output tokens. Context window: up to 262 144 tokens. Free to use at OpenRouter. Developer: Google.

Strengths in the Arena leaderboard

🏆 Rank 34 · Image understanding🏆 Rank 48 · Russian

Rankings: Arena (arena.ai, formerly LMArena), dataset lmarena-ai/leaderboard-dataset, licensed under CC BY 4.0, as of 2026-11-23. Excerpt; variants with different reasoning effort merged and matched to our prices by aiapicompare. Not affiliated with Arena and not a recommendation.

ProviderInput $/1MOutput $/1MContext
OpenRouter
google/gemma-4-31b-it:free
freefree262KGo to provider ↗ Set up
NanoGPT
google/gemma-4-31b-it
$0.110$0.330262KGo to provider ↗ Set up
Novita AI
google/gemma-4-31b-it
$0.140 +27 %$0.400262KGo to provider ↗ Set up
DeepInfra
google/gemma-4-31B-it
$0.200 +82 %$0.400262KGo to provider ↗ Set up
OpenRouter
google/gemma-4-31b-it
$0.200 +82 %$0.400262KGo to provider ↗ Set up
UplinkSwitch
gemma-4-31b-it
$3.00 +2627 %$4.00—Go to provider ↗ Set up

Sorted by price only – there are no paid placements. Data as of 2026-11-25 09:03 UTC. Prices in USD, excluding taxes. No guarantee.

Reference price: $0.250 per 1M tokens (blended 3:1), median of all providers · How we compare → · Wrong price? Report it

Price history (cheapest provider)

Price history is recorded daily – the chart appears after the first price change.

Quick start with OpenRouter

from openai import OpenAI
import os

client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])
r = client.chat.completions.create(
    model="google/gemma-4-31b-it:free",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(r.choices[0].message.content)

FAQ

Where is Gemma 4 31B cheapest?

Currently at OpenRouter (free). Prices are updated daily; the provider’s website is authoritative.

How do I use Gemma 4 31B in my tools?

All listed providers offer an OpenAI-compatible API. See the setup guide for Hermes Agent, VS Code, Cursor and more.

More models from Google

Gemini 3.7 FlashGemini 3.5 FlashGemma 4 26B A4BGemini 2.5 FlashGemma 3 27BGemini 3.8 FlashGemini 3.6 FlashGemini 3.1 Flash Lite PreviewGemini 2.5 Flash LiteGemma 3 12B ITGemini 3.1 Flash LiteGemini 3.5 Flash Lite