> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini 3.1 Pro Preview

> Google's Gemini 3.1 Pro Preview via Gemini API. Advanced reasoning with thinking mode.

Gemini 3.1 Pro Preview is Google's latest advanced language model, available through Anyfast via the native Gemini API. It excels at complex reasoning, coding, writing, and analysis with thinking capabilities.

## Key capabilities

* **Native Gemini API** — Uses Google's native API format for full feature access
* **Thinking mode** — Supports thinking configuration for enhanced reasoning
* **Multi-turn conversations** — Handles complex dialogue with system instructions
* **Safety settings** — Configurable content safety filters

## Quick example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://www.anyfast.ai/v1beta/models/gemini-3.1-pro-preview:generateContent?key=YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "contents": [
        {
          "role": "user",
          "parts": [{ "text": "Explain quantum computing in simple terms." }]
        }
      ],
      "generationConfig": {
        "temperature": 1,
        "topP": 1
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  url = "https://www.anyfast.ai/v1beta/models/gemini-3.1-pro-preview:generateContent"
  params = {"key": "YOUR_API_KEY"}
  data = {
      "contents": [
          {
              "role": "user",
              "parts": [{"text": "Explain quantum computing in simple terms."}]
          }
      ],
      "generationConfig": {
          "temperature": 1,
          "topP": 1
      }
  }

  response = requests.post(url, params=params, json=data)
  result = response.json()
  print(result["candidates"][0]["content"]["parts"][0]["text"])
  ```
</CodeGroup>

## Parameters

| Parameter                         | Type   | Required | Description                                |
| --------------------------------- | ------ | -------- | ------------------------------------------ |
| `key`                             | string | Yes      | API key (query parameter)                  |
| `contents`                        | array  | Yes      | Array of `{ role, parts }` objects         |
| `systemInstruction`               | object | No       | System instruction with `parts` array      |
| `generationConfig.temperature`    | float  | No       | `0`–`2`. Controls randomness. Default: `1` |
| `generationConfig.topP`           | float  | No       | Nucleus sampling threshold. Default: `1`   |
| `generationConfig.thinkingConfig` | object | No       | Thinking mode configuration                |

<Card title="API Reference" icon="code" href="/api-reference/model-api/google/gemini-3.1-pro-preview">
  View the interactive API playground for Gemini 3.1 Pro Preview.
</Card>

<script src="/feedback.js" />
