Gemini 3.1 Pro Preview API
Google advanced multimodal and agentic reasoning preview.
Gemini 3.1 Pro Preview is an LLM / chat model from Google, available on OttoPort's OpenAI-compatible API as the model ID gemini-3.1-pro-preview at $2.22 / $13.29 per 1M tokens as of 2026-10-14.
Provider
Price
$2.22 / $13.29 per 1M tokens
Model ID
gemini-3.1-pro-preview
Type
LLM / chat model
Create with Gemini 3.1 Pro Preview
chatYour result appears here
Start with the example prompt or make it your own. Your OttoPort account is used securely for generation.
Gemini 3.1 Pro Preview API pricing
What OttoPort bills for Gemini 3.1 Pro Preview, and what that works out to per unit. Rates are read from the same catalog the gateway meters against, and were current on 2026-10-14.
| Input | $2.22 / 1M tokens | |
|---|---|---|
| Output | $13.29 / 1M tokens | |
| Typical request | $0.0155 | 1,000 input + 1,000 output tokens |
| Requests per $1 | 64 | at that same 1K in / 1K out shape |
| Context window | 1,048,576 tokens | a full-context request costs $2.33 in input alone |
No subscription and no minimum — OttoPort bills prepaid credits against usage. See the full rate card.
Call Gemini 3.1 Pro Preview in three lines
Send "model": "gemini-3.1-pro-preview" to POST https://ottoport.ai/api/v1/chat/completions with an OttoPort key. No Google account, no waitlist, no separate SDK.
curl https://ottoport.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OTTOPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-pro-preview",
"messages": [{ "role": "user", "content": "Hello!" }]
}'from openai import OpenAI
client = OpenAI(
api_key="op-...", # your OttoPort key
base_url="https://ottoport.ai/api/v1", # the only line that changes
)
resp = client.chat.completions.create(
model="gemini-3.1-pro-preview",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: "op-...", // your OttoPort key
baseURL: "https://ottoport.ai/api/v1", // the only line that changes
});
const resp = await client.chat.completions.create({
model: "gemini-3.1-pro-preview",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);Before you start
- 1. Create a key at /api-keys.
- 2. Top up credits — the smallest pack is $25.
- 3. Paste the request. It returns on the same request.
Full reference at /docs, or drive it from an agent with the MCP server and CLI.
Request parameters
The body POST https://ottoport.ai/api/v1/chat/completions accepts for Gemini 3.1 Pro Preview.
| Field | Type | Required | Notes |
|---|---|---|---|
| model | string | Yes | Always gemini-3.1-pro-preview for Gemini 3.1 Pro Preview. |
| messages | array | Yes | OpenAI chat message objects: role and content. |
| stream | boolean | No | Server-sent events, same frame shape as OpenAI. |
| temperature | number | No | Sampling temperature, passed through to the provider. |
Gemini 3.1 Pro Preview direct vs through OttoPort
Gemini 3.1 Pro Preview is the same model either way — what changes is how many accounts, keys, and integrations you carry to reach it.
| Google direct | Via OttoPort | |
|---|---|---|
| Accounts and keys | A Google account, plus one more for every other model you add | One OttoPort account and one key for the whole catalog |
| Request shape | Google's own SDK and response format | OpenAI-compatible — point baseURL at OttoPort and change the model string |
| Switching models | A new integration per provider | Replace gemini-3.1-pro-preview with any other model ID in the catalog |
| Billing | A separate invoice and contract per provider | Prepaid credits, no subscription, one usage ledger |
| Provider outages | Your call fails | Configured backup routes are tried in order on provider failure |
Give the model a role and goal.
State the intended output format.
Add relevant context before constraints.
Gemini 3.1 Pro Preview API questions
Cost, keys, and model IDs for Gemini 3.1 Pro Preview on OttoPort.
How much does the Gemini 3.1 Pro Preview API cost?
On OttoPort, Gemini 3.1 Pro Preview costs $2.22 / $13.29 per 1M tokens as of 2026-10-14. For scale, typical request: $0.0155. Billing is prepaid usage with no subscription and no minimum, and the current rate is always published at ottoport.ai/pricing.
How do I get a Gemini 3.1 Pro Preview API key?
You do not need a Google key. Create an OttoPort account, generate a key at ottoport.ai/api-keys, and send it as "Authorization: Bearer <key>" to POST https://ottoport.ai/api/v1/chat/completions with "model": "gemini-3.1-pro-preview". The same key reaches every other model in the catalog.
What is the model ID for Gemini 3.1 Pro Preview?
The OttoPort model ID for Gemini 3.1 Pro Preview is gemini-3.1-pro-preview. Pass it as the model field on POST https://ottoport.ai/api/v1/chat/completions, or list it programmatically from GET https://ottoport.ai/api/v1/models.
Can I call Gemini 3.1 Pro Preview with the OpenAI SDK?
Yes. Set the OpenAI SDK's base URL to https://ottoport.ai/api/v1, use an OttoPort API key, and pass gemini-3.1-pro-preview as the model. Chat completions, streaming, and model listing follow the OpenAI request and response shapes, so existing code works after changing two lines.
What is Gemini 3.1 Pro Preview's context window?
Gemini 3.1 Pro Preview accepts up to 1,048,576 tokens of context on OttoPort, the same window Google exposes on its own API.
Do I need a Google account to use Gemini 3.1 Pro Preview?
No. OttoPort connects to Google on your behalf, so one OttoPort account covers Gemini 3.1 Pro Preview and every other model in the catalog — no per-provider contracts, keys, or invoices.
Other LLM / chat models on the same API
Same endpoint, same key — swapping model is a one-string change from gemini-3.1-pro-preview.
Claude Opus 5.5 API
Anthropic
$4.43 / $22.15 per 1M tokens
GPT-6 Astra API
OpenAI
$11.08 / $55.39 per 1M tokens
GPT-6 Astra Pro API
OpenAI
$11.08 / $55.39 per 1M tokens
Claude Fable 5.1 API
Anthropic
$11.08 / $55.39 per 1M tokens
Claude Opus 5 API
Anthropic
$5.54 / $27.69 per 1M tokens
GPT-6 Sol API
OpenAI
$2.22 / $11.08 per 1M tokens
Browse the full catalog — every model with its provider and per-unit price.