> ## 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 2.5 Flash

> Google's Gemini 2.5 Flash with Google Search grounding via Gemini API.

Gemini 2.5 Flash is Google's fast and efficient model with Google Search integration, available through Anyfast via the native Gemini API. It can ground responses with real-time search results.

## Key capabilities

* **Google Search grounding** — Enhance responses with real-time web search
* **Document processing** — Process and analyze documents
* **Multi-modal input** — Accept text and file inputs
* **Fast inference** — Optimized for speed and efficiency

## Quick example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://www.anyfast.ai/v1beta/models/gemini-2.5-flash:generateContent?key=YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "contents": [
        {
          "role": "user",
          "parts": [{ "text": "What is the latest news about AI?" }]
        }
      ],
      "tools": [{ "googleSearch": {} }]
    }'
  ```

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

  url = "https://www.anyfast.ai/v1beta/models/gemini-2.5-flash:generateContent"
  params = {"key": "YOUR_API_KEY"}
  data = {
      "contents": [
          {
              "role": "user",
              "parts": [{"text": "What is the latest news about AI?"}]
          }
      ],
      "tools": [{"googleSearch": {}}]
  }

  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                |
| `tools`    | array  | No       | Include `{ "googleSearch": {} }` to enable search |

<Card title="API Reference" icon="code" href="/api-reference/model-api/google/gemini-2-5-flash">
  View the interactive API playground for Gemini 2.5 Flash.
</Card>

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