gemini-3.1-pro-preview

Input price
$1.80/1M tokens
Output price
$10.80/1M tokens
Context window
1M
Modalities
Text · Image · Audio · Video · PDF → Text

Pricing

API call price10% OFF

Input

$1.80

Output

$10.80

Cache write

—

Cache read

$0.18

All prices are per million tokens and already include the discount shown above.

These public prices exclude group discounts. Your billed price may be lower based on your group.



Integration & capabilities

Supported protocols

Gemini API
Compatible formatGoogle Gemini
Routes
POST /v1beta/models/{model}:{action}
FeaturesStreaming · Reasoning · Prompt caching
Request parameterscontents, systemInstruction, tools, generationConfig

cURL Example

curl -X POST "https://api.openmodel.ai/v1beta/models/gemini-3.1-pro-preview:generateContent?key=$API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {"role": "user", "parts": [{"text": "Hello"}]}
    ]
  }'

Supported capabilities

Function Calling
Function calling (also known as tool calling) provides a powerful and flexible way for models to interface with external systems and access data outside their training data.
Tool Choice
By default the model will determine when and how many tools to use. You can force specific behavior with the tool_choice parameter.
Structured Outputs
Ensures the model will always generate responses that adhere to your supplied JSON Schema.
Streaming
Lets you start printing or processing the beginning of the model's output while it continues generating the full response.
System Messages
You can guide the behavior of the model with system instructions.
Reasoning
Reasoning models use internal reasoning tokens before producing a response.
Prompt Caching
Optimizes API usage by allowing resuming from specific prefixes in your prompts. This significantly reduces processing time and costs for repetitive tasks or prompts with consistent elements.
Vision
Models can process image inputs and analyze them — a capability known as vision.
Audio Input
Analyzes audio input and generates text responses.
Video Input
Processes videos, enabling many frontier developer use cases that would have historically required domain specific models.
PDF Input
Ask the model about any text, pictures, charts, and tables in PDFs you provide.
URL Context
Lets you provide additional context to the model in the form of URLs; the model accesses content from those pages to inform and enhance its response.
Web Search
Allows models to access up-to-date information from the internet and provide answers with sourced citations.
Service Tier
Flex processing provides lower costs in exchange for slower response times; Priority processing delivers significantly lower and more consistent latency.

Context & limits

Context window

1M

Max output tokens

65.5K

Max audio length (hours)

8.4h

Max images per prompt

3000