Skip to content

URL context [Native Format]

POST https://www.kkiai.com/v1beta/models/gemini-2.5-flash:generateContent

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

Request Parameters

Authorization

Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.

Example: Authorization: Bearer ********************

Query Parameters

ParameterTypeRequiredDescriptionExample
keystringRequired{{YOUR_API_KEY}}

Header Parameters

ParameterTypeRequiredDescriptionExample
Content-TypestringRequiredapplication/json

Body Parameters (application/json)

ParameterTypeRequiredDescription
contentsarray[object]Required
  └ partsarray[object]Optional

Request Example

json
{
      "contents": [
          {
               "role": "user",
              "parts": [
                  {"text": "https://www.freqtrade.io/en/stable/   Explain the content of this website"}
              ]
          }
      ],
      "tools": [
          {
              "urlContext": {}
          }
      ]
  }

cURL Example

bash
curl --location -g --request POST 'https://www.kkiai.com/v1beta/models/gemini-2.5-flash:generateContent?key=' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
      "contents": [
          {
               "role": "user",
              "parts": [
                  {"text": "https://www.freqtrade.io/en/stable/   Explain the content of this website"}
              ]
          }
      ],
      "tools": [
          {
              "urlContext": {}
          }
      ]
  }'

Response

🟢 200 Success

Response Example

json
{}