Video Understanding URL [Native Format] Development

Official Documentation: https://ai.google.dev/gemini-api/docs/video-understanding?hl=zh-cn

Endpoint

POST http://v98store.com/v1beta/models/gemini-2.0-flash:generateContent

cURL Command

curl -X POST 'http://v98store.com/v1beta/models/gemini-2.0-flash:generateContent' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -d '{ "contents": [ { "role": "user", "parts": [ { "file_data": { "mime_type": "video/mp4", "file_uri": "https://generativelanguage.googleapis.com/v1beta/files/rsmb0ggleyv0" } }, { "text": "Please summarize the video in 3 sentences." } ] } ] }'

Parameters

NameInDescriptionRequired
keyqueryYes
Content-TypeheaderYes

Request Body

Example

{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "file_data": {
            "mime_type": "video/mp4",
            "file_uri": "https://generativelanguage.googleapis.com/v1beta/files/rsmb0ggleyv0"
          }
        },
        {
          "text": "Please summarize the video in 3 sentences."
        }
      ]
    }
  ]
}

Responses

200 -

Example

undefined