Skip to main content
POST
Gemini generateContent
Gemini’s official docs split video into two flows: video understanding through generateContent, and long-running generation through operation-style APIs.
  • Official docs allow video input through inline data, Files API uploads, Cloud Storage URLs, and even YouTube URLs
  • This path is suited for summaries, scene analysis, temporal reasoning, and subtitle-assisted understanding
  • Larger or reusable videos are better handled through Files API references inside contents.parts
  • For Veo-style generation models, use /v1beta/models/{model}:predictLongRunning
  • Video-understanding text still usually comes from candidates[].content.parts[]
  • Google’s official docs also document format support, frame sampling, and tokenization constraints for longer videos

Authorizations

x-goog-api-key
string
header
required

Path Parameters

model
string
required

Gemini model name.

Example:

"gemini-2.5-pro"

Body

application/json
contents
object[]
required
systemInstruction
object
generationConfig
object
safetySettings
object[]
tools
object[]

Response

Successful Gemini content response

candidates
object[]
usageMetadata
object