RunsOnMy ModelsGPUs & MacsBy VRAMAPI pricesVRAM calculatorNew

Google: Gemma 4 31B API pricing

$0.20 per 1M input tokens and $0.40 per 1M output tokens on OpenRouter. Context window: 262,144 tokens.

$0.20input / 1M tokens
$0.40output / 1M tokens
256Kcontext
text+image+video->textmodality

What it costs in practice

WorkloadCost
Chatbot: 10,000 messages (1,500 in / 400 out tokens each)$4.60
RAG: 1,000 queries (8,000 in / 600 out each)$1.84
Summarize 100 long documents (50,000 in / 1,000 out each)$1.04

Cross-check against the provider's list price

LiteLLM's price map lists gemini/gemma-4-31b-it (gemini) at free in / free out per 1M tokens. Differs from OpenRouter OpenRouter routes to several hosts and may list a different provider's price than the model maker's own API.

Price history

No price change recorded since we started tracking on Nov 17, 2026. We check every 6 hours and log every change.

Run it yourself instead

The open weights are on Hugging Face. See the VRAM gemma 4 31B it needs and which GPUs fit it →

Cheaper alternatives with similar context

Text models with at least 125K context and a lower blended price (75% input, 25% output). Price only, not a quality ranking.

ModelInput / 1MOutput / 1MContext
NVIDIA: Nemotron 3.5 Super VL$0.15$0.501M
OpenAI: GPT-5.4 Nano (batch)$0.10$0.625391K
Tencent: Hy3$0.132$0.528256K
Qwen: Qwen3.8 Omni Flash$0.15$0.47977K
Qwen: Qwen3.8 Flash$0.15$0.47977K
OpenAI: GPT-5.6 Luna Pro (batch)$0.10$0.601.0013580322265625M
OpenAI: GPT-5.6 Luna (batch)$0.10$0.601.0013580322265625M
LiquidAI: LFM2.5-24B-A2B$0.05$0.70125K

Source: OpenRouter listing via the public models API · LiteLLM price map (MIT). Prices checked Nov 17, 2026. Model ID google/gemma-4-31b-it, listed Apr 2, 2026. Report an error.