Gemini 3.1 Pro
Gemini 3.1 Pro (google/gemini-3.1-pro-preview) is Google’s flagship model. Besides text it accepts images, documents, video and audio, and regulates its reasoning depth across five levels. Requests go through the usual POST /v1/chat/completions in OpenAI format.
Parameters and capabilities
Section titled “Parameters and capabilities”| Capability | Value |
|---|---|
model |
google/gemini-3.1-pro-preview (or the short gemini-3.1-pro-preview) |
| Image input | Yes — image_url with a data: URL in the last message |
| File input | Yes — PDF, DOCX, TXT, CSV, XLSX, PPTX, up to 5 per request |
| Video input | Yes — the capabilities.video flag: attachments in the web cabinet and the bot |
| Audio input | Yes — the capabilities.audio flag: attachments in the web cabinet and the bot |
| Reasoning | reasoning_effort: low, medium, high, xhigh, max — cannot be disabled |
| Cache read | $0.25 per 1M tokens |
| Cache write | $0.47 per 1M tokens |
The model’s reasoning cannot be turned off (can_disable_reasoning: false): it thinks on every request, and that is reflected in the price. Reasoning is billed as output tokens and eats into the max_tokens budget. Over /v1, images and documents work as attachments; video and audio input are attachments of the web cabinet and the bot.
Examples
Section titled “Examples”A request with a reasoning depth
Section titled “A request with a reasoning depth”from openai import OpenAI
client = OpenAI(base_url="https://api.mixen.ai/v1", api_key="mxn-...")
resp = client.chat.completions.create( model="google/gemini-3.1-pro-preview", messages=[{"role": "user", "content": "Compare these two pricing plans and find hidden contradictions"}], reasoning_effort="high",)print(resp.choices[0].message.content)curl https://api.mixen.ai/v1/chat/completions \ -H "Authorization: Bearer $MIXEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "google/gemini-3.1-pro-preview", "messages": [{"role": "user", "content": "Compare these two pricing plans and find hidden contradictions"}], "reasoning_effort": "high" }'Streaming in Python
Section titled “Streaming in Python”stream = client.chat.completions.create( model="google/gemini-3.1-pro-preview", messages=[{"role": "user", "content": "Walk through this contract point by point: risks, terms, penalties"}], stream=True, stream_options={"include_usage": True},)for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="", flush=True)Per 1M tokens: input — $2.50, output — $15. Context cache: read — $0.25, write — $0.47. Catalog prices track the exchange rate — take current values from the catalog.
Strengths and limits
Section titled “Strengths and limits”- Four kinds of input in one model: images, documents, video and audio — per the catalog flags.
- Five reasoning depth levels, including
xhighandmax— from quick answers to multi-step analysis. - A cache friendlier than most flagships: the $0.47 write is cheaper than the $2.50 full input, and reads cost roughly a tenth.
- Reasoning cannot be disabled — the lowest depth is
low, so the model thinks even on simple questions. - Output at $15 per 1M tokens is six times the input; long answers are billed in full.
- The model id carries a
-previewsuffix — pass it exactly as in the catalog.
All models — in the catalog. The general text workflow — chat guide.