Prompt Buddy logoPrompt Buddy

google · Google AI Docs

Gemini API Gemini generateContent API

Explains how the Gemini API handles media resolution and how different input resolutions affect token counts and model perception.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Gemini API Gemini generateContent API

Explains how the Gemini API handles media resolution and how different input resolutions affect token counts and model perception.

When To Use

Use when you need to optimize token usage or predict how the model will perceive the detail level of uploaded images and videos.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/gemini-api-generatecontent-workflow-guide.mdDocumentation explaining how the media-resolution parameter controls token allocation for images, videos, and PDFs in the Gemini API.Questions about documentation explaining how the media-resolution parameter controls token allocation for images, videos, and PDFs in...
examples/gemini-api-generatecontent-gemini-api-v1alpha-generatecontent-python-med.textA Python code example demonstrating how to use the media_resolution parameter in the Gemini API v1alpha version to control image processing.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the mediaresolution parameter in the Gemini API v1alpha version to con...
examples/gemini-api-generatecontent-javascript-media-resolution.textA JavaScript code example demonstrating how to set per-part media resolution when using the Gemini generateContent API.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to set per-part media resolution when using the Gemini generateContent API.
examples/gemini-api-generatecontent-media-resolution-request.textA JSON request payload demonstrating how to use the mediaresolution parameter with base64 encoded image data in a generateContent call.Exact payloads, commands, or snippets shown in A JSON request payload demonstrating how to use the mediaresolution parameter with base64 encoded image data in a gen...
examples/gemini-api-generatecontent-python-media-resolution-config.textA Python code example demonstrating how to configure media resolution settings when using the Gemini generateContent API.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to configure media resolution settings when using the Gemini generateContent...
examples/gemini-api-generatecontent-nodejs-media-resolution.textA Node.js code example demonstrating how to use the MediaResolution configuration within the generateContent method of the Gemini API.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the MediaResolution configuration within the generateContent method o...
examples/gemini-api-generatecontent-mediaresolution-curl-request.textA curl command demonstrating how to include the mediaresolution configuration parameter in a generateContent API request.Exact payloads, commands, or snippets shown in A curl command demonstrating how to include the mediaresolution configuration parameter in a generateContent API requ...

What This Skill Covers

  • The mediaresolution parameter controls how the Gemini API processes media inputs like images, videos, and PDF documents by determining the maximum number of...
  • Main sections: Per-part media resolution (Gemini 3 only), Python, Javascript, REST, Global media resolution.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://ai.google.dev/gemini-api/docs/media-resolution