Gemini API Image URLs returns 429 RESOURCE_EXHAUSTED

We’re trying to switch from using FileAPI for image uploads in Gemini API to setting Image URLs in the file_data.file_uri field, but it’s not working. file_data.file_uri with external HTTPS Image URLs always returns 429 RESOURCE_EXHAUSTED (Tier 3, single URL, Files API control succeeds)

Project: paid, Tier 3 · API: generativelanguage.googleapis.com · Model: gemini-3.7-flash · Dates observed: Aug 25–26, 2026 (PDT)

We’ve been using FileAPI for image uploads in Gemini requests, but we have such a high volume of images per request (thousands per Gemini call) that FileAPI isn’t a good fit, since we’re nearly exceeding FileAPI storage limits. We read somewhere that generateContent now accepts public and pre-signed HTTPS URLs in file_data.file_uri. We tried switching to attaching images to file_uri, but every such request fails immediately with 429 RESOURCE_EXHAUSTED (including requests containing a single URL) while the identical request using Files API handles succeeds.

What we tested

  • Requests with 1, 10, 25, 50, 100, and 261 image URLs (JPEG, ~64 KB each, pre-signed Cloudflare R2 GET URLs, 10-minute TTL). Every request returned 429 {“status”:“RESOURCE_EXHAUSTED”,“message”:“Resource has been exhausted (e.g. check quota).”}. Latency before failure scaled with URL count (~1–5 s at 1–10 URLs, ~60 s at 261), suggesting fetching begins and then a quota trips.
  • Control: the same prompt and the same 261 frames sent as Files API references succeeded repeatedly (32–41 s end-to-end, ~138k prompt tokens), interleaved between the failing URL requests, so RPM/TPM/RPD are not the limiting factor (console shows <15% peak on all listed quotas).
  • The same pre-signed URLs download successfully via plain HTTPS GET from our servers, and requests stayed under the documented 100 MB limit and the URL-context tool’s 20-URLs-per-request cap (we fail at 1).
  • Reproduced identically with API keys from two separate projects (this production project and our staging project).

We checked the project’s quota page for the Generative Language API (Quotas & System Limits) which shows no quota named for URL retrieval / media fetch / external file fetching, so there is nothing visible to request an increase on.

Questions

  1. Is external-URL retrieval for file_data.file_uri gated or separately provisioned per project? Is it something I have to enable somewhere?
  2. If it’s quota-governed, which quota is it, and how do we request an increase (it isn’t visible on the quota page)?
  3. If it’s neither, can you advise why single-URL requests return RESOURCE_EXHAUSTED on a Tier 3 project?

Known issue, it broke about a month ago and no word on it even being acknowledged as broken.

There’s so many little gotchas with broken and undocumented functionality.

I actually had to use Google storage as my storage so that I can use the register file part of the API (allows you to use a GC url inside Gemini API) however the register file part of the c# sdk is broke as well. So 3 more workarounds are needed just to be able to bypass the 20g storage limit.

This is so annoying. And it only work on 3-flash preview and downward

Wow that’s incredibly frustrating. Okay so it sounds like I should just assume this isn’t gonna work and continue finding better strategies for using the FileAPI approach instead.

Thank you for posting this report! It saved me tearing my hair out any longer.

This definitely used to work, and it still works on Gemini 2.5 models. (As far as I can tell - tested with 2.5-Pro)

It must be a bug - otherwise the error message is just plain misleading.

The URLs I’m sending are AWS S3 signed URLs.

Looks like there are a bunch of other people who’ve seen the same thing. No response from Google yet as far as I can see.

It doesnot work with Google AI Studio API Keys!

It only works via Google Agent Platform.
on genai sdk use enterprise=True with service account key or ADC (Application Default Credentials) for authentication as per projects settings

100 MB does not work through Agent Platform.

There is a limit of 15 MiB there.

So someone at Google has to fix it !

Any other workarounds?

I was also facing the same issue with AWS Presigned URLs and then I used CloudFront Presigned URLs and it worked fine.
Used enterprise = True and ADC for authentication. Now its 100% Reliable.

Sorry about this everyone - this is now fixed.

Thank you! Will try it out.

Thanks for looking into this Jon, but it appears that it isn’t fixed yet. For me and others.