Home / Model Explorer / Gemini 3.1 Pro Preview
Gemini 3.1 Pro Preview API
Multimodal preview · Programming and complex reasoning
- Model ID:
gemini-3.1-pro-preview - Example endpoint:
POST https://api.yomiapi.com/v1/chat/completions - View public route prices
Overview
About this model
Gemini 3.1 Pro official preview model, designed for complex reasoning, code development, long document analysis, and multimodal understanding. Supports text and image input, tool calling, and 100K Token long context. When the input context exceeds 20K Token, billing is based on the long-context tier, and the actual cost is subject to the price of the selected route.
Capabilities
Capability matrix
Pricing and groups
Routes and pricing
Vertex Direct connection. gemini cache hit rate is low!
Input
$0.72 / 1M
Output
$4.32 / 1M
Cache read
$0.072 / 1M
Cache write
— / 1M
All pricing tiers and conditions
Pricing tier
Input length ≤ 200,000 tokens
Input
$0.72 / 1M
Output
$4.32 / 1M
Cache read
$0.072 / 1M
Cache write
— / 1M
Pricing tier
Input length > 200,000 tokens
Input
$1.44 / 1M
Output
$6.48 / 1M
Cache read
$0.144 / 1M
Cache write
— / 1M
Prices are in USD per million tokens. This page shows a public price snapshot. Before sending a request, check the Model Explorer for current prices. The console shows account-specific routes and charges.
How to compare prices · How to interpret performance metrics
Snapshot: . Availability reflects active probes over the past 24 hours; performance reflects actual calls.
API
Integration example
Use a Yomi API key that can access this model and route. Check the endpoint and request parameters when switching models or protocols.
Set the environment variable YOMI_API_KEY.
Quick start · Pricing and billing · Protocol reference · Chat Completions · Native Gemini API
# pip install openai
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.yomiapi.com/v1",
api_key=os.environ["YOMI_API_KEY"],
)
resp = client.chat.completions.create(
model="gemini-3.1-pro-preview",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)curl 'https://api.yomiapi.com/v1/chat/completions' \
-H "Authorization: Bearer $YOMI_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"model": "gemini-3.1-pro-preview",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'curl 'https://api.yomiapi.com/v1beta/models/gemini-3.1-pro-preview:generateContent' \
-H "x-goog-api-key: $YOMI_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello"
}
]
}
]
}'Connect to Gemini 3.1 Pro Preview now
Create an API key in the console and select an available route.
Get an API key
Yomi API