Gemma 4 31B, the vision open model, served two ways
Google's Gemma 4 31B takes images and text in one request: screenshots, scanned pages, charts, photos. It runs here in two servings: the full-precision model, and an NVFP4-quantized variant on our own fleet at a fraction of the rate.
- Vision + text input
- 32K context
- NVFP4 variant at $0.12/1M in
- Batch at 50% off
Per token, nothing else.
Input / output per 1M tokens
$0.99 / $1.49
Batch jobs: $0.495 / $0.745 (50% off, 24h window)
openrelay/gemma-4-31bFull catalog on the inference pricing page. Deposit $5 to get $10.
from openai import OpenAI
client = OpenAI(
base_url="https://inference.openrelay.inc/v1",
api_key="vl_••••••••", # same SDK, new base URL
)
import base64
img = base64.b64encode(open("chart.png", "rb").read()).decode()
resp = client.chat.completions.create(
model="openrelay/gemma-4-31b",
messages=[{"role": "user", "content": [
{"type": "text", "text": "What does this chart imply about Q3?"},
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{img}"}},
]}],
)
print(resp.choices[0].message.content)The spec sheet.
What the model is, what it takes in, and the surface it serves on.
- Model ids
- openrelay/gemma-4-31b · openrelay/gemma-4-31b-nvfp4-32k
- Parameters
- 31B (open weights)
- Modalities
- Text + image in, text out
- Context
- 32K tokens
- Endpoint
- POST /v1/chat/completions with optional image parts
- Variants
- Full precision, or NVFP4 quantized on OpenRelay's own GPU fleet
Where Gemma 4 31B earns its place.
What this model is actually for, versus the rest of the catalog.
Vision where text models stop
Classify scanned pages by layout, moderate image posts, read charts, describe screenshots. Anything where the signal is in pixels routes here while text-only work stays on cheaper models, in the same JSONL file.
Two price points, one model
The NVFP4 32K serving runs on OpenRelay's own fleet at $0.12/$0.35 per 1M, an 8x cut on input versus full precision, with quality that holds for summarization, classification, and most vision tasks. Benchmark both on your data; the cheap one usually wins.
The volume pick for long documents
32K context at NVFP4 rates makes whole-document summarization and analysis cheap enough to run across a corpus, which is exactly how the batch summarization recipe uses it.
Run it in batch at half price.
The NVFP4 variant is the volume engine of the batch summarization recipe ($0.06 in / $0.175 out per 1M in batch), and full-precision Gemma handles image records inside moderation and classification jobs.
Batch Inference API overviewGemma 4 31B, answered.
Is there a hosted Gemma API?
Yes. Gemma 4 31B is live behind the OpenAI-compatible endpoint at inference.openrelay.inc/v1, vision input included, with the standard OpenAI SDK. No Google Cloud project required.
What does the Gemma API cost?
Full precision runs at $0.99/$1.49 per 1M tokens; the NVFP4 32K variant on OpenRelay's own fleet runs at $0.12/$0.35. Batch halves both. If your workload is text-heavy, start with NVFP4 and escalate only if quality demands it.
What is the NVFP4 variant and does quality suffer?
NVFP4 is 4-bit quantization on modern NVIDIA silicon, which is what makes the 8x input-price cut possible. On summarization, classification, and most vision tasks the quality delta is small to unmeasurable; on fine-grained generation it can show. A few hundred rows through both variants settles it for your task.
Can Gemma read scanned documents?
Yes, send page images as message parts. For pure transcription at archive scale, DeepSeek-OCR 2 is cheaper per page; Gemma earns its rate when pages need interpretation: forms with implicit structure, charts, handwriting mixed with print.
First request in five lines.
Point the OpenAI SDK at inference.openrelay.inc/v1 and run Gemma 4 31B per token. No contract, no minimums.