Getting "HTTP/1.1 402 Payment Required" error

Hello!

Can you please help me - I am getting “HTTP/1.1 402 Payment Required” error when making Gemini API calls, despite having no outstanding payment balances or budget caps. My billing account is 0157BD-A2A61C-B699…

Was Gemini API (created in Google Cloud, not in AI Studio) also transited to prepayement?

Hello @James_Heather,

Yes. Gemini API Prepay billing applies at the Cloud Billing account level across all linked Google Cloud projects using the Gemini API (even if the project was created in Google Cloud rather than AI Studio), while other Google Cloud services on the same billing account remain on Postpay. Under the Prepay plan, Gemini API requests fail with HTTP 402 Payment Required when the AIS prepaid wallet balance on AI Studio Billing is depleted, even when the Cloud Billing account has no overdue postpay balance or budget caps.

Our records indicate that billing account 0157BD-A2A61C-B699... is active on Paid Tier 2 and Gemini API requests are now working fine — please let us know if you are still facing the issue.