Skip to main content
POST

Authorizations

string
required
All API endpoints require Bearer Token authenticationGet your API Key:Visit the API Key Management Page to get your API KeyAdd it to the request header:

Path Parameters

string
required
Model nameThe examples use gemini-2.5-pro, which you can replace with other supported Gemini models:
  • gemini-3.5-flash - Gemini 3.5 Flash
  • gemini-3.1-pro-preview - Gemini 3.1 Pro Preview
  • gemini-3-pro-preview - Gemini 3 Pro Preview
  • gemini-2.5-pro - Gemini 2.5 Pro
enum<string>
required
Generation method (recommended: generateContent for quick start):
  • generateContent: Wait for complete response and return at once
  • streamGenerateContent: Stream response, return content in chunks
Available options: generateContent, streamGenerateContent

Body

array
required
List of conversation contentsMinimum 1 message requiredExample:
object
Generation configuration (optional)
array
Safety settings (optional)

Response

array
List of candidate responses
object
Prompt feedback information
object
Usage statistics