Gemini

Gemini 3.1 Pro Preview

Chat
Not available
Get started

Most capable Gemini model. Optimized for software engineering and agentic workflows.

Context
1.05Mtokens
Max output
66Ktokens
Latency
~22ms
Released
2026-02

Pricing

$ / 1M tokens
Input
$2.00/M
Output
$12.00/M
Cache Read
$0.20/M
Cache Write
$0.375/M

Capabilities

3 listed
  • Chat
  • Tool Use
  • Coding

Code examples

POST /v1/chat/completions
python
from openai import OpenAI

client = OpenAI(
    api_key="your_api_key",
    base_url="https://api.modelstack.cc/v1",
)

response = client.chat.completions.create(
    model="gemini-3.1-pro",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Related models

Frequently asked questions

How is Gemini 3.1 Pro Preview 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 Gemini 3.1 Pro Preview?expand_more
Gemini 3.1 Pro Preview has a 1.05M context window and supports up to 66K of output.
How can I call Gemini 3.1 Pro Preview through ModelStack?expand_more
Use the model ID `gemini-3.1-pro` with any OpenAI-compatible SDK pointed at the ModelStack API — see the code examples above for Python, Node.js, and cURL.
Which capabilities does Gemini 3.1 Pro Preview support?expand_more
Gemini 3.1 Pro Preview supports: Chat, Tool Use, Coding.