OpenAI API error
OpenAI API 400 invalid_request_error (Invalid service_tier argument): what it means and how to fix it
400 invalid_request_error (Invalid service_tier argument)Retry? Not statedLast verified 2 documented fixes1 source
What it means
The API returns the message "Invalid service_tier argument: The requested service tier is not allowed for this project." as an invalid_request_error (error.type) with error.param set to service_tier. The requested or resolved service tier is not allowed for the project.
Causes
- The request selects a service tier (default, flex or priority) that the project does not allow
- The fast service tier is evaluated as priority, and priority is not allowed
- The request omits service_tier or sets it to auto, and it resolves to a disallowed tier
How to fix it
- Fix 1.
Check the allowed service tiers in project settings and set service_tier to a tier allowed for the project.
- Fix 2.
If the request uses auto or omits service_tier, update the project settings so the resolved tier is allowed.
More OpenAI API errors
All 23 OpenAI API errors401 Invalid AuthenticationRetry? Not stated401 Incorrect API key providedRetry? Not stated401 You must be a member of an organization to use the APIRetry? Not stated401 IP not authorizedRetry? Not stated403 Country, region, or territory not supportedRetry? Not stated429 credit_balance_exhaustedRetry? No429 Rate limit reached for requestsRetry? Yes429 rate_limit_error slow_downRetry? 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 OpenAI API error "400 invalid_request_error (Invalid service_tier argument)" mean?
The API returns the message "Invalid service_tier argument: The requested service tier is not allowed for this project." as an invalid_request_error (error.type) with error.param set to service_tier. The requested or resolved service tier is not allowed for the project.
How do I fix OpenAI API "400 invalid_request_error (Invalid service_tier argument)"?
There are 2 documented fixes. Start with the first: Check the allowed service tiers in project settings and set service_tier to a tier allowed for the project.
Should I retry OpenAI API "400 invalid_request_error (Invalid service_tier argument)"?
Not stated. The official docs do not say whether this error is retryable.
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), 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), Vertex AI (400 INVALID_ARGUMENT / FAILED_PRECONDITION), xAI API (400 Bad Request).
Sources
Last verified against 1 source: OpenAI API's official docs and official SDK repositories.
- developers.openai.comhttps://developers.openai.com/api/docs/guides/error-codes
Newsletter
Know when the APIs change
One email per week. New model releases, API changes, what broke, and how developers are working around it.