Azure OpenAI (Microsoft Foundry) error
Azure OpenAI 400 content_filter: what it means and how to fix it
400 content_filterRetry? Not statedLast verified 2 documented fixes2 sources
What it means
The prompt was classified at a filtered category and severity level by the content filtering system, so the API call fails with HTTP 400 and the message "The response was filtered".
Causes
- Prompt content at a filtered category (hate, sexual, violence, self-harm) and severity level
- Other configured input filters such as prompt shields or blocklists
How to fix it
- Fix 1.
Modify the prompt and try again.
- Fix 2.
Review the content filter configuration on the deployment; severity thresholds are configurable, and turning filters off requires approval for modified content filtering.
More Azure OpenAI errors
All 15 Azure OpenAI errors400 Bad RequestRetry? Not stated200 finish_reason: content_filterRetry? Not stated200 content_filter_error (The contents are not filtered)Retry? Not stated401 UnauthorizedRetry? Not stated403 Forbidden (network access denied)Retry? Not stated403 Forbidden (resource has been temporarily blocked)Retry? Not stated404 Not FoundRetry? Not stated429 Too Many Requests (Rate limit is exceeded)Retry? 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 statedCohere API400 Bad Request (too many tokens)Retry? Not statedCohere API400 - Invalid FormatRetry? Not statedDeepSeek API400 invalid_requestRetry? NoGemini API
FAQ
What does the Azure OpenAI error "400 content_filter" mean?
The prompt was classified at a filtered category and severity level by the content filtering system, so the API call fails with HTTP 400 and the message "The response was filtered".
How do I fix Azure OpenAI "400 content_filter"?
There are 2 documented fixes. Start with the first: Modify the prompt and try again.
Should I retry Azure OpenAI "400 content_filter"?
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)), 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), Vertex AI (400 INVALID_ARGUMENT / FAILED_PRECONDITION), xAI API (400 Bad Request).
Sources
Last verified against 2 sources: Azure OpenAI'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.