Gemini Cookbook: Based on Google Materials · Lesson 4
File API: Uploading and Using Files
Upload files with client.files.upload, wait for the ACTIVE state, pass them to the Interactions API on gemini-4-hydrogen as image, audio, video and document blocks, handle code and text files, register GCS objects, pass direct HTTPS URLs, and choose File Search for a permanent document base.
One trial lesson is open without sign-up: what a large language model is →


