I am encountering a persistent MODEL_ERROR when attempting to use the @google/generative-ai SDK in a new Google Cloud Project, even after enabling billing, waiting, and verifying all standard troubleshooting steps. The error affects both multimodal (image) and simple text-only calls, indicating an underlying quota or billing infrastructure blockage on the project itself.
Error Message Received
The full error message derived from the response indicates a quota/permission issue:
“CRITICAL: Code is verified. This failure is exclusively due to Quota/Billing/Permissions on the Google Cloud Project. AI analysis failed: Check your Google Cloud Project Quota and Billing status. Billing may still be propagating.”
Steps Taken (Troubleshooting)
1. Code Verification: The Node.js code using getGenerativeModel({ model: "gemini-2.5-flash" }) and structured JSON output has been verified as correct.
2. API Key: A brand new API key was generated specifically for this new project.
3. API Enablement: Both the Generative Language API and Vertex AI API are enabled on the project.
4. Billing Status: Billing is enabled and active on the project.
5. Diagnostic Test: A simple text-only generation call ("What is 2+2?") was performed using the new API key, and it also failed, confirming the key is blocked for ALL generation, not just multimodal.
6. Legacy Key Removal: Any potential conflicting API keys from Google AI Studio were revoked and deleted.
7. Waiting Period: The issue has persisted for several hours after creating the new project and enabling services.
Conclusion
Based on these diagnostics, the issue appears to be an incorrect Zero Quota setting or a Billing Propagation failure tied to this specific Google Cloud Project ID. Since I’ve exhausted all client-side and configuration fixes, could a Google engineer please manually review and initiate a quota reset for the Generative Language API on this Project ID?
Project Details (CRITICAL)
- Google Cloud Project ID: bird-journal-ai-backend
- Model Used:
gemini-2.5-flash - Library:
@google/generative-ai(Node.js)