Class GeminiFiles

java.lang.Object
dev.langchain4j.model.googleai.GeminiFiles

public final class GeminiFiles extends Object
Service for uploading and managing media files with Google AI Gemini.

The Gemini models support multimodal inputs including text, images, audio, videos, and documents. Use this API to upload media files when the total request size exceeds 20 MB.

Files are stored for 48 hours and can be referenced in content generation requests using their URI. The API supports up to 20 GB of files per project, with a maximum of 2 GB per individual file. During the retention period, you can retrieve file metadata but cannot download the files directly.