Generate Content
Google Gemini
Generate Content
Generates a model response given an input GenerateContentRequest.
POST
Generate Content
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The model name to use for generation.
Available options:
gemini-3.1-pro-preview, gemini-3.1-flash-image-preview, gemini-3.1-flash-lite-preview, gemini-3-pro-preview, gemini-3-pro-image-preview, gemini-3-flash-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash Body
application/json
The content of the current conversation with the model.
Minimum array length:
1Example:
[
{
"role": "user",
"parts": [{ "text": "Hello, Gemini!" }]
}
]Developer set system instruction.
Configuration options for model generation and outputs.
A list of tools the model may use to generate a response.
Tool configuration for any tools specified in the request.
A list of unique SafetySetting instances for blocking unsafe content.