Gemma 4 31B

gemma-4-31b-it

Gemma 4 26B A4B is an efficient Mixture-of-Experts (MoE) model from Google DeepMind, combining 26B-class model capacity with approximately 4B active parameters during inference. It delivers strong reasoning, coding, multimodal understanding, and agentic capabilities while offering faster and more efficient inference than larger dense models. With support for text and image inputs, a 256K context window, native function calling, and more than 140 languages, it is well suited for AI agents, coding applications, long-context processing, and high-throughput workloads.

Context Window

262.1K tokens

Maximum Output

32.8K tokens

Release Date

Apr 2, 2026

Modalities

Gemma 4 31B Pricing

Input PriceOutput PriceCache Read
$0.75/M$1/M$0.75/M

Gemma 4 31B API Capabilities

Reasoning

Supported

Tool calling

Supported

Temperature parameter

Supported

Attachments

Supported

Knowledge Base

—

Endpoint Protocols

Completions APIResponses APIMessages API

Model Highlights

Dense reasoning, long context, and visual understanding.

Dense Reasoning

A 30.7B-parameter dense model with configurable thinking, designed for reasoning and coding.

Long Context

Supports a 256K-token context window with interleaved local and global attention.

Visual Understanding

Combines text and image inputs to generate text, supporting visual questions and document interpretation.

Use Cases

Practical workloads for coding, documents, and images.

Coding Assistance

Draft code, explain implementations, and propose fixes using supplied source files and requirements.

Document Synthesis

Summarize lengthy materials, compare sections, and answer questions using documents supplied in context.

Visual Document Review

Interpret screenshots, charts, and document images to produce descriptions and answers for human review.

How to Use Gemma 4 31B via the TokenHub API

Create API key
import OpenAI from "openai"

const client = new OpenAI({
  apiKey: process.env.TOKENHUB_API_KEY,
  baseURL: "https://us-api.tokenhub.com/v1",
})

const result = await client.chat.completions.create({})
console.log(result.choices[0]?.message?.content)

Media and Demos

Official posts and community demonstrations. Community observations reflect individual setups.

X (Twitter)

Google AI Studio

View original
View post on X

Prince Canuma

View original
View post on X

Google Gemma

View original
View post on X

Reddit

YouTube

AI超元域

View original
Watch on YouTube

NightShift Tech

View original
Watch on YouTube

大雷早上好

View original
Watch on YouTube

FAQs

Model capabilities, tradeoffs, and TokenHub usage.

What is Gemma 4 31B?+

It is Google DeepMind’s instruction-tuned, open-weight dense model with 30.7B parameters. It accepts text and images and generates text; its weights use the Apache 2.0 license.

Which workloads suit its strengths?+

Coding assistance, multi-step reasoning, long-document analysis, and visual questions are suitable starting points. Configurable thinking and a 256K context window support these workflows.

What limitations should I consider?+

Outputs can be inaccurate and require review. This variant has no native audio input. Long contexts and thinking can increase resource use and latency; hosted limits may be lower than the model’s maximum.

How can I use it on TokenHub, and what does it cost?+

Confirm availability, the exact model ID, supported inputs, and pricing in your TokenHub account. If listed, use the endpoint and credentials shown in its integration guide. Open weights do not imply free hosted inference.

How should I choose between the dense and MoE variants?+

Evaluate the dense variant when reasoning and coding quality are priorities. Compare it with the 26B A4B MoE variant when inference efficiency matters, using the same prompts and deployment settings.

Ready to use Gemma 4 31B?

Use one API key to access Gemma 4 31B and more AI models through TokenHub.

Create API key