POST
/
v1beta
/
models
/
gemini-2.0-flash:generateContent
curl -X POST "https://www.anyfast.ai/v1beta/models/gemini-2.0-flash:generateContent?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "file_data": {
              "mime_type": "video/mp4",
              "file_uri": "https://generativelanguage.googleapis.com/v1beta/files/YOUR_FILE_ID"
            }
          },
          {"text": "Please summarize the video in 3 sentences."}
        ]
      }
    ]
  }'
{
  "candidates": [
    {
      "content": {
        "parts": [
          {
            "text": "The video shows..."
          }
        ],
        "role": "model"
      },
      "finishReason": "STOP"
    }
  ]
}
Official documentation: https://ai.google.dev/gemini-api/docs/video-understanding
Analyze video content using Google Gemini models in native format. This endpoint is currently in development.

Overview

This endpoint allows you to send video files to Gemini models for analysis using the native Gemini API format. Videos are provided via file_data with a Google file URI. Note: This endpoint is currently in development.

Authentication

Requires an API key passed as a query parameter:
?key=YOUR_API_KEY

Request Parameters

key
string
required
API key.
contents
array
required
Content array containing video file references and text prompts.Each content object contains:
  • role (string): Role, e.g., user
  • parts (array): Content parts including file_data and text

Video Input Format

{
  "file_data": {
    "mime_type": "video/mp4",
    "file_uri": "https://generativelanguage.googleapis.com/v1beta/files/YOUR_FILE_ID"
  }
}
curl -X POST "https://www.anyfast.ai/v1beta/models/gemini-2.0-flash:generateContent?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "file_data": {
              "mime_type": "video/mp4",
              "file_uri": "https://generativelanguage.googleapis.com/v1beta/files/YOUR_FILE_ID"
            }
          },
          {"text": "Please summarize the video in 3 sentences."}
        ]
      }
    ]
  }'
{
  "candidates": [
    {
      "content": {
        "parts": [
          {
            "text": "The video shows..."
          }
        ],
        "role": "model"
      },
      "finishReason": "STOP"
    }
  ]
}