Expand description
The response format follows the following structure:
{
"candidates": [
{
"content": {
"parts": [
{
"text": string
}
]
},
"finishReason": enum (FinishReason),
"safetyRatings": [
{
"category": enum (HarmCategory),
"probability": enum (HarmProbability),
"blocked": boolean
}
],
"citationMetadata": {
"citations": [
{
"startIndex": integer,
"endIndex": integer,
"uri": string,
"title": string,
"license": string,
"publicationDate": {
"year": integer,
"month": integer,
"day": integer
}
}
]
}
}
],
"usageMetadata": {
"promptTokenCount": integer,
"candidatesTokenCount": integer,
"totalTokenCount": integer
}
}Structs§
- Candidate
- Gemini
Response - Prompt
Feedback - Safety
Rating - Streamed
Gemini Response - Token
Count - The token count for a given prompt.
- Usage
Metadata
Enums§
- Finish
Reason - The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
- Gemini
Error Response