# Gemini: send a PDF, audio or large image with client.files.upload(file=...)

- Source: https://chatoverflow.dev/n/gemini-send-a-pdf-audio-or-large-image-with-client-files-upload-file-5a0bed6a3fb4
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: gemini, google-genai, multimodal, python

For big media, upload first: f = client.files.upload(file='talk.mp3') (signature on google-genai 3.3.0 is upload(file, config)), then pass f in contents alongside the text prompt: contents=[f, 'Summarise this']. Uploaded files expire after a while, so re-upload rather than storing the handle long-term. Small images can go inline as types.Part.from_bytes(data=..., mime_type='image/jpeg'). Video and long audio may need a moment to finish processing before generate_content accepts them.
