{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello"
}
]
},
{
"role": "model",
"parts": [
{
"text": "Great to meet you. What would you like to know?"
}
]
},
{
"role": "user",
"parts": [
{
"text": "I have two dogs in my house. How many paws are in my house?"
}
]
}
]
}curl --location -g --request POST 'http://api.example.com/v1beta/models/gemini-2.5-flash:generateContent?key=sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello"
}
]
},
{
"role": "model",
"parts": [
{
"text": "Great to meet you. What would you like to know?"
}
]
},
{
"role": "user",
"parts": [
{
"text": "I have two dogs in my house. How many paws are in my house?"
}
]
}
]
}'{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "That's an easy one!\n\nEach dog has 4 paws, so with two dogs, you have **8 paws** in your house."
}
]
},
"finishReason": "STOP",
"avgLogprobs": -0.788928731282552
}
],
"usageMetadata": {
"promptTokenCount": 29,
"candidatesTokenCount": 30,
"totalTokenCount": 165,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 29
}
],
"candidatesTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 30
}
],
"thoughtsTokenCount": 106
},
"modelVersion": "gemini-2.5-flash",
"createTime": "2025-11-29T14:35:38.738265Z",
"responseId": "ugQradmHLcLJ4_UP1bqJ-AU"
}