Skip to content

Text Generation gemini-3-pro-preview:generateContent

POST https://www.kkiai.com/v1beta/models/gemini-3-pro-preview:generateContent

Official Documentation: https://ai.google.dev/gemini-api/docs/text-generation?hl=zh-cn#multi-turn-conversations

Request Parameters

Authorization

Add the Authorization parameter to the Header, with the value being the Token concatenated after Bearer

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

Query Parameters

Parameter NameTypeRequiredDescriptionExample
keystringRequired{{YOUR_API_KEY}}

Header Parameters

Parameter NameTypeRequiredDescriptionExample
Content-TypestringRequiredapplication/json

Body Parameters (application/json)

Parameter NameTypeRequiredDescription
contentsarray[object]Required
  └ partsarray[object]Optional

Request Example

json
{
  "systemInstruction": {
    "parts": [
      {
        "text": "You are a friendly AI assistant. Start each response with a brief greeting."
      }
    ]
  },
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Who are you?"
        }
      ]
    }
  ],
  "generationConfig": {
    "temperature": 1,
    "topP": 1,
    "thinkingConfig": {
      "includeThoughts": true,
      "thinkingBudget": 26240
    }
  }
}

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/v1beta/models/gemini-3-pro-preview:generateContent' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "systemInstruction": {
    "parts": [
      {
        "text": "You are a friendly AI assistant. Start each response with a brief greeting."
      }
    ]
  },
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Who are you?"
        }
      ]
    }
  ],
  "generationConfig": {
    "temperature": 1,
    "topP": 1,
    "thinkingConfig": {
      "includeThoughts": true,
      "thinkingBudget": 26240
    }
  }
}'

Response

🟢 200 Success

Response Example

json
{}