Share via

Azure content safety only sends blank responses.

Flydocs EspCad 0 Reputation points
2026-04-05T22:57:11.66+00:00

Every time I send a request to azure content safety I just get blank responses, I tried to trouble shoot by testing the resource with the content safety studio but everything I sent in the studio passed even things that definitely should not have passed.

Azure AI Content Safety
Azure AI Content Safety

An Azure service that enables users to identify content that is potentially offensive, risky, or otherwise undesirable. Previously known as Azure Content Moderator.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anshika Varshney 9,740 Reputation points Microsoft External Staff Moderator
    2026-04-06T10:12:24.48+00:00

    Hi Flydocs EspCad,

    This behavior usually happens because of how Azure Content Safety responses are designed and how the request is being handled in code.

    Azure Content Safety does not return the original text back in the response. It only returns classification results like whether the content is safe or unsafe along with category scores. So, if you are expecting the input text or a rewritten response, it may look like the API is sending a blank response, but it is actually working as expected.

    Here are a few things you can check step by step.

    First, check what part of the response you are reading. The actual results are inside the analysis or categories section of the response body. If your code is only printing a text field, it may appear empty because Content Safety does not generate text output.

    Second, make sure you are sending valid input content. If the input text is empty, null, or incorrectly mapped in the request payload, the service will return an empty or minimal response. Log the request payload and confirm the text is really being sent.

    Third, verify the API version you are using. Older or incorrect API versions can cause mismatches between request and response fields. Always use the version mentioned in the official documentation and match it exactly in your endpoint URL.

    Fourth, check content length and encoding. Very short text or unsupported encoding can sometimes result in empty classifications. Try testing with a simple sentence like a normal English paragraph to confirm behavior.

    Fifth, confirm that you are calling the correct API. Azure Content Safety is for analyzing content only. It does not modify or generate responses. If you are looking for rewritten or filtered output, that behavior comes from Azure OpenAI, not Content Safety.

    Here are the official references that explain this clearly.

    Azure Content Safety overview https://learn.microsoft.com/azure/ai-services/content-safety/overview

    Text analysis API response format https://learn.microsoft.com/azure/ai-services/content-safety/quickstart-text

    Difference between Content Safety and Azure OpenAI https://learn.microsoft.com/azure/ai-services/content-safety/faq

    In summary, the blank response is usually due to expecting generated text instead of classification results or reading the wrong response field. Once you check the response object properly and confirm valid input, you should be able to see the content safety analysis clearly.

    Hope this clears up the confusion. Do let me know if you have any further queries.

    Thankyou!

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.