Gemini 3.1 Pro Preview API price
On OpenCheap, Gemini 3.1 Pro Preview (Google) costs $1.20 per 1M input tokens and $7.20 per 1M output tokens (cached input $0.120), through one OpenAI-compatible API.
Prices updated 2026-11-03 20:59 UTC.
Price per 1M tokens
| Input, our price | $1.20 |
|---|---|
| Output, our price | $7.20 |
| Cached input, our price | $0.120 |
| Prompts above 200K tokens, input · output | $2.40 · $11.00 |
| Context length | 1M tokens |
| OpenRouter list, input · output | $2.00 · $12.00 |
| vs list | −40% |
“vs list” compares our price with OpenRouter's list price on a 1:3 input:output blend, as on the Models page. Above a tier's prompt length, the whole request is priced at that tier's rates.
Variants
- Gemini 3.1 Pro (Preview High) (
opencheap/gemini-3.1-pro-preview:high): $3.00 input · $18.00 output per 1M tokens - Gemini 3.1 Pro (Preview Low) (
opencheap/gemini-3.1-pro-preview:low): $3.00 input · $18.00 output per 1M tokens - Gemini 3.1 Pro Preview Search (
opencheap/gemini-3.1-pro-preview:search): $3.00 input · $18.00 output per 1M tokens
How to call Gemini 3.1 Pro Preview
Base URL https://api.opencheap.si/v1, model id opencheap/gemini-3.1-pro-preview, and an API key from the console. Any OpenAI SDK works.
curl https://api.opencheap.si/v1/chat/completions \
-H "Authorization: Bearer $OPENCHEAP_API_KEY" -H "Content-Type: application/json" \
-d '{ "model": "opencheap/gemini-3.1-pro-preview", "messages": [{ "role": "user", "content": "Hi" }] }'import os
from openai import OpenAI
client = OpenAI(base_url="https://api.opencheap.si/v1", api_key=os.environ["OPENCHEAP_API_KEY"])
r = client.chat.completions.create(model="opencheap/gemini-3.1-pro-preview",
messages=[{"role": "user", "content": "Hi"}])
print(r.choices[0].message.content)FAQ
How much does the Gemini 3.1 Pro Preview API cost on OpenCheap?
On OpenCheap, Gemini 3.1 Pro Preview costs $1.20 per 1M input tokens and $7.20 per 1M output tokens, and cached input $0.120 per 1M tokens. Each request is routed to the cheapest healthy source for the model. You pay from one prepaid balance, with no monthly fee.
Is it OpenAI-compatible?
Yes. Point any OpenAI SDK or HTTP client at the base URL https://api.opencheap.si/v1 with an OpenCheap API key, and call /chat/completions with the model id opencheap/gemini-3.1-pro-preview. Requests and responses have the same shape as OpenAI's chat completions, streaming included.
Does it work with Cursor, Claude Code or Codex?
Yes. In Cursor, add the custom model opencheap/gemini-3.1-pro-preview with the base URL https://api.opencheap.si/v1. In Claude Code, set ANTHROPIC_BASE_URL to https://api.opencheap.si and ANTHROPIC_MODEL to opencheap/gemini-3.1-pro-preview. In Codex, add OpenCheap as a model provider with base_url https://api.opencheap.si/v1. The quickstart has each setup step by step.