> [!WARNING]
> **Preview**
>
>
> This product or feature is a Generative AI Preview offering, subject to the
> "Pre-GA Offerings Terms" of the
> [Google Cloud Service Specific Terms](https://cloud.google.com/terms/service-terms). For this Generative AI Preview
> offering, Customers may elect to use it for production or commercial
> purposes, or disclose Generated Output to third-parties, and may process
> personal data as outlined in the
> [Cloud Data Processing Addendum](https://cloud.google.com/terms/data-processing-addendum), subject to the obligations and
> restrictions described in the agreement under which you access Google
> Cloud.

<br />

Gemini 3.1 Pro is our most advanced reasoning Gemini model,
capable of solving complex problems. Gemini 3.1 Pro can comprehend vast
datasets and challenging problems from different information sources, including
text, audio, images, video, PDFs, and even entire code repositories with its 1M
token context window.

For more information on using the latest Gemini models, see
[Get started with Gemini 3](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/start/get-started-with-gemini-3.md.txt).

## Quality improvements

Gemini 3.1 Pro includes several quality improvements:

- **Improved SWE and agentic capabilities**: Improved software engineering behavior and usability, with agentic improvements in domains like finance and spreadsheet applications.
- **Improved token efficiency and thinking**: More efficient thinking across various use cases.
- **Expanded thinking levels** : Introduces `MEDIUM` as a `thinking_level` parameter for more options to optimize trade-offs between cost, performance, and speed.

## Custom tools endpoint

For those building with a mix of bash and custom tools, Gemini 3.1 Pro
supports an additional endpoint: `gemini-3.1-pro-preview-customtools`.
This endpoint is better at prioritizing custom tools (such as `view_file` or
`search_code`). As `gemini-3.1-pro-preview-customtools` is optimized for
agentic workflows that use custom tools and bash, you may see quality
fluctuations in some use cases which don't benefit from such tools.

Pricing for `gemini-3.1-pro-preview-customtools` is identical to
Gemini 3.1 Pro. Provisioned Throughput (PT) isn't
supported on `gemini-3.1-pro-preview-customtools`, and multimodal requests on
`gemini-3.1-pro-preview-customtools` enforce legacy input limits (up to 30 MiB
per image and 10 HTTP or HTTPS image URLs, 50 MiB and 1,000 pages per PDF,
7 MiB per plain-text file, and 1 HTTP or HTTPS audio or video URL per request).


[Try in Agent Studio](https://console.cloud.google.com/agent-platform/studio/multimodal?model=gemini-3.1-pro-preview)
[View in Model Garden](https://console.cloud.google.com/agent-platform/publishers/google/model-garden/gemini-3.1-pro-preview)
[Deploy example app](https://console.cloud.google.com/agent-platform/studio/multimodal?suggestedPrompt=How+does+AI+work&deploy=true&model=gemini-3.1-pro-preview)

[Pricing](https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing)
Note: "Deploy example app" requires a Google Cloud project with billing and Agent Platform API enabled.

| Model ID | `gemini-3.1-pro-preview` ||
| Modalities | Text Input and output Image Input only Audio Input only Video Input only ||
| Token limits | Context window | 1,048,576 |
| Token limits | Maximum output tokens | 65,536 |
| Capabilities | - [Thinking](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/thinking.md.txt) Supported - [System instructions](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/prompts/system-instruction-introduction.md.txt) Supported - [Structured output](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/control-generated-output.md.txt) Supported - [Context caching](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/context-cache/context-cache-overview.md.txt) Implicit context caching, explicit context caching Supported - [RAG Engine](https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/rag-engine/rag-overview.md.txt) Supported - [Tuning](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tuning.md.txt) Not supported - [Agentic video understanding](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/video-understanding.md.txt#agentic-video-processing) Not supported ||
| Tools | - [Grounding](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/grounding/overview.md.txt) Google Search, Parallel Web Search, Exa Web Search Supported - [Code execution](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tools/code-execution.md.txt) Supported - [Function calling](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tools/function-calling.md.txt) Supported - [URL context](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/url-context.md.txt) Supported - [Computer use](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/computer-use.md.txt) Not supported ||
| APIs | - [GenerateContent API](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/models/inference.md.txt) Supported - [Interactions API](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/interactions.md.txt) Supported - [Gemini Live API](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/live-api.md.txt) Not supported - [Count Tokens API](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/get-token-count.md.txt) Supported - [Chat Completions API](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/migrate/openai/overview.md.txt) Supported ||
| Consumption options | - [Provisioned Throughput](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/provisioned-throughput.md.txt) Supported - [Batch inference](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/batch-inference.md.txt) Supported - [Pay-as-you-go](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/deploy/consumption-options.md.txt) Standard PayGo, Flex PayGo, Priority PayGo Supported - [Fixed quota](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/quotas.md.txt) Not supported ||
| Input size limit | - GenerateContent API: 500 MiB compressed - Interactions API: 256 MiB compressed (synchronous or streaming); 9.75 MiB uncompressed (deferred, when background and store are true) ||
| Interactions API URI limit | Up to 100 distinct Cloud Storage (`gs://`) URIs per request across all modalities on the [Interactions API](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/interactions.md.txt), including URIs carried forward from earlier turns using `previous_interaction_id`. `generateContent` supports `gs://` URIs up to the per-modality model item limits (up to 6,500 combined multimodal files when including plain-text files). ||
| Technical specifications | **Image** | - Maximum images per prompt: 3,000 (images and PDFs combined) - Maximum inline part size (GenerateContent API): 256 MB - Maximum file size per file from Cloud Storage: 2 GiB minus 500 KiB - Maximum file size per file from public HTTP or HTTPS URLs: 15 MiB - Maximum file size per file for direct local uploads in the console: 7 MiB inline (up to 50 MiB staged to Cloud Storage) - Maximum file size per file for Google Drive imports in the console: 7 MB (10 MB total) - Default resolution tokens: 1,120 - Supported MIME types: `image/png`, `image/jpeg`, `image/webp`, `image/heic`, `image/heif` |
| Technical specifications |
| Technical specifications |
| Technical specifications |
| Technical specifications |
|---|---|---|
| **Text** | - Maximum number of files per prompt: 3,000 PDFs (shared with images; up to 6,500 total files when including plain text) - Maximum number of pages per file: 3,000 - Maximum inline part size (GenerateContent API): 256 MB - Maximum file size per file from Cloud Storage: 2 GiB minus 500 KiB - Maximum file size per file from public HTTP or HTTPS URLs: 15 MiB - Maximum file size per file for direct local uploads in the console: 7 MiB inline (up to 50 MiB staged to Cloud Storage) - Maximum file size per file for Google Drive imports in the console: 7 MB (10 MB total) - Default resolution tokens: 560 - OCR for scanned PDFs: Not used by default - Supported MIME types: `application/pdf`, `text/plain` |
| **Video** | - Maximum video length (with audio): Approximately 45 minutes - Maximum video length (without audio): Approximately 1 hour - Maximum number of videos per prompt: 10 - Maximum inline part size (GenerateContent API): 256 MB - Maximum file size per file from Cloud Storage: 2 GiB minus 500 KiB - Maximum file size per file from public HTTP or HTTPS URLs: 15 MiB - Default resolution tokens per frame: 70 - Supported MIME types: `video/x-flv`, `video/quicktime`, `video/mpeg`, `video/mpegs`, `video/mpg`, `video/mp4`, `video/webm`, `video/wmv`, `video/3gpp` |
| **Audio** | - Maximum audio length per prompt: Approximately 8.4 hours, or up to 1 million tokens - Maximum number of audio files per prompt: 1,000 - Maximum inline part size (GenerateContent API): 256 MB - Maximum file size per file from Cloud Storage: 2 GiB minus 500 KiB - Maximum file size per file from public HTTP or HTTPS URLs: 15 MiB - Speech understanding for: Audio summarization, transcription, and translation - Supported MIME types: `audio/x-aac`, `audio/flac`, `audio/mp3`, `audio/m4a`, `audio/mpeg`, `audio/mpga`, `audio/mp4`, `audio/ogg`, `audio/pcm`, `audio/wav`, `audio/webm` |
| **Parameter defaults** | - Temperature: 0.0-2.0 (default 1.0) - topP: 0.0-1.0 (default 0.95) - topK: 64 (fixed) - candidateCount: 1--8 (default 1) |

^\*^ Provisioned Throughput (PT) isn't supported for this endpoint, and legacy multimodal file size, page, and HTTP or HTTPS URL limits apply (see [Custom tools endpoint](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/3-1-pro.md.txt#custom-tools-endpoint)).

<br />