Claude Opus 5.5 is live on SeedRouter

Text

Gemini 3.1 Pro

View Markdown

Native Gemini requests, multimodal inputs, thinking, tools, caching and streaming. Includes model limits and verification status.

Use gemini-3.1-pro-preview with the native Gemini format. The model page includes the Playground and current prices; the model variant guide explains the two official IDs.

Model ID

Model IDInput limitDefault effort
gemini-3.1-pro-preview1,048,576 tokenshigh

Quick example

curl https://api.seedrouter.ai/v1beta/models/gemini-3.1-pro-preview:generateContent \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"role":"user","parts":[{"text":"Explain a mutex in one sentence."}]}],"generationConfig":{"thinkingConfig":{"thinkingLevel":"low"},"maxOutputTokens":1024}}'

The model belongs in the URL. contents is required. An answer includes native candidates, finishReason and usageMetadata; retain complete content parts, including thoughtSignature, for conversation history.

Endpoints

OperationEndpoint
JSON responsePOST /v1beta/models/gemini-3.1-pro-preview:generateContent
Server-sent eventsPOST /v1beta/models/gemini-3.1-pro-preview:streamGenerateContent?alt=sse

The OpenAPI specification includes every nested request and response schema. Optional fields use API defaults when omitted. SeedRouter forwards the submitted body without filtering unknown fields, removing unsupported fields or validating model parameter values. The Gemini API decides whether a request is accepted.

Request parameters

The URL fixes the model to gemini-3.1-pro-preview. The request contract contains 12 top-level fields. Fields are optional unless marked required; omission differs from JSON null. Nullable arbitrary JSON is preserved where the official schema permits it.

FieldTypeRequiredDefault and constraints
contentsobject[]YesNonempty conversation; each content has nonempty parts
systemInstructionobjectNoText-only parts; no automatic user identity is inserted
generationConfigobjectNoGeneration parameters in the next table
toolsobject[]NoFunction declarations and built-in tool configurations
toolConfigobjectNoFunction selection and retrieval configuration
safetySettingsobject[]NoOne setting per category; no duplicate categories
cachedContentstringNoExisting cachedContents/{id} resource; requires compatible access
serviceTierstringNounspecified, standard, flex, priority; ordinary processing is standard
labelsobjectNoString values; lowercase keys/values, maximum 63 Unicode codepoints each
modelstringNoOptional resource name; the URL determines the actual model
storebooleanNoGeneric request storage preference; model-specific effect unverified
continuationTokenstringNoGeneric opaque token; continuation is not an established 3.1 Pro capability

Generation parameters

Field in generationConfigTypeDefault and constraints
maxOutputTokensinteger1–65,536, including thinking; model default 65,536
thinkingConfigobjectthinkingLevel: low, medium, high (default high); uppercase spellings accepted. includeThoughts: boolean, default false. thinkingBudget: integer, mutually exclusive with thinkingLevel; no model-specific numeric range is established
temperaturenumber0–2; Google recommends the default 1.0
topPnumber0–1; omit to use the model default
topKintegerOptional; model-specific configurable range not established
candidateCountintegerExactly 1
stopSequencesstring[]Maximum five sequences
responseMimeTypestringDefault text/plain; legacy JSON schema output requires application/json
responseSchemaobjectOfficial schema dialect; mutually exclusive with responseJsonSchema
responseJsonSchemaJSONJSON Schema; mutually exclusive with responseSchema
responseFormatobjectText format configuration; text.mimeType and optional text.schema. Schema requires JSON MIME type
responseModalitiesstring[]Text only: TEXT; empty means text
mediaResolutionenumMEDIA_RESOLUTION_UNSPECIFIED, LOW, MEDIUM, HIGH with the MEDIA_RESOLUTION_ prefix
seedintegerSigned 32-bit value; model-specific deterministic behavior unverified
presencePenaltynumberGeneric field; model-specific effect/range unverified
frequencyPenaltynumberGeneric field; model-specific effect/range unverified
responseLogprobsbooleanGeneric field; model-specific availability unverified
logprobsinteger0–20; requires responseLogprobs: true; model support unverified
enableEnhancedCivicAnswersbooleanGeneric field; model support unverified
enableAffectiveDialogbooleanGeneric field; model support unverified
audioTranscriptionConfigobjectGeneric field; model-specific options unverified
translationConfigobjectGeneric field; model-specific options unverified

The OpenAPI document lists nested types, enums, required properties and documented bounds for every message. The schemas describe official parameters; they are not a SeedRouter request allowlist. Caller-supplied fields and values are preserved. A field accepted by the schema is not proof of support for every model or account. minimal thinking and Agentic Video processing are not supported by this model.

Structured output

{
  "contents": [{"parts": [{"text": "Return a JSON object with ok set to true."}]}],
  "generationConfig": {
    "thinkingConfig": {"thinkingLevel": "low"},
    "maxOutputTokens": 1024,
    "responseMimeType": "application/json",
    "responseJsonSchema": {
      "type": "object",
      "properties": {"ok": {"type": "boolean"}},
      "required": ["ok"]
    }
  }
}

The legacy responseSchema and responseJsonSchema fields cannot be used together. Both require responseMimeType: "application/json". The newer responseFormat.text schema must likewise specify JSON. Use REST enum spellings (APPLICATION_JSON and TEXT_PLAIN) in that message. Requests pass through unchanged; media MIME types and arbitrary function JSON are not rewritten.

Functions and built-in tools

Use tools[].functionDeclarations with a name and either parameters or parametersJsonSchema, not both. Response schemas follow the same mutual-exclusion rule. Function selection lives in toolConfig.functionCallingConfig; allowedFunctionNames requires ANY or VALIDATED and declared names.

The regular model supports function calling; the customtools variant is not required. Your application executes returned functions and supplies their results in the next conversation turn. Preserve each original thoughtSignature, function call and function response. Do not round numeric identifiers when serializing opaque function arguments.

Google lists Search, Maps, code execution and URL context as model capabilities. File Search is listed for AI Studio only. Existing cache and file-search resources require access under the credentials serving the request. Computer Use and native MCP configuration appear in the generic schema but their availability for this model is not established. The Playground does not execute your custom functions.

Multimodal input and safety

A contents[].parts[] item contains exactly one payload: text, inline media, a file reference, a function call/response, or an execution part. It may also carry a signature or media metadata. Input supports text, images, audio, video and PDFs; output is text only.

For inline bytes, use inlineData.mimeType and base64 data. For file references, use fileData.mimeType and fileUri. A syntactically valid URL is not proof the model can retrieve it. Video metadata can specify start/end offsets and a positive fps no greater than 24. Global and per-part media resolutions are distinct settings. Agentic Video is not supported.

Use native JSON for inline media, or an accessible file reference for larger media. Exact file-format, duration and per-request media limits remain subject to the official media documentation and live verification.

Safety settings use the official native format. Omission leaves the Gemini API defaults in effect; explicitly supplied settings pass through unchanged.

JSON responses and streaming

generateContent returns native JSON. streamGenerateContent?alt=sse emits native JSON in SSE data: events. Important fields include candidates[].content.parts, finishReason, safetyRatings, groundingMetadata, promptFeedback, modelVersion, responseId and usageMetadata.

Retain complete native content in conversation history. Thinking summaries are not the same as thought signatures. A disconnect does not prove generation failed or completed; inspect the partial result and account record before sending another request. Stream usage is cumulative, so use the latest counters instead of summing every chunk.

Unlike Argon, longer-output continuation has not been established for 3.1 Pro. Do not build a continuation loop merely because the generic response schema includes a token field.

Usage and pricing

promptTokenCount includes cached input. cachedContentTokenCount is charged at the cached-input rate, rather than charged again as uncached input. Billable output includes candidatesTokenCount plus thoughtsTokenCount. Reported tool-use prompt tokens also contribute to input.

The context threshold is 200,000 input tokens, including cached input; larger inputs use the long-context rates. Available account groups use the same model price expression and their own current multiplier. See the live pricing table.

Flex and Priority are separate processing tiers. Flex does not halve cached-input rates. A reported Standard result must not incur a Priority surcharge. If a requested Priority response does not establish its actual tier, this integration uses Standard token rates. Tool charges and explicit cache storage are separate from generation-token pricing; no shared free tool allowance is promised. Failed requests are not charged.

Multiple account groups

The model uses googlellm and googlellm-vertext, retaining their existing account permissions and pricing. The spelling of each group name is exact. Select an available group in the Playground, or use the optional API header:

X-SeedRouter-Group: googlellm

Use googlellm-vertext to select the second group. The chosen group determines the price and available capacity; an explicit selection does not silently switch to another group. Omit the header or use auto to keep the API key's default behavior.

Check your API key's available groups without generating a response:

curl "https://api.seedrouter.ai/api/seedrouter/llm/groups?model=gemini-3.1-pro-preview"   -H "Authorization: Bearer YOUR_SEEDROUTER_KEY"

Verification status

The controls and documentation follow the official native format. Parameter validation belongs to the Gemini API. Offline transport and billing checks do not establish production availability. Live generation, both account groups, media understanding, cached resources, built-in tools and processing tiers still require paid end-to-end verification. No comparative quality result is claimed for the Customtools variant.

References