Imagen API - 429 Resource exhausted - HELP PLS

Hello, hoping someone could shed some light for me, because after reading all available docs / veryfing permissions, etc. I still couldn’t figure this out.

I am trying to programatically generate images using Vertex API - Imagen model (tried with v3 and v4). I signed up to Google Cloud , a new account , and got $300 in test credits, I activated my account and added billing details, I checked the quota for Vertex and Imagen (including for us-central1 region) has enough RPM allowed but am still getting http status code 429 resource exhaused every time I call the API. I am using a service account and I checked that it has the permissions to access that API. I don’t have other services calling that api, and I only do 1 call that triggers that error. If I go in the console and send the same prompt (maybe 500 chars) to create the image using Imagen it works perfectly, just programatically via the API it does not work. Do you guys have any thoughts, advices as I can’t really figure it out …

Thanks a lot!

Try targeting the global endpoint instead of a specific regional one. Deployments and endpoints  |  Generative AI on Vertex AI  |  Google Cloud

I tried with location=global but this is not a supported location for Imagen model from what I read in the docs. The API call also error’ed return back a HTML (probably 404).

Tried with location=us-central1 and increased the quota to 50 to no luck

Tried with location=eu-west9 with the default quota of 20 to no luck

I’m completely our of ides :frowning: Appreciate any guideline or lead/suggestion on how to fix this.