Google 宣布了对 Gemini API 的重大更新,扩展了其数据获取能力,以更好地支持生产级 AI 应用。主要改进包括直接支持 Google Cloud Storage 对象注册,以及能够通过来自各种云提供商(AWS S3、Azure Blob Storage)的 HTTPS/签名 URL 使用数据。这消除了之前需要将大文件上传到 Gemini Files API(仅提供 48 小时临时存储)的要求,从而消除了依赖持久数据的应用程序的主要瓶颈。此外,直接上传的内联文件大小限制已从 20MB 大幅提高到 100MB,以满足原型设计、实时用例和较大多媒体资源的需求。这些增强功能旨在减少开发障碍,加速多模态 AI 应用程序的部署,并让开发者更有效地利用现有数据存储解决方案。文章强调,这些功能可通过最新的 GenAI SDK 立即使用。
Today, we’re introducing significant updates to how you ingest data into the Gemini API: support for Google Cloud Storage (GCS) object registration, HTTPS/Signed URLs and increased inline file size limits. These changes are designed to help you bring your own data — wherever it lives — directly into Gemini API. There’s no longer a need to re-upload data from existing storage, allowing you to scale your AI applications to production faster.
Bring your own data: GCS and external URLs
Previously, using large files (video, long audio, massive documents) required uploading them to the Gemini Files API, where they persisted for only 48 hours. While sufficient for prototyping, this ephemeral storage became a bottleneck for production apps relying on persistent data in cloud storage platforms.
We are removing this friction with two new input methods.
1. External URLs (public / signed):
We now support both files stored in public domains, as well as private storage (via signed URLs)
- You can pass any publicly accessible URL (like a PDF or image on the web) directly in your generation request.
- We support pre-signed URLs for accessing data from AWS S3, Azure Blob Storage or other cloud providers.
The Gemini API securely fetches the content during processing, eliminating the need to download content to your backend just to forward it to the API.
2. Register GCS files: If your data is already in Google Cloud Storage (GCS), you no longer need to move bytes. You can now register your GCS files directly with the Files API.
Increased inline limits
For developers who prefer using inline files for speed and simplicity, we are increasing the maximum payload size for inline data from 20MB to 100MB (base64 encoded, with slightly varying limits based on data types). This is ideal for prototyping, real-time applications, and handling larger images or short audio clips without needing any intermediate storage.
With these updates, you now have a robust toolkit for data ingestion tailored to your specific needs:
How it works
Here’s how you can start using these new methods with the latest GenAI SDKs.
Using External (public or signed) URLs
This method allows you to fetch content directly from your existing storage buckets.
Registering Google Cloud Storage (GCS) files
For data already sitting in your GCS buckets, you can register the URIs once and use them across multiple requests without moving the actual bytes.
Note: This requires authenticating with OAuth credentials as an IAM user or service with read access to the storage bucket. See our documentation for the setup guide.
Get started
These new file input methods are available today in the latest versions of our SDKs. We’re excited to see how removing these data barriers helps you build faster and scale your multimodal applications with less overhead.
For complete details on authentication, supported file types, and best practices, check out the updated file documentation. To try out the new file URLs, explore the demo applet.

