Analyze a file with Gemini
GEMINI_INVOKE_WITH_FILE- Analyze PDF documents with AI
- Process images and extract information
- Handle audio and video files
- Generate structured responses based on file content
- Support for multiple file formats
Connect with a Gemini API key
If you do not have an API key, you can still run Gemini tools by using Jinba API credit. If you’d like to use your own API key, you can obtain one from the official Gemini website. Note: Treat API keys as sensitive information and never commit them to public repositories.Analyze a document
File retention
Files are uploaded to the Gemini Files API before the model reads them. By default Google keeps each upload for 48 hours. Set thedeleteFilesAfterRead config to true to delete the uploaded files as soon as the read completes, whether it succeeded or failed. Use this for documents that must not linger, such as bank statements or ID scans. If a delete fails, the step still returns its result and reports the failure in its logs; the file then expires on Google’s 48-hour schedule. With the option on, a step whose file fetch fails waits for its other uploads to finish before reporting the error, so that it can delete them too.
Use Cases
- Document Review: Analyze contracts, reports, and proposals
- Content Extraction: Extract key information from research papers
- Data Analysis: Process charts and graphs in images
- Media Processing: Analyze video and audio content
- Compliance Checking: Review documents for specific criteria
Notes
- The
temperatureconfig value (0–2, default 0.7) is only sent to Gemini models older than 3.6. Gemini 3.6 and later fix their sampling parameters, so for those models and for the-latestaliases (including the defaultgemini-flash-latest) the value is omitted from the request and has no effect.