PeumeAPI

AI generation · YouTube

Google: Gemini 3.8 Flash (video understanding)

Answer a prompt about a public video with Gemini 3.8 Flash on Google's own API, from a https video URL or a public YouTube URL; the answer is text or JSON.

$0.15 per lookup, only when foundUsually answers in under a minute

Call it

curl https://api.peume.com/v1/call/youtube-google-gemini-3-8-flash-video-understanding \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "model": "gemini-3.8-flash",
    "contents": [
      {
        "parts": [
          {
            "fileData": {
              "fileUri": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
            }
          },
          {
            "text": "Shot list as JSON: shot, start, end, framing, camera_move, visual, dialogue_sfx."
          }
        ]
      }
    ]
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: youtube-google-gemini-3-8-flash-video-understanding.

Parameters

modelRequiredstring

's key runs only gemini-3.8-flash; your own key can name another model.

Example: gemini-3.8-flash

contentsRequiredarray

One user turn, video part first, then the text prompt. A video part is {fileData: {mimeType, fileUri}}. fileUri is a public https URL Google fetches (15 MB per file; set mimeType, video/mp4 for an mp4; ` host <file>` prints a URL) or a public YouTube URL (preview; private and unlisted videos are refused; mimeType may be omitted). A file already uploaded with this same key is a File API URI, and a file under 100 MB can be {inlineData: {mimeType, data: <base64>}}. Up to 10 videos. On the video part: videoMetadata {fps, startOffset, endOffset} samples more or fewer frames than 1 a second and

Example: [{"parts":[{"fileData":{"fileUri":"https://www.youtube.com/watch?v=jNQXAC9IVRw"}},{"text":"Shot list as JSON: shot, start, end, framing, camera_m

generationConfigobject

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.