google search

Official Documentation: https://ai.google.dev/gemini-api/docs/document-processing?hl=zh-cn

Endpoint

POST http://v98store.com/v1beta/models/gemini-2.5-flash:generateContent

cURL Command

curl -X POST 'http://v98store.com/v1beta/models/gemini-2.5-flash:generateContent' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -d '{ "contents": [ { "role": "user", "parts": [ { "text": "今天重庆天气如何?" } ] } ], "tools": [ { "googleSearch": {} } ] }'

Parameters

NameInDescriptionRequired
keyqueryYes
Content-TypeheaderYes

Request Body

Example

{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "今天重庆天气如何?"
        }
      ]
    }
  ],
  "tools": [
    {
      "googleSearch": {}
    }
  ]
}

Responses

200 -

Example

undefined