Gemma 4 31B
ChatNot available
State-of-the-art thinking model for complex reasoning in code, math, and STEM.
- Context
- 262Ktokens
- Max output
- 16Ktokens
- Released
- 2026-04
Pricing
$ / 1M tokensInput
$0.08/M
Output
$0.35/M
Cache Read
$0.01/M
Cache Write
$0.08/M
Capabilities
3 listed- Chat
- Tool Use
- Coding
Code examples
POST /v1/chat/completionspython
from openai import OpenAI
client = OpenAI(
api_key="your_api_key",
base_url="https://api.modelstack.cc/v1",
)
response = client.chat.completions.create(
model="gemma-4-31b-it",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)Related models
Frequently asked questions
How is Gemma 4 31B billed on ModelStack?expand_more
ModelStack bills based on actual request usage. Input, output, cache, and any other applicable rates follow the live pricing table on this page. Final request costs are available in the console.
What are the context window and maximum output for Gemma 4 31B?expand_more
Gemma 4 31B has a 262K context window and supports up to 16K of output.
How can I call Gemma 4 31B through ModelStack?expand_more
Use the model ID `gemma-4-31b-it` with any OpenAI-compatible SDK pointed at the ModelStack API — see the code examples above for Python, Node.js, and cURL.
Which capabilities does Gemma 4 31B support?expand_more
Gemma 4 31B supports: Chat, Tool Use, Coding.