Models

Gemini 3.8 Flash vs Gemma 4 31B (Free)

API price, context window, capabilities and live speed, side by side.

Gemini 3.8 Flash has the larger context window (1.0M vs 262K tokens). Both run on the same UltraGPT API key, so you can switch between them by changing the model field - or list both in models: [...] for automatic fallback.

Gemini 3.8 FlashGemma 4 31B (Free)
LabGoogleGoogle
Model idgemini-3.8-flashgemma-4-31b-free
Input / 1M tokens$0.75Free
Cached input / 1M$0.075Free
Output / 1M tokens$3.75Free
Context window1.0M262K
Inputtext, image, video, file, audioimage, text, video
Outputtexttext
Tool calling✓✓
Vision (image input)✓✓
Reasoning——

Cost of 1,000 requests

Estimated from the list prices above; your real cost is reported per request in usage.cost.

Chatbot1.5K tokens in, 400 outGemini 3.8 Flash $2.63Gemma 4 31B (Free) $0.00
RAG over documents20K in, 800 outGemini 3.8 Flash $18.00Gemma 4 31B (Free) $0.00
Coding agent step40K in (80% cached), 1.5K outGemini 3.8 Flash $14.02Gemma 4 31B (Free) $0.00

Use both, with automatic fallback

Same key, same endpoint: change the model id between "gemini-3.8-flash" and "gemma-4-31b-free".

curl https://staging-api.ultragpt.pro/v1/chat/completions \
  -H "Authorization: Bearer $ULTRAGPT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.8-flash",
    "models": ["gemma-4-31b-free"],
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'

FAQ

Which is cheaper, Gemini 3.8 Flash or Gemma 4 31B (Free)?

Gemini 3.8 Flash: $0.75 in / $3.75 out per 1M. Gemma 4 31B (Free): Free in / Free out per 1M. Prices are in USD and billed per use from your UltraGPT balance.

Can I use Gemini 3.8 Flash and Gemma 4 31B (Free) with the same API key?

Yes. Both are available through the OpenAI-compatible UltraGPT API at https://staging-api.ultragpt.pro/v1: set model to "gemini-3.8-flash" or "gemma-4-31b-free".

Which has a bigger context window, Gemini 3.8 Flash or Gemma 4 31B (Free)?

Gemini 3.8 Flash: 1,048,576 tokens. Gemma 4 31B (Free): 262,144 tokens.

More comparisons