Gemini 3.1 Pro Preview API
google/gemini-3.1-pro-preview is Google's Pro-tier preview id in the NextModel catalog: $2.00 per million input tokens, $12.00 per million output tokens, and a 1,000,000 token context window. The row lists both the gemini API surface and the OpenAI-compatible chat completions surface, so OpenAI SDK code can call it directly. Capabilities listed are Thinking, Function Calling, and Vision. Two facts to weigh before adopting it. First, the preview suffix: this is a preview id, not a frozen production contract, so treat the row as something that can move. Second, unlike the Flash ids in this family, no cache price is published for this id — repeated-context workloads have no listed cache-hit rate to model. Preview status is a caveat about stability, not a defect; the price and context rows above are the catalog's current published values.
| Input length | Input / 1M | Output / 1M | Cache hit / 1M |
|---|---|---|---|
| ≤ 200k | $2 | $12 | $0.2 |
| > 200k | $4 | $18 | $0.4 |
What is Gemini 3.1 Pro Preview API in NextModel?
google/gemini-3.1-pro-preview is Google's Pro-tier preview id in the NextModel catalog: $2.00 per million input tokens, $12.00 per million output tokens, and a 1,000,000 token context window. The row lists both the gemini API surface and the OpenAI-compatible chat completions surface, so OpenAI SDK code can call it directly. Capabilities listed are Thinking, Function Calling, and Vision. Two facts to weigh before adopting it. First, the preview suffix: this is a preview id, not a frozen production contract, so treat the row as something that can move. Second, unlike the Flash ids in this family, no cache price is published for this id — repeated-context workloads have no listed cache-hit rate to model. Preview status is a caveat about stability, not a defect; the price and context rows above are the catalog's current published values.
Gemini 3.1 Pro Preview via NextModel: 1M-token context; Starting at $2 / 1M tokens in / $12 / 1M tokens out per 1M tokens. Capabilities: streaming, tool, json.
Best use cases
- Long-context Pro-tier passes — big corpora, agentic loops — where the 1,000,000 token window and a Thinking entry justify $2.00 / $12.00 per million tokens.
- OpenAI SDK chat-completions code that needs a Gemini Pro id: this row lists the chat surface alongside gemini, so no request-shape rewrite is required.
- Evaluation arms: scoring a preview Pro generation against your current production id before committing real traffic.
When not to use
- Production paths that need a stable, non-preview id: the preview suffix means the id and its published row can change — pin nothing critical to it.
- Cost-sensitive classification or extraction: gemini-3.1-flash-lite lists $0.25 / $1.50 and deepseek/deepseek-v4-flash lists $0.14 / $0.28 per million tokens.
- Repeated-context workloads billed on cache hits: no cache price is published for this id, so that line of the bill cannot be modeled from the catalog.
OpenAI-compatible code example
curl https://api.nextmodel.app/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NEXTMODEL_API_KEY" \
-d '{"model":"google/gemini-3.1-pro-preview","messages":[{"role":"user","content":"Reply with OK."}]}'Switching models only changes the model field.
Similar alternatives
Claude Sonnet 4.6 via NextModel: 1M-token context; $3 / 1M tokens in / $15 / 1M tokens out per 1M tokens. Capabilities: streaming, tool, json.
Claude Opus 4.6 via NextModel: 1M-token context; $5 / 1M tokens in / $25 / 1M tokens out per 1M tokens. Capabilities: streaming, tool, json.
Kimi-K2.5 via NextModel: 256k-token context; $0.58 / 1M tokens in / $3.02 / 1M tokens out per 1M tokens. Capabilities: streaming, tool, json.
Reading
Articles that explain Gemini 3.1 Pro Preview
LLM Gateway: Compare Options and Alternatives
Gemini-shape and OpenAI-shape ids resolve through one base URL and key.
Zhao Yu'an
How to estimate AI API cost before you ship
A $12.00 / 1M output rate makes traffic estimates non-optional.
Lin Qiming
FAQ
Gemini 3.1 Pro Preview API questions
What model id and endpoint do I send for Gemini 3.1 Pro Preview?
Send google/gemini-3.1-pro-preview to the Gemini surface under https://api.nextmodel.app/v1/gemini, or to the OpenAI-compatible chat completions endpoint under https://api.nextmodel.app/v1 with your OpenAI SDK — the catalog lists both surfaces for this id.
What does the catalog list for price and context?
$2.00 per million input tokens and $12.00 per million output tokens, with a 1,000,000 token context window. No cache price is published for this id.
What should I treat as unverified?
Three things: the preview suffix means the id and its row can move; no cache price exists, so cache-heavy billing is unmodelable; and latency band plus first-party benchmark scores are unpublished. The Thinking, Function Calling, and Vision entries come from the catalog row with no quality scores behind them.
Start now
Ready to start building?
Passwordless signup, pay-as-you-go billing, and one OpenAI-compatible endpoint for every model. Create your key and send your first request in minutes.