Google API failed to generate a key
Error
Google API failed to generate a key.Why this happens
Neural Inverse couldn't obtain a valid access token from your Google credentials. This applies to Google Vertex AI (not Gemini API — they use different auth).
Fix
For Google Gemini (aistudio.google.com)
This error shouldn't appear for Gemini. If it does, you may have selected the wrong provider:
- Open settings
- Select Google Gemini (not Vertex AI)
- Enter your API key from aistudio.google.com
For Google Vertex AI
Vertex uses Application Default Credentials:
- Install gcloud CLI
- Authenticate:
gcloud auth application-default login - Set project and region in Neural Inverse settings
- Verify credentials:
gcloud auth application-default print-access-token
Common causes
GOOGLE_APPLICATION_CREDENTIALSenv var points to a deleted/moved file- Service account key expired
- ADC token expired — re-run
gcloud auth application-default login - Wrong project ID in settings
Was this page helpful?
Last edited