Gemini 3.1 Pro Preview

google/gemini-3.1-pro-preview

Gemini 3.1 Pro Preview is Google’s frontier reasoning entry, accepting text, image, file, audio and video input over a 1,048,576-token window. The Preview label reflects the publisher’s release stage, not a difference in how the API is called.

Input · Account credit
$2.00

per 1M tokens

Cash equivalent $0.20

Output · Account credit
$15.00

per 1M tokens

Cash equivalent $1.50

Context window
1,048,576

tokens · OpenRouter

Input → Output
Text · Image · File · Audio · Video→ Text
Model specifications
Sources reviewed: Y-API catalog snapshot:

Choosing this model

Selection advice by Y-API. The checks below are suggested evaluations, not published test results.

Where to start

Try it on software engineering and agentic tasks where the work spans several tools and the model has to keep a plan coherent across them, or on problems that mix code with diagrams and documents.

What to watch for

Preview status means behavior can change without a version bump, so a saved evaluation is tied to the date you ran it. Above 200,000 prompt tokens the listed rate doubles, which matters for large document workflows.

Model specifications

These are OpenRouter model-level specifications, not a Y-API compatibility test. A particular route may accept fewer input formats, parameters or tokens. Verify the features you need with a small request; a successful text response does not validate vision or tool calling.

Context window
1,048,576 tokens
Input
Text · Image · File · Audio · Video
Output
Text
Listed on OpenRouter
Parameters listed by OpenRouter
include_reasoningmax_tokensreasoningreasoning_effortresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_p
OpenRouter model page & specifications

API pricing & cost estimate

Estimated credit consumed
$9.50
Estimated cash equivalent
$0.95

Illustrative token budget, not measured usage or a quote. Includes input and output; excludes separate media charges, cache discounts and retries. Include billed reasoning tokens in your output budget where applicable. Actual billing follows usage returned by the service.

$1 paid adds $10 of credit. Cash equivalent = credit consumed ÷ 10; this is not the model publisher’s list price.

Same token budget, different models
ModelEstimated credit consumedEstimated cash equivalent
Gemini 3.1 Pro Preview$9.50$0.95
Gemini 3.8 Flash$5.25$0.525
Claude Opus 5$17.50$1.75
View LLM API pricing & billing

API integration examples

These minimal, text-only requests use the exact Y-API model ID. They do not demonstrate image, audio, video, file or tool support. The output limit also needs room for reasoning; an empty answer with finish_reason=length can mean the budget was exhausted.

A task to try

Here is a failing build log and the configuration files it reads. Identify which setting is responsible and what you would change, citing the specific line.

Set the TOKEN environment variable to a key from your console. Run this on your server or locally; never expose a key in browser code or a public repository.

cURL · Gemini 3.1 Pro Preview
curl --fail-with-body --silent --show-error --max-time 120 \
  'https://api.y-api.bestvirtualgoods.com/v1/chat/completions' \
  -H "Authorization: Bearer ${TOKEN:?Set TOKEN first}" \
  -H 'Content-Type: application/json' \
  --data-binary @- <<'JSON'
{
  "model": "google/gemini-3.1-pro-preview",
  "messages": [
    {
      "role": "user",
      "content": "Here is a failing build log and the configuration files it reads. Identify which setting is responsible and what you would change, citing the specific line."
    }
  ],
  "max_tokens": 4096
}
JSON

How to evaluate the result

The answer should name a specific configuration key and predict the resulting behavior change. Confirm by applying the change in a scratch environment rather than trusting the explanation alone.

Before you choose

What does Preview mean for production use?

It marks a release stage chosen by the publisher, not a gateway restriction — the ID is callable like any other. Treat it as a signal to keep a fallback model configured and to re-run evaluations periodically.

Sources & scope

Technical facts come from the cited model page and, where available, its linked publisher card. A card describes that checkpoint; it is not proof of the weights a gateway serves. Prices come only from the Y-API catalog. We do not claim measured latency, uptime or benchmark scores for this endpoint.