{
"contents": [
{
"role": "user",
"parts": [
{
"text": "总结视频内容"
},
{
"inline_data": {
"mime_type": "video/mp4",
"data": "'$VIDEO_B64'"
}
}
]
}
]
}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": "总结视频内容"
},
{
"inline_data": {
"mime_type": "video/mp4",
"data": "'\''$VIDEO_B64'\''"
}
}
]
}
]
}'{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "视频开始时,两只小象在泥泞的地面上嬉戏。一只站立的小象用鼻子和身体推着另一只躺在泥水中的小象,后者在泥水中快乐地打滚。随后,躺着的小象慢慢起身,两只小象都沾满了泥巴。它们互相靠近,并在泥水中玩耍,其中一只小象还用鼻子吸水并喷洒。它们继续在泥泞的水坑中移动,最后慢慢走出画面。"
}
]
},
"finishReason": "STOP",
"avgLogprobs": -3.20458740234375
}
],
"usageMetadata": {
"promptTokenCount": 11298,
"candidatesTokenCount": 100,
"totalTokenCount": 12256,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [
{
"modality": "AUDIO",
"tokenCount": 975
},
{
"modality": "TEXT",
"tokenCount": 3
},
{
"modality": "VIDEO",
"tokenCount": 10320
}
],
"candidatesTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 100
}
],
"thoughtsTokenCount": 858
},
"modelVersion": "gemini-2.5-flash",
"createTime": "2025-11-29T15:43:12.048354Z",
"responseId": "kBQraeL5AsqE998P26jViQY"
}