Gemma 4 31B
Gemma 4 31B is a 31B-parameter instruction-tuned model for text and image
understanding. It accepts text and inline images with a 262,144-token context
window. It answers directly by default and can reason first when you set
reasoning_effort (see Reasoning).
Gemma 4 31B is not specifically tuned for Indian languages.
At a glance
Key capabilities
Moving from OpenRouter, Fireworks AI, or Together AI? The migration guides map model IDs and request fields to Sarvam.
Quickstart
The examples send a local image as a base64 data URI. Remote image URLs are not supported.
Reasoning
Gemma 4 answers directly by default. To have it reason before answering, set an effort level:
On chat, read the reasoning trace from choices[].message.reasoning_content. Reasoning tokens
are billed as output tokens and count against max_tokens / max_output_tokens.
Supported parameters
model: "gemma4" on Chat Completion V2
and Responses. Full request/response schemas live on
those API reference pages; this table covers what’s actually accepted for this model.
400 is invalid_request_error. Images must be base64 data URIs in image_url content
parts (remote URLs are rejected).