HeadlinesBriefing favicon HeadlinesBriefing.com

Gemini API Simplifies Multimodal Input

DEV Community •
×

Google's Gemini API has streamlined how developers feed data into its models. A recent update lets developers use public HTTPS URLs and signed URLs directly, eliminating the need to upload local files. The inline data limit also jumped from 20 MB to 100 MB. This shift moves beyond prototyping, targeting production environments where assets live in remote storage like Google Cloud Storage or S3.

This change cuts out the boilerplate code required to read local files and convert them into API-ready formats. In a demo comparing facial features, the author replaced a complex utility function with just two lines of code using `types.Part.from_uri`. The model fetches images from a public GitHub repository directly, simplifying the workflow and reducing client-side data management overhead.

The core benefit is removing the client-side upload bottleneck. For applications using assets hosted on services like Azure Blob Storage or GCS, this means data persistence is handled at the source. Developers can now register GCS URIs for reuse across requests, making the API more efficient for scalable, production-grade applications that handle large or frequently accessed files.