Gemini API error 400: INVALID_ARGUMENT and FAILED_PRECONDITION
Quick answer: A 400 means Google couldn't accept the request as sent. INVALID_ARGUMENT is a problem with the request itself; FAILED_PRECONDITION means something needed isn't in place, such as billing. Neither is an outage, and retrying the same request won't help.
The message you're seeing
400 INVALID_ARGUMENT400 FAILED_PRECONDITION
Is it down right now?
- Gemini · checked No problems
Live status, updated every minute. If it says “No problems”, the cause is most likely on your side: follow the steps below.
INVALID_ARGUMENT
Google says the request payload is malformed or contains invalid parameters.
- Check the request against the API referenceLook for misspelt fields, wrong types or values out of range.
- Check the API versionSome features are only available in the /v1beta version. Make sure your endpoint matches the feature you're using.
- Check model-specific settingsGoogle says newer models (Gemini 4 and Gemini 3.6 onwards) ignore custom temperature, top_p and top_k values and will return 400 errors for them in a future release.
FAILED_PRECONDITION
A prerequisite isn't met, for example billing is turned off. Check your project's billing status and account settings in Google AI Studio or Google Cloud.
Debugging tips
Log the exact request body you send and compare it with a minimal working example from Google's API reference. Remove optional fields one at a time until the error goes away; the last field you removed is usually the culprit.
Questions
Should I retry a 400?
No. Google's guide says not to retry 400 errors, because they point to a problem such as a bad key or bad syntax that won't fix itself.
Is Gemini down if I get a 400?
No. Outages show up as 500 or 503 errors. Check the live status above to be sure.
Why did a request that used to work start failing?
Models and API versions change. Check Google's troubleshooting guide for settings that newer models handle differently.
Want to know when Gemini has a real outage? Follow our free outage alerts. We only post real outages, and again when they're fixed.
Related error guides
- Gemini API 429 RESOURCE_EXHAUSTED
- Gemini “Something went wrong”
- Gemini API 503 UNAVAILABLE
- Gemini API 403 PERMISSION_DENIED
Based on official documentation, checked 3 November 2026: Google AI Studio: API errors · Google AI Studio: Troubleshooting. Error messages and limits change over time, so the provider's own docs are the final word.