Google Vertex AI (generative AI) error
Vertex AI 400 INVALID_ARGUMENT / FAILED_PRECONDITION: what it means and how to fix it
400 INVALID_ARGUMENT / FAILED_PRECONDITIONRetry? NoLast verified 2 documented fixes2 sources
What it means
The request fails API validation, or you tried to access a model that requires allowlisting or is disallowed by the organization's policy. The docs (now published under Gemini Enterprise Agent Platform) follow the Google Cloud API error model.
Causes
- Request fails API validation, for example it exceeds the model's input token limit
- Accessing a model that requires allowlisting
- Accessing a model disallowed by the organization's policy
How to fix it
- Fix 1.
Review the model-specific limits on the Google models page.
- Fix 2.
Do not retry client errors (4xx other than 429/408).
More Vertex AI errors
All 11 Vertex AI errors401 UNAUTHENTICATEDRetry? No403 PERMISSION_DENIEDRetry? No404 NOT_FOUNDRetry? No429 RESOURCE_EXHAUSTEDRetry? Yes429 Resource exhausted, please try again laterRetry? Yes429 Too many requests. Exceeded the Provisioned ThroughputRetry? Not stated499 CANCELLEDRetry? Not stated500 UNKNOWN / INTERNALRetry? Yes
HTTP 400 at other providers
Compare 400 across providers400 ValidationExceptionRetry? NoAmazon Bedrock400 ServiceQuotaExceededExceptionRetry? YesAmazon Bedrock400 IncompleteSignatureRetry? Not statedAmazon Bedrock400 InvalidActionRetry? Not statedAmazon Bedrock400 NotAuthorizedRetry? Not statedAmazon Bedrock400 RequestExpiredRetry? Not statedAmazon Bedrock400 invalid_request_errorRetry? Not statedAnthropic API400 invalid_request_error (spend limit reached)Retry? Not statedAnthropic API400 Bad RequestRetry? Not statedAzure OpenAI400 content_filterRetry? Not statedAzure OpenAI400 Bad RequestRetry? Not statedCohere API400 Bad Request (too many tokens)Retry? Not statedCohere API
FAQ
What does the Vertex AI error "400 INVALID_ARGUMENT / FAILED_PRECONDITION" mean?
The request fails API validation, or you tried to access a model that requires allowlisting or is disallowed by the organization's policy. The docs (now published under Gemini Enterprise Agent Platform) follow the Google Cloud API error model.
How do I fix Vertex AI "400 INVALID_ARGUMENT / FAILED_PRECONDITION"?
There are 2 documented fixes. Start with the first: Review the model-specific limits on the Google models page.
Should I retry Vertex AI "400 INVALID_ARGUMENT / FAILED_PRECONDITION"?
No. The official docs treat this error as not retryable: fix the cause before sending the request again.
Which other AI APIs return HTTP 400?
Per their official error docs: Amazon Bedrock (400 ValidationException; 400 ServiceQuotaExceededException; 400 IncompleteSignature; 400 InvalidAction; 400 NotAuthorized; 400 RequestExpired), Anthropic API (400 invalid_request_error; 400 invalid_request_error (spend limit reached)), Azure OpenAI (400 Bad Request; 400 content_filter), Cohere API (400 Bad Request; 400 Bad Request (too many tokens)), DeepSeek API (400 - Invalid Format), Gemini API (400 invalid_request; 400 failed_precondition; 400 parameter_unknown; 400 INVALID_ARGUMENT; 400 FAILED_PRECONDITION), Groq API (400 Bad Request), Mistral API (400 Bad request), OpenAI API (400 invalid_request_error (Invalid service_tier argument); 400 BadRequestError), OpenRouter (400 invalid_request; 400 invalid_prompt; 400 context_length_exceeded; 400 max_tokens_exceeded; 400 token_limit_exceeded; 400 string_too_long; 400 invalid_image; 400 image_too_large; 400 image_too_small; 400 unsupported_image_format; 400 image_download_failed), xAI API (400 Bad Request).
Sources
Last verified against 2 sources: Vertex AI's official docs and official SDK repositories.
Newsletter
Know when the APIs change
One email per week. New model releases, API changes, what broke, and how developers are working around it.