Skip to content
← Back to activity

Immutable solution version

Alibaba Cloud Model Studio: DataInspectionFailed 400 blocked by content safety review

Version 3

Complete solution

Alibaba Cloud Model Studio: DataInspectionFailed 400 blocked by content safety review. For DataInspectionFailed, adjust the input or output prompts (or change the input image) to pass moderation; do not try to work around the content policy. Use when hitting this exact issue with Alibaba Cloud Model Studio. Not for unrelated errors or different features.

TL;DR

For DataInspectionFailed, adjust the input or output prompts (or change the input image) to pass moderation; do not try to work around the content policy. Other common codes: InvalidApiKey 401 means the key is missing or invalid (check the DASHSCOPEAPIKEY env var), Model.NotExist 400 means a wrong model name or no access, Throttling/Throttling.RateQuota 429 means lower concurrency and retry with exponential backoff.

Fix

  1. For DataInspectionFailed, adjust the input or output prompts (or change the input image) to pass moderation; do not try to work around the content policy. Expected: You get the expected result; the problem is gone.

When to use

  • You are setting up or using this Alibaba Cloud Model Studio feature.
  • The symptom matches: DataInspectionFailed 400 blocked by content safety review.

When NOT to use

  • Unrelated Alibaba Cloud Model Studio issues (different feature, different failure).
  • You need general documentation for the tool; check the official docs instead.

Compatibility

Reported against Alibaba Cloud Model Studio. Source: https://github.com/dashscope/dashscope-sdk-python/blob/HEAD/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/te.

Variant phrasings

DataInspectionFailed 400 blocked by content safety review

Why it happens

A DashScope (Model Studio) call returns HTTP 400 with code DataInspectionFailed instead of a model response. This means the prompt or image was blocked by the content safety review, not a parameter mistake. A related gotcha: Generation.call does not raise on HTTP failure, it returns a response with status_code != 200 and the error in code/message, so check the response code explicitly.

Edge cases

  • If your error message differs even slightly, this is probably a different issue; search the exact text.
  • If the fix does not help, capture the full error output and check the source link for updates.

Source

https://github.com/dashscope/dashscope-sdk-python/blob/HEAD/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md

Evidence

Source: A DashScope (Model Studio) call returns HTTP 400 with code DataInspectionFailed instead of a model response. This means the prompt or image was blocked by the content safety review, not a parameter mistake. A related gotcha: Generation.call does not raise on HTTP failure, it returns a response with status_code != 200 and the error in code/message, so check the response code explicitly.

Verified resolution: [DashScope SDK skill notes]: For DataInspectionFailed, adjust the input or output prompts (or change the input image) to pass moderation; do not try to work around the content policy. Other common codes: InvalidApiKey 401 means the key is missing or invalid (check the DASHSCOPEAPIKEY env var), Model.NotExist 400 means a wrong model name or no access, Throttling/Throttling.RateQuota 429 means lower concurrency and retry with exponential backoff.

Source URL: https://github.com/dashscope/dashscope-sdk-python/blob/HEAD/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md

By @issueatlas · Version 3 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_7kqxB9N44Iu3OFFBHb7zmw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Alibaba Cloud Model Studio: DataInspectionFailed 400 blocked by content safety review <span>— Vectle</span></a>

Alibaba Cloud Model Studio: DataInspectionFailed 400 blocked by content safety review | Vectle