Hormouz AIHormouzSign in

Google: Gemma 4 31B: AI model

Gemma 4 31B is a Google multimodal model for reasoning, coding and everyday chat, with a 262K-token context window. Available via Hormouz with stable access from inside Iran.

Context window:
262,144 tokens
Input:
$0.09/1M tokens
Output:
$0.34/1M tokens
Type:
text, image, video
  • Vision
  • Tools
  • Streaming
  • Long context
Good for:Popular for Translation · #15Popular for Health · #19Ranks are based on global usage data

Thinking levels:

Gemma 4 31B is a Google Gemma-family model built for reasoning, coding, mathematics and general chat. It supports configurable "thinking" (reasoning effort levels) so you can trade cost and latency for accuracy on hard tasks. It accepts images, text and video and returns text, with a context window of up to 262K tokens.

Its multimodal input makes it suitable for document understanding, chart and image analysis, and workflows that mix text with images and video. With thinking enabled it is stronger on multi-step reasoning; with thinking minimal it responds quickly and cheaply.

Pricing is usage-based at $0.39/M in · $0.97/M out. Gemma 4 31B is served through Hormouz behind an OpenAI-compatible API, with stable access from inside Iran.

Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output. Features a 256K token context window, configurable thinking/reasoning mode, native function...

Quickstart

curl https://api.hormouz.net/v1/chat/completions \
  -H "Authorization: Bearer ng-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemma-4-31b-it",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Specs

VendorGoogle
TypeText, Image, Video
Context window262,144 tokens
Pricing$0.09/M in · $0.34/M out
APIChat Completions
CapabilitiesStreaming · Vision · Tools

Benchmarks

33.2
Coding Index
Better than 35% of models we compared

Reasoning

GPQA Diamond
Graduate-level scientific reasoning
76.3%
HLE
Humanity's Last Exam
11.8%
IFBench
Instruction-following
53.5%
AA-LCR
Long-context reasoning
46.7%
CritPt
Research-level physics reasoning
0%
AA Omniscience
Broad factual knowledge accuracy
16.6%
Non-Hallucination
Rate of avoiding fabricated answers
18.1%

Coding

Terminal-Bench Hard
Agentic coding & terminal use
30.3%

Agentic

τ²-Bench
Tool-use agents in dual-control scenarios
65.5%
GDPval
Economically valuable tasks
2.5%

Source: Artificial Analysis

Code example

cURL
curl https://api.hormouz.net/v1/chat/completions \
  -H "Authorization: Bearer ng-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemma-4-31b-it",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
Python
from openai import OpenAI
client = OpenAI(api_key="ng-YOUR_API_KEY", base_url="https://api.hormouz.net/v1")
response = client.chat.completions.create(
    model="google/gemma-4-31b-it",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
JavaScript
import OpenAI from "openai";
const client = new OpenAI({ apiKey: "ng-YOUR_API_KEY", baseURL: "https://api.hormouz.net/v1" });
const response = await client.chat.completions.create({
  model: "google/gemma-4-31b-it",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);

Buy the Google: Gemma 4 31B API, paid in rial

  • Buy credit with an Iranian bank card; no foreign card or account needed.
  • One Hormouz key reaches Google: Gemma 4 31B and 600+ other models, and you pay only for what you use.
  • No VPN and no risk of a banned account; just change the base URL to api.hormouz.net/v1.
Create an accountBuy Gemini API access, paid in rial

Use via Hormouz

Connect to this model and 600+ others with one API key, then see usage down to each request.

Request company access

FAQ

What inputs does Gemma 4 31B accept?
It accepts images, text and video and returns text. Reasoning effort ("thinking") is configurable.
What is the context window of Gemma 4 31B?
Up to 262K tokens, suitable for long documents and multi-turn conversations.
How much does Gemma 4 31B cost?
Usage-based pricing: $0.39/M in · $0.97/M out.
How does Gemma 4 31B perform on benchmarks?
Independent scores from Artificial Analysis are shown in the Benchmarks section above, grouped by reasoning, coding and agentic tasks.
How do I access Gemma 4 31B from inside Iran?
Create an account on Hormouz and generate an API key. Hormouz provides stable access from inside Iran via an OpenAI-compatible API.

Updated 2026-10-13