Gemma 4 31B is 52% cheaper on a typical chat request ($0.60 vs $1.25 per 1,000 requests). Both run on one Utopixel key, so you can switch with one line or let one cover for the other.
Prices are what Utopixel charges as of December 3, 2026, per 1M tokens, with no subscription. They update when the catalog does.
| Gemini 3.1 Flash Lite | Gemma 4 31B | |
|---|---|---|
| Lab | ||
| Model id | google/gemini-3.1-flash-lite | google/gemma-4-31b-it |
| Input, per 1M tokens | $0.25 | $0.20 |
| Output, per 1M tokens | $1.50 | $0.40 |
| Cached input, per 1M tokens | $0.025 | - |
| Context window | 1.05M | 262K |
| Max output | 66K | 16K |
| Input types | text, image, video, file, audio | image, text, video |
| Reasoning | Yes | Yes |
| Tool calls | Yes | Yes |
| JSON output | Yes | Yes |
| Knowledge cutoff | - | - |
Token counts are examples. Swap in your own: cost is input tokens times the input price plus output tokens times the output price.
| Workload | Gemini 3.1 Flash Lite | Gemma 4 31B |
|---|---|---|
Chat reply2,000 tokens in, 500 out | $1.25 | $0.60 |
Long document Q&A100,000 tokens in, 1,000 out | $26.50 | $20.40 |
Classification300 tokens in, 10 out | $0.09 | $0.064 |
Code generation8,000 tokens in, 4,000 out | $8.00 | $3.20 |
Benchmarks change every month. Run your own prompts through both with the same key and keep the one that wins, with the other as backup.
Keep the OpenAI SDK. Point it at Utopixel and list Gemma 4 31B as the backup for Gemini 3.1 Flash Lite. How fallback works.
from openai import OpenAIclient = OpenAI(base_url="https://utopixel.online/api/v1", api_key="sk-vb-...")r = client.chat.completions.create(model="google/gemini-3.1-flash-lite",messages=[{"role": "user", "content": "Hello"}],extra_body={"models": ["google/gemma-4-31b-it"]}, # used if Gemini 3.1 Flash Lite fails)print(r.model, r.usage.cost)
curl https://utopixel.online/api/v1/chat/completions \-H "Authorization: Bearer $UTOPIXEL_API_KEY" \-H "Content-Type: application/json" \-d '{"models": ["google/gemini-3.1-flash-lite", "google/gemma-4-31b-it"], "messages": [{"role": "user", "content": "Hello"}]}'
More comparisons
One API key for the models of OpenAI, Google, DeepSeek, Moonshot AI, Qwen, xAI, Z.ai, Meta, Amazon, AionLabs, Anthropic, Baidu, ByteDance Seed, Cohere, Elorian, Fireworks AI, IBM, inclusionAI, Inference.net, KT, Liquid AI, Meituan, Meta, MiniMax, Mistral AI, Moondream, Motif Technologies, Nex AGI, NVIDIA, Particle AI, Perceptron, Prism ML, Reflection AI, Reka, Relace, Ricursive AI, Sakana AI, StepFun, Tencent, Thinking Machines, Unbiased, Upstage, Writer and Xiaomi. Start free, no card needed.