Gemini 2.5 flash, getting around 2gb file size limit

Hello everyone,

I’m considering regularly uploading videos over 2GB to google cloud storage for inference, then deleting them immediately after the response is received. Has anyone used this kind of workflow before? I’m wondering if this is practical or just naive.

Thanks

Have never tried it, but I can’t see how it would work - unless you inline the video you need to give it a Files API reference, which has a 2GB hard limit. You might want to have a look at the Vertex API / services instead, as they may have different limits.

In either case you’ll still need to ensure the video resolution is low enough that you don’t blow your token limit before getting to the end. Good luck! Sounds like an interesting challenge.

1 Like

Thanks! I’ll give it a shot using the Vertex API and reference the uri from google cloud storage instead of using inline for the video.