Google

Google

Gemma 4 31B

#2 on KymaCheapest vision

The second most-used model on Kyma and the one the vision alias points to — Google's newest open model, with image understanding at cheap-tier pricing.

Modalities

Text+Image → Text

Input

$0.0702 /1M

Output

$0.2006 /1M

Cached input

$0.00702 /1M90% off

Context

128K

Speed

medium

Performance

Live production data from real requests on Kyma — not synthetic benchmarks.

Rank

#2

of 87 active models

Tokens served

391.3M

all-time

Success rate

100%

last 7 days

Median throughput23 tok/s
Total requests17,478
Platform share16.4%
Tokens · last 15 daysJul 19Aug 2

Top apps using this model

1OpenAI Python5.6M tok
2OpenClaw790.5K tok
3Lua/OpenResty630.6K tok
4Node.js App54.7K tok
5OpenAI SDK7.4K tok

Public apps sending the most traffic to this model — a signal of what real workloads it fits.

Pricing

Pay per token. Cached input is billed at 10% of the input rate.

$0.0702 /1M input$0.2006 /1M output
Hobby10 req/day · 2K in / 500 out
~$0.07/mo
Production1,000 req/day · 2K in / 500 out
~$7.22/mo
Scale20,000 req/day · 2K in / 500 out
~$144/mo
+ Estimate your workload
1,000
2,000
500
30%

Estimated monthly cost

$6.08

$0.2028 / day on Gemma 4 31B

Same workload on:

Gemini 3.5 Flash Lite$74.92+1132%
Gemini 3.6 Flash$273+4394%

Estimates use list pricing with cached input billed at the 90%-discount rate. Actual bills depend on real token counts — every response includes its exact cost.

When to use Gemma 4 31B

Updated 2026-06-10

Where this model earns its cost — and where it doesn't.

Gemma 4 31B is Google's newest open model and a cheap-tier model on Kyma that accepts images, not just text. It sits in the strong quality tier and is built for multimodal and general-purpose work: send it screenshots, photos, or document scans alongside your prompt and get text back.

On Kyma it is the platform's second most-used model, serving 18.6% of all production tokens — over 370 million — across agents like OpenClaw, Claude Code, and Hermes Agent. Requests sent with the `vision` alias resolve here. Every call gets automatic failover if a serving path degrades, and prompt caching bills repeated prompt prefixes at 10% of the input rate, which matters for agents that resend the same long system prompt.

The 128K-token context window combines with function calling and structured outputs, so it can read an image and return clean JSON in a single call — a complete loop for vision-driven pipelines.

Image understanding

Describe, classify, or answer questions about screenshots, photos, and charts — the core workload the `vision` alias exists for.

Visual data extraction

Vision input plus structured outputs means it can turn receipts, forms, or UI screenshots into validated JSON in one request.

Agent tool use

It supports function calling and already runs real agent traffic in production, from OpenClaw to Claude Code to Hermes Agent.

High-volume general tasks

Cheap-tier pricing with strong-tier quality fits summarization, classification, and chat workloads where cost per call dominates.

Long-context review

The 128K window fits large documents or long agent histories — with or without images attached.

Not ideal for: Extended reasoning problems (it has no reasoning mode) or very long single generations — output is capped at 8K tokens per request.

How it compares

Against the peers people actually weigh it against.

SpecGemma 4 31BGemini 3.5 Flash LiteGemini 3.6 Flash
Input /1M$0.0702$0.405$2.025
Output /1M$0.2006$3.375$10.125
Context128K1M1M
ToolsYesYesYes
ReasoningYesYesYes
Speedmediumfastfast

Quick start

Up and running in under two minutes.

  1. 1

    Create an API key

    Sign up and grab a key from the dashboard — $0.50 free credit, no card required.

    Get API key →
  2. 2

    Make your first request

    Drop in your key and send a chat completion — fully OpenAI-compatible.

    curl https://kymaapi.com/v1/chat/completions \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "gemma-4-31b",
        "messages": [
          {"role": "user", "content": "Explain prompt caching in one paragraph."}
        ]
      }'
  3. 3

    Stream responses

    Add "stream": true to receive tokens as they arrive.

    curl https://kymaapi.com/v1/chat/completions \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "gemma-4-31b",
        "stream": true,
        "messages": [{"role": "user", "content": "Hello!"}]
      }'

FAQ

Common questions about this model.

What is the context window of Gemma 4 31B?

Gemma 4 31B has a 128K-token context window — roughly 188 pages of text in a single request.

How much does the Gemma 4 31B API cost?

$0.0702 per 1M input tokens and $0.2006 per 1M output tokens, with cached input at $0.00702/1M — a 90% discount on repeated prompt prefixes. No subscription; you pay only for what you use.

Does Gemma 4 31B support function calling?

Yes — Gemma 4 31B supports tool/function calling and structured outputs (JSON mode), so it works with agent frameworks out of the box.

How do I use Gemma 4 31B?

Kyma is OpenAI-compatible: point your SDK's base URL at https://kymaapi.com/v1, use your Kyma API key, and set the model to gemma-4-31b. Signing up is free and includes $0.50 of credit — no card required.

Is Gemma 4 31B good for vision tasks?

Yes — it's the model Kyma's vision alias resolves to, and image understanding is what it's recommended for. It accepts text and images in, returns text out, and pairs vision with structured outputs, so you can go from a screenshot to clean JSON in a single call.

When should I pick Gemma 4 31B over a bigger model?

When the task involves images, or when volume makes cost the deciding factor. It sits in the cheap cost tier with strong quality, which is why it carries nearly a fifth of all production tokens on Kyma. For problems that need an extended reasoning mode or outputs longer than 8K tokens, reach for a model built for that instead.

Why run Gemma 4 31B through Kyma?

One OpenAI-compatible endpoint and one API key cover this and every other model on the platform. Every request gets automatic failover, prompt caching cuts repeated prefixes to 10% of the input rate, each response reports its exact cost in usage.cost, and signup includes $0.50 of free credit with no card required.

Start with $0.50 free credit — no card required.Create account →

More models by Google

See all 18
ModelContextInputOutput
GoogleGemini 3.6 Flash1M$2.025$10.125
GoogleGemini 3.5 Flash Lite1M$0.405$3.375
GoogleGemini 3.5 Live Translate$0.0635 / min
GoogleGemini 3.5 Flash1M$2.025$12.15
GoogleGemini 3.1 Flash Live$0.0389 / min
GoogleNano Banana 3 Flash (preview)$0.046 / image
GoogleGemini 3 Flash (Audio)$0.0026 / min
GoogleGemini 3 Flash1M$0.3375$1.35