Subject: 429 "prepayment credits are depleted" — countTokens works,
generateContent blocked
I'm getting a persistent 429 on all generation calls, while free calls
on the same service and model succeed.
Error:
429 RESOURCE_EXHAUSTED
"Your prepayment credits are depleted. Please go to AI Studio..."
Diagnostics (same API key, same model gemini-flash-lite-latest):
ListModels -> 200 (50 models visible)
countTokens -> 200 (works — free, same GenerativeService)
generateContent -> 429 (blocked)
v1beta/interactions -> 429 (blocked)
Only billable calls are refused. The key clearly has valid permission
on this exact service, so this looks like a billing-sync issue rather
than a configuration problem on my end. Three separate API keys
produced identical results.
Project number: 7862182856..
Could someone please run a manual billing sync for this project?
Hello @Rishabh_Sisodiya ,
This happened because Project 78621828**** is on free trial billing account, and the credits cannot be used for Gemini API usage: https://ai.google.dev/gemini-api/docs/billing#cloud-credits