Google
Google

Gemma 4 31B

Open 31B multimodal reasoning model for coding, long context, and agentic workflows

Text to TextImage to TextVideo to Text

Gemma 4 31B Overview

Gemma 4 31B is Google's flagship dense open-weights model in the Gemma 4 family. It combines strong reasoning, coding performance, native function calling, multimodal understanding across text, image, and video, and a 256K context window in a 31B-parameter open model designed for local and cloud deployment.

Token based
Input tokens / 1M$0.12
Output tokens / 1M$0.37
Cached input / 1M$0.012

Commercial use

How to Use Gemma 4 31B

Overview

Gemma 4 31B is Google's flagship dense open model in the Gemma 4 family, built for reasoning, coding, multimodal understanding, and agentic workflows.

It is a strong fit for teams that want a high-capability open model with a large context window, native tool use, and support for text, image, and video understanding without moving to a closed hosted-only model.

Strengths

Strong Open Reasoning Model

Gemma 4 31B is the highest-quality dense model in the Gemma 4 family. It is designed for advanced reasoning, multi-step planning, instruction following, and difficult professional tasks where a smaller open model may not be enough.

Strong Coding and Agentic Work

The model is built for coding, tool use, and agentic execution. It supports native function calling and is a good fit for code generation, debugging, structured workflows, and autonomous tool-using systems.

Multimodal Understanding

Gemma 4 31B supports text, image, and video input. It is useful for OCR, chart understanding, UI and screen analysis, document parsing, image reasoning, and video understanding through frame-sequence analysis.

Large Context Window

The 31B model supports a 256K context window, which makes it suitable for long documents, large repositories, and workflows where a substantial working set needs to stay in scope.

Open Weights and Flexible Deployment

Gemma 4 31B is released under Apache 2.0, which makes it useful for teams that need open weights, local deployment, controlled infrastructure choices, and customization opportunities.

Dense 31B Quality Target

Within the Gemma 4 family, the 31B dense model is the quality-first option for maximum reasoning and general performance, while the 26B MoE variant leans more toward latency efficiency.

Capabilities

Text-to-Text

Gemma 4 31B handles general language tasks including reasoning, coding, summarization, planning, transformation, and structured generation.

Image-to-Text

The model supports image understanding for OCR, chart comprehension, document analysis, UI understanding, and visual reasoning tasks.

Video-to-Text

The model supports video understanding by analyzing sequences of frames, making it useful for temporal visual analysis beyond single still images.

Function Calling

Gemma 4 31B supports native function calling, enabling tool orchestration and agentic application patterns.

Input and Output

  • AIR ID: google:gemma@4-31b
  • Input: text, images, and video
  • Output: text
  • Context window: 256K tokens
  • Parameters: 30.7B dense
  • Audio input: not supported on the 31B model
  • License: Apache 2.0

Best Fit

  • Open coding assistants
  • Long-context analysis
  • Multimodal reasoning over images and video
  • Tool-using agents
  • Enterprise and local deployment workflows

More models from Google

Gemini 3.1 Flash TTS is a text-to-speech model for expressive spoken audio generation from text. It supports granular control over delivery through audio tags, native multi-speaker dialogue, and speech generation across 70+ languages, making it suitable for narration, conversational voice apps, podcasts, audiobooks, and other production-oriented voice workflows.

Veo 3.1 Lite

Api Only

Veo 3.1 Lite is the most cost-effective model in the Veo 3.1 family, designed for high-volume applications requiring rapid iteration. It supports text-to-video and image-to-video generation at 720p or 1080p in landscape and portrait formats, with customizable duration of 4, 6, or 8 seconds. It maintains the same generation speed as Veo 3.1 Fast at less than 50% of the cost, and includes native synchronized audio generation.

Gemini 3.1 Flash Lite is Google’s flagship multimodal language model that processes text alongside images, audio, video, code, and documents. It offers high-performance reasoning, complex instruction following, and deep contextual understanding for a wide range of tasks across language, analysis, and problem solving

Nano Banana 2 (officially known as Gemini 3.1 Flash Image) is Google’s upgraded AI image generation and editing model that brings advanced visual creation capabilities to a broad audience. It generates detailed, expressive images from text and image prompts with sharp details, richer lighting, and improved adherence to complex instructions. Nano Banana 2 also supports multi-object and multi-character consistency, accurate text rendering within images, and flexible resolution control up to 4K. It is now integrated across Google’s AI platforms including the Gemini app, Search AI Mode, and other Gemini-powered services.

Gemini 3.1 Pro is Google’s flagship multimodal language model that processes text alongside images, audio, video, code, and documents. It offers high-performance reasoning, complex instruction following, and deep contextual understanding for a wide range of tasks across language, analysis, and problem solving.

Gemini 3 Flash is Google’s flagship multimodal language model that processes text alongside images, audio, video, code, and documents. It offers high-performance reasoning, complex instruction following, and deep contextual understanding for a wide range of tasks across language, analysis, and problem solving.

Nano Banana Pro (also known as Nano Banana 2) is a Gemini 3 Pro Image Preview model for controlled visual creation. It improves reasoning over lighting and camera angle. It supports high resolution output and multi image blending for production ready design workflows and creative tools.

Veo 3.1 is a cinematic video generation model for developers. It turns text prompts or reference images into high fidelity scenes with richer native audio, better prompt adherence, and granular shot control. Use it for story driven clips with smoother motion and consistent style.

Veo 3.1 Fast is a high speed variant of Veo 3.1 for rapid creative iteration. It supports text prompts, image prompts, and reference images. It targets low latency workflows while keeping cinematic quality for short form and multi shot video generation with native audio.

Gemini Flash Image 2.5, commonly known as Nano Banana, generates and edits images from rich prompts and multi image inputs. It maintains character identity across frames. It supports targeted edits and completions that use strong world knowledge. Ideal for visual apps that need speed and control.

Veo 3 Fast is an optimized video generation model for rapid iteration and lower cost. It creates short clips from text or images with native audio that includes dialogue, sound effects and music. It keeps realistic motion, strong physics and reliable prompt control.

Imagen 4 Ultra is Google's highest quality text to image model. It focuses on photorealism, sharp details, and accurate text rendering. It targets production workloads that need strict prompt adherence, optional higher resolution output, and fast generation through the Gemini API.

Imagen 4 Fast is a latency optimized text to image model in the Imagen 4 family. It targets interactive apps and high volume pipelines. It keeps strong Imagen 4 visual quality while cutting generation time, so teams can iterate faster and reduce serving costs in production.

Imagen 4 Preview is Google's next generation text to image model for developers. It supports 2K resolution with improved detail rendering and robust typography control. Use it to generate photorealistic or stylized assets for product shots, slides, marketing visuals, and prototypes.

Veo 3 is a state of the art generative video model with native audio. It supports text prompts and image prompts, produces short HD clips with dialogue, sound effects and music, and delivers realistic motion with strong prompt adherence for cinematic video generation.

Imagen 3 is Google’s high quality text to image model. It produces detailed, photorealistic images with improved lighting and fewer artifacts. It offers strong prompt adherence, better text rendering, and supports editing workflows through the Gemini API and Vertex AI.

Veo 2 is a text to video model that produces high resolution clips with strong control over camera movement, composition, and scene dynamics. It supports cinematic framing, object aware motion, extended durations, and up to 4K outputs for production grade workflows.

Imagen 3 Fast is a streamlined text to image model that targets low latency use cases. It delivers bright images with strong contrast and improved prompt adherence. Ideal for apps that need fast image generation inside Vertex AI and Firebase with stable, predictable performance.