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

# Gemini-2.5-Flash-Nothinking - Web Search

> Rapid gemini 2.5 flash nothinking web search. Straightforward internet access for quick facts and up-to-date information.

## Authentication

1. Sign up for a GPTProto account at [https://gptproto.com](https://gptproto.com)
2. Navigate to the API Keys section in your dashboard
3. Generate a new API key (sk-xxxxx)
4. Copy and securely store your API key
   For authentication details, please refer to the [Authentication](https://docs.gptproto.com/authentication) section.

## Initiate Request

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://gptproto.com/v1beta/models/gemini-2.5-flash-nothinking:generateContent' \
  --header 'Authorization: GPTPROTO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "text": "Who won the euro 2024?"
          }
        ]
      }
    ],
    "tools": [
      {
        "google_search": {}
      }
    ],
    "generationConfig": {
      "thinkingConfig": {
        "includeThoughts": true,
        "thinkingBudget": 1000
      }
    }
  }'

  ```

  ```javascript JavaScript theme={null}
  const axios = require('axios');
  let data = JSON.stringify({
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "text": "Who won the euro 2024?"
          }
        ]
      }
    ],
    "tools": [
      {
        "google_search": {}
      }
    ],
    "generationConfig": {
      "thinkingConfig": {
        "includeThoughts": true,
        "thinkingBudget": 1000
      }
    }
  });

  let config = {
    method: 'post',
    maxBodyLength: Infinity,
    url: 'https://gptproto.com/v1beta/models/gemini-2.5-flash-nothinking:generateContent',
    headers: { 
      'Authorization': 'GPTPROTO_API_KEY', 
      'Content-Type': 'application/json'
    },
    data : data
  };

  axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });


  ```

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

  url = "https://gptproto.com/v1beta/models/gemini-2.5-flash-nothinking:generateContent"

  payload = json.dumps({
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "text": "Who won the euro 2024?"
          }
        ]
      }
    ],
    "tools": [
      {
        "google_search": {}
      }
    ],
    "generationConfig": {
      "thinkingConfig": {
        "includeThoughts": True,
        "thinkingBudget": 1000
      }
    }
  })
  headers = {
    'Authorization': 'GPTPROTO_API_KEY',
    'Content-Type': 'application/json'
  }

  response = requests.request("POST", url, headers=headers, data=payload)

  print(response.text)


  ```

  ```go Go theme={null}
  package main

  import (
    "fmt"
    "strings"
    "net/http"
    "io"
  )

  func main() {

    url := "https://gptproto.com/v1beta/models/gemini-2.5-flash-nothinking:generateContent"
    method := "POST"

    payload := strings.NewReader(`{
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "text": "Who won the euro 2024?"
          }
        ]
      }
    ],
    "tools": [
      {
        "google_search": {}
      }
    ],
    "generationConfig": {
      "thinkingConfig": {
        "includeThoughts": true,
        "thinkingBudget": 1000
      }
    }
  }`)

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
      fmt.Println(err)
      return
    }
    req.Header.Add("Authorization", "GPTPROTO_API_KEY")
    req.Header.Add("Content-Type", "application/json")

    res, err := client.Do(req)
    if err != nil {
      fmt.Println(err)
      return
    }
    defer res.Body.Close()

    body, err := io.ReadAll(res.Body)
    if err != nil {
      fmt.Println(err)
      return
    }
    fmt.Println(string(body))
  }

  ```
</CodeGroup>

<Accordion title="Response Example">
  ```json theme={null}
  {
      "candidates": [
          {
              "content": {
                  "role": "model",
                  "parts": [
                      {
                          "text": "This image depicts a cozy, serene indoor scene, likely generated by AI or created as digital art, characterized by warm lighting and a peaceful atmosphere. Here are the key elements shown:\n\n**The Subject:**\n*   **The Cat:** The central focus is a fluffy, orange (ginger) tabby cat sitting upright on a wooden window sill. The cat has striking green eyes, long white whiskers, and a very bushy tail that curls slightly over the edge of the sill. It is looking forward with a calm expression.\n\n**The Setting:**\n*   **Window:** The cat is positioned in front of a large window with a wooden frame. Through the glass, you can see large trees with green foliage, suggesting a garden or park outside. The background is blurred (bokeh effect), keeping the focus on the interior.\n*   **Lighting:** Soft, golden sunlight is streaming in from the left, illuminating the cat's fur and creating a halo effect. There are visible dust motes or magical sparkles floating in the sunbeams, adding to the dreamy quality.\n\n**Surrounding Objects:**\n*   **Book:** To the left of the cat on the window sill, there is a thick, closed book lying flat.\n*   **Tea:** In the lower right corner, sitting on a small round wooden side table, is a teacup on a saucer. Steam is rising from the cup, indicating a hot beverage. A tea bag tag hangs over the side.\n*   **Interior Details:** On the right side of the image, there is a dark wooden bookshelf filled with books. Partially visible is a brown leather armchair with a chunky, cream-colored knit blanket draped over it, enhancing the \"hygge\" or cozy feel.\n*   **Wall Art:** A framed picture hangs on the wall near the bookshelf, though the image inside the frame is indistinct.\n\nOverall, the image conveys a sense of comfort, quiet contemplation, and the warmth of a relaxing afternoon.",
                          "thoughtSignature": "Cv0oAY89a19fZ/pV0io*****"
                      }
                  ]
              },
              "finishReason": "STOP"
          }
      ],
      "usageMetadata": {
          "promptTokenCount": 1097,
          "candidatesTokenCount": 403,
          "totalTokenCount": 2779,
          "trafficType": "ON_DEMAND",
          "promptTokensDetails": [
              {
                  "modality": "IMAGE",
                  "tokenCount": 1089
              },
              {
                  "modality": "TEXT",
                  "tokenCount": 8
              }
          ],
          "candidatesTokensDetails": [
              {
                  "modality": "TEXT",
                  "tokenCount": 403
              }
          ],
          "thoughtsTokenCount": 1279
      },
      "modelVersion": "gemini-2.5-pro",
      "createTime": "2025-12-22T13:20:13.753813Z",
      "responseId": "jUVJaZWBLvzN998P1tDo4Q0"
  }
  ```
</Accordion>

## Parameters

### Path Parameters

Endpoint: `https://gptproto.com/v1beta/models/{model}:{method}`

<Note>Google Gemini API provides two methods for content generation, distinguished by whether they return responses incrementally (streaming) or all at once (non-streaming).</Note>

| Method                  | Example                                                                   | Description                                                                                                                            |
| ----------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `generateContent`       | `https://gptproto.com/v1beta/models/gemini-2.5-pro:generateContent`       | Generates a complete response all at once. Best for applications where you need the full response before processing.                   |
| `streamGenerateContent` | `https://gptproto.com/v1beta/models/gemini-2.5-pro:streamGenerateContent` | Streams the response incrementally as it's generated. Ideal for chat interfaces and real-time applications where latency is important. |

### Core Parameters

| Parameter               | Type   | Required | Default | Range               | Description                                                                                                                                                                                                  |
| ----------------------- | ------ | -------- | ------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `contents`              | array  | ✅ Yes    | -       | -                   | Content of the current conversation with the model. For single-turn queries, this contains one instance. For multi-turn queries (e.g., chat), this contains the conversation history and the latest request. |
| >`contents.role`        | string | ✅ Yes    | -       | `user`<br />`model` | The role of the message sender.                                                                                                                                                                              |
| >`contents.parts`       | array  | ✅ Yes    | -       | -                   | The content parts of the message, which can contain different types of content (text, inlineData, etc.).                                                                                                     |
| >>`contents.parts.text` | string | ✅ Yes    | -       | -                   | Text content of the part. For multimodal input details, see [Multimodal Input](#multimodal-input).                                                                                                           |

### Advanced Parameters

| Parameter                           | Type    | Required | Default | Range                                                                                                                  | Description                                                                                                                                                                                              |
| ----------------------------------- | ------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tools`                             | array   | ❌ No     | -       | -                                                                                                                      | List of tools the model may use to generate the next response. Supported tools include Function and codeExecution.                                                                                       |
| `toolConfig`                        | object  | ❌ No     | -       | -                                                                                                                      | Configuration for any tools specified in the request.                                                                                                                                                    |
| `safetySettings`                    | array   | ❌ No     | -       | -                                                                                                                      | List of unique SafetySetting instances for filtering unsafe content. Each SafetyCategory should have at most one setting. see [SafetySetting](#safetySetting)                                            |
| `generationConfig`                  | object  | ❌ No     | -       | -                                                                                                                      | Configuration options for content generation.                                                                                                                                                            |
| >`generationConfig.temperature`     | number  | ❌ No     | -       | 0.0-1.0                                                                                                                | Controls the randomness of the output. Lower values produce more deterministic results.                                                                                                                  |
| >`generationConfig.topP`            | number  | ❌ No     | -       | 0.0-1.0                                                                                                                | Nucleus sampling probability threshold.                                                                                                                                                                  |
| >`generationConfig.topK`            | integer | ❌ No     | -       | -                                                                                                                      | Top-k sampling parameter.                                                                                                                                                                                |
| >`generationConfig.maxOutputTokens` | integer | ❌ No     | -       | -                                                                                                                      | Maximum number of tokens to generate.                                                                                                                                                                    |
| >`generationConfig.thinkingConfig`  | object  | ❌ No     | -       | -                                                                                                                      | Configuration for thinking functionality. If set for models that don't support thinking, the system will return an error. See [Thinking Config](#thinking-config) for details.                           |
| >`generationConfig.imageConfig`     | object  | ❌ No     | -       | -                                                                                                                      | Configuration for image generation. If set for models that don't support these configuration options, the system will return an error. See [Image Config](#image-config) for details.                    |
| >`generationConfig.mediaResolution` | enum    | ❌ No     | -       | `MEDIA_RESOLUTION_UNSPECIFIED`<br />`MEDIA_RESOLUTION_LOW`<br />`MEDIA_RESOLUTION_MEDIUM`<br />`MEDIA_RESOLUTION_HIGH` | If specified, uses the specified media resolution. <br /> **Note:** This field describes the resolution of input media. To control the resolution of output images, use the `imageConfig` field instead. |

### Multimodal Input

<CodeGroup>
  ```json inlineData with image theme={null}
  {
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "inlineData": {
              "mimeType": "image/jpeg",
              "data": "base64-encoded-image-data"
            }
          },
          {
            "text": "Describe this image."
          }
        ]
      }
    ]
  }
  ```

  ```json inlineData with PDF theme={null}
  {
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "inlineData": {
              "mimeType": "application/pdf",
              "data": "base64-encoded-pdf-data"
            }
          },
          {
            "text": "Summarize the content of this PDF document."
          }
        ]
      }
    ]
  }
  ```

  ```json fileData with image theme={null}
  {
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "fileData": {
              "mimeType": "image/jpeg",
              "fileUri": "https://example.com/image.jpg"
            }
          },
          {
            "text": "What is shown in this JPEG image?"
          }
        ]
      }
    ]
  }
  ```

  ```json fileData with PDF theme={null}
  {
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "fileData": {
              "mimeType": "application/pdf",
              "fileUri": "https://example.com/file.pdf"
            }
          },
          {
            "text": "Extract key information from this PDF file."
          }
        ]
      }
    ]
  }
  ```
</CodeGroup>

| parameter                              | Type   | Required                        | Default | Range / Example                          | Description                                                                                                                  |   |
| -------------------------------------- | ------ | ------------------------------- | ------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | - |
| `contents.parts`                       | array  | ✅ Yes                           | —       | `text`<br />`inlineData`<br />`fileData` | The content parts of the message, which can contain different types of content .                                             |   |
| >`contents.parts.inlineData`           | object | ❌ No                            | -       | -                                        | Inline media content. If used, `data` must be base64-encoded.                                                                |   |
| >>`contents.parts.inlineData.mimeType` | string | ✅ Yes (if inline\_data is used) | -       | `application/pdf`<br />`image/jpeg`      | The IANA-standard MIME type of the source data. If the provided MIME type is not supported, the system will return an error. |   |
| >>`contents.parts.inlineData.data`     | string | ✅ Yes (if inline\_data is used) | -       | -                                        | Base64-encoded media data.                                                                                                   |   |
| >`contents.parts.fileData`             | object | ❌ No                            | -       | -                                        | File media content. If used, `fileUri` must be provided.                                                                     |   |
| >>`contents.parts.fileData.mimeType`   | string | ✅ Yes (if file\_data is used)   | -       | `application/pdf`<br />`image/jpeg`      | The IANA-standard MIME type of the source data. If the provided MIME type is not supported, the system will return an error. |   |
| >>`contents.parts.fileData.fileUri`    | string | ✅ Yes (if file\_data is used)   | -       | -                                        | The URI of the file to be processed.                                                                                         |   |

### Safety Settings

<CodeGroup>
  ```json Safety settings theme={null}
  {
    "safetySettings": [
      {
        "category": "HARM_CATEGORY_HATE_SPEECH",
        "threshold": "BLOCK_MEDIUM_AND_ABOVE"
      },
      {
        "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
        "threshold": "BLOCK_HIGH_AND_ABOVE"
      }
    ]
  }
  ```
</CodeGroup>

| parameter   | Type   | Required | Default | Range / Example                                                                                                                                                                | Description                                       |
| ----------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- |
| `category`  | string | ✅ Yes    | -       | `HARM_CATEGORY_HATE_SPEECH`<br />`HARM_CATEGORY_SEXUALLY_EXPLICIT`<br />`HARM_CATEGORY_DANGEROUS_CONTENT`<br />`HARM_CATEGORY_HARASSMENT`<br />`HARM_CATEGORY_CIVIC_INTEGRITY` | The harm category to apply the safety setting to. |
| `threshold` | string | ✅ Yes    | -       | `BLOCK_ONLY_HIGH`<br />`BLOCK_MEDIUM_AND_ABOVE`<br />`BLOCK_LOW_AND_ABOVE`<br />`BLOCK_NONE`                                                                                   | The threshold for blocking content.               |

### Generation Config

<CodeGroup>
  ```json Generation configuration theme={null}
  {
    "generationConfig": {
      "temperature": 0.7,
      "topP": 0.95,
      "topk": 40,
      "maxOutputTokens": 1024,
      "stopSequences": ["Human:"],
      "response_mimeType": "text/plain"
    }
  }
  ```
</CodeGroup>

| parameter          | Type    | Required | Default | Range / Example                      | Description                            |
| ------------------ | ------- | -------- | ------- | ------------------------------------ | -------------------------------------- |
| `temperature`      | number  | ❌ No     | -       | 0.0-1.0                              | Controls the randomness of the output. |
| `topP`             | number  | ❌ No     | -       | 0.0-1.0                              | Nucleus sampling threshold.            |
| `topk`             | integer | ❌ No     | -       | -                                    | Top-k sampling parameter.              |
| `maxOutputTokens`  | integer | ❌ No     | -       | -                                    | Maximum number of tokens to generate.  |
| `stopSequences`    | array   | ❌ No     | -       | -                                    | Sequences at which to stop generation. |
| `responseMimeType` | string  | ❌ No     | -       | `text/plain`<br />`application/json` | MIME type of the response.             |

### Thinking Config

<CodeGroup>
  ```json Thinking configuration gemini-2* theme={null}
  {
    "generationConfig": {
      "thinkingConfig": {
        "includeThoughts": true,
        "thinkingBudget": 1000
      }
    }
  }
  ```

  ```json Thinking configuration gemini-3* theme={null}
  {
    "generationConfig": {
      "thinkingConfig": {
        "includeThoughts": true,
        "thinkingLevel": "HIGH"
      }
    }
  }
  ```
</CodeGroup>

> **Note:** `thinking_level` is only supported on Gemini 3.0 and above. It cannot be used together with `thinking_budget`; doing so will return an error.

| parameter                         | Type    | Required | Default | Range / Example                                | Description                                                                                                                                                                                                                      |
| --------------------------------- | ------- | -------- | ------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `thinkingConfig`                  | object  | ❌ No     | -       | -                                              | Configuration for thinking functionality.                                                                                                                                                                                        |
| >`thinkingConfig.includeThoughts` | boolean | ❌ No     | -       | -                                              | Indicates whether to include thoughts in the response. If true, thoughts are only returned when thinking is enabled.                                                                                                             |
| >`thinkingConfig.thinkingBudget`  | integer | ❌ No     | -       | 0-24576                                        | Specifies the maximum number of tokens for generated thoughts.                                                                                                                                                                   |
| >`thinkingConfig.thinkingLevel`   | enum    | ❌ No     | `high`  | `low`<br />`high`<br />`medium`<br />`minimal` | Controls the maximum depth of the model's internal reasoning process before generating a response. If not specified, the default is HIGH. Recommended for Gemini 3 or newer models. Using it with older models may cause errors. |

### Image Config

<CodeGroup>
  ```json Image configuration theme={null}
  {
    "generationConfig": {
      "imageConfig": {
        "aspectRatio": "1:1",
        "imageSize": "1k"
      }
    }
  }
  ```
</CodeGroup>

| parameter                  | Type   | Required | Default | Range / Example                                                                       | Description                                                                                                                               |
| -------------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `imageConfig`              | object | ❌ No     | -       | -                                                                                     | Configuration for image generation.                                                                                                       |
| >`imageConfig.aspectRatio` | string | ❌ No     | -       | `1:1`<br />`2:3`<br />`3:2`<br />`3:4`<br />`4:3`<br />`9:16`<br />`16:9`<br />`21:9` | Aspect ratio of the generated image. If not specified, the model will select the appropriate aspect ratio based on the specified content. |
| >`imageConfig.imageSize`   | string | ❌ No     | -       | `1k`<br />`2k`<br />`4k`                                                              | Approximate size of the generated image. If not specified, the model will use the default value of 1k.                                    |

### Web Search

Web Search Grounding allows Gemini models to connect with real-time web content, providing more accurate answers with verifiable sources.

#### Basic Usage

<CodeGroup>
  ```json Web Search theme={null}
  {
    "tools": [
      {
        "google_search": {}
      }
    ]
  }
  ```

  ```json Web Search with Time Range Filter theme={null}
  {
    "tools": [
      {
        "google_search": {
          "timeRangeFilter": {
            "startTime": "2024-01-01T00:00:00Z",
            "endTime": "2024-01-01T12:00:00Z"
          }
        }
      }
    ]
  }
  ```
</CodeGroup>

| Parameter                                         | Type   | Required | Default | Range / Example                     | Description                                                                                                                        |
| ------------------------------------------------- | ------ | -------- | ------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `tools`                                           | array  | ❌ No     | -       | -                                   | Array of tools to use for the request.                                                                                             |
| >`tools.googleSearch`                             | object | ❌ No     | -       | -                                   | Configuration for Google Search Grounding.                                                                                         |
| >>`tools.googleSearch.timeRangeFilter`            | object | ❌ No     | -       | -                                   | Optional time range filter for the search.                                                                                         |
| >>>`tools.googleSearch.timeRangeFilter.startTime` | string | ❌ No     | -       | `2024-01-01T00:00:00Z` or timestamp | Optional start time for the search in ISO 8601 format or timestamp.                                                                |
| >>>`tools.googleSearch.timeRangeFilter.endTime`   | string | ❌ No     | -       | `2024-01-01T00:00:00Z` or timestamp | Optional end time for the search in ISO 8601 format or timestamp. Note: For Gemini 3 models, the time span cannot exceed 24 hours. |

## Error Codes

### Common Error Codes

| Error Code | Error Name               | Description                                                                                                       |
| ---------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| 401        | Unauthorized             | API key is missing or invalid                                                                                     |
| 403        | Forbidden                | Your API key doesn't have permission to access this resource, or insufficient balance for the requested operation |
| 429        | Too Many Requests        | You've exceeded your rate limit                                                                                   |
| 500        | Internal server error    | An internal server error occurred                                                                                 |
| 503        | Content policy violation | Content blocked due to safety concerns (actual status code is 400)                                                |
