Overview
The "Analyze File" operation of this Gemini node allows users to analyze an uploaded file by sending it along with a text prompt to the Google Gemini AI API. This operation is useful for scenarios where you want to extract insights, transcriptions, descriptions, or other contextual information from various types of files such as images, audio, or video.
Practical examples include:
- Transcribing audio files (e.g., MP3) into text.
- Describing the content of an image file.
- Extracting metadata or summarizing video content.
- Asking specific questions about the contents of a file using a custom prompt.
This operation leverages advanced AI models to understand and generate meaningful responses based on the file content combined with user instructions.
Properties
| Name | Meaning |
|---|---|
| File URI | The URI of the uploaded file to analyze. This must be obtained from a prior file upload step. |
| File MIME Type | The MIME type of the file (e.g., audio/mp3, image/jpeg, video/mp4). You can specify any MIME type. |
| Prompt | The text prompt describing what you want to ask or learn about the file (e.g., "Transcribe this audio"). |
| Model | The Gemini AI model to use for analysis. Options include: - Gemini 1.5 Flash - Gemini 1.5 Flash-8B - Gemini 1.5 Pro - Gemini 2.0 Flash - Gemini 2.0 Flash-Lite - Gemini 2.5 Flash Preview - Gemini 2.5 Pro Preview |
Output
The output JSON object contains the following fields:
response: The textual response generated by the Gemini AI based on the file content and prompt.model: The name of the Gemini model used for analysis.prompt: The original prompt provided for the file analysis.fileUri: The URI of the analyzed file.fileMimeType: The MIME type of the analyzed file.- Additional fields from the input JSON data are preserved and merged.
No binary data is output in this operation; the result is purely textual.
Dependencies
- Requires an API key credential for authenticating requests to the Google Gemini AI API.
- The node makes HTTP POST requests to the Gemini API endpoint for content generation.
- The file to analyze must have been previously uploaded via the "Upload File" operation to obtain a valid file URI.
Troubleshooting
Common issues:
- Invalid or missing file URI: Ensure the file has been uploaded successfully and the correct URI is provided.
- Incorrect MIME type: Providing an incorrect MIME type may lead to improper analysis results.
- No valid response received: If the API returns no candidates or empty content, check the prompt and file validity.
- API authentication errors: Verify that the API key credential is correctly configured and has necessary permissions.
Error messages:
"No valid response received from Gemini API": Indicates the AI did not return usable content. Try modifying the prompt or verifying the file."Gemini API Error: <message>": General error from the Gemini API. Check network connectivity, credentials, and request parameters.