Over-blocking: PROHIBITED_CONTENT on a benign clothing-completion edit (gemini-3.1-flash-image)

▎ Over-blocking: PROHIBITED_CONTENT on a benign clothing-completion edit (gemini-3.1-flash-image)
▎ We build a layer-separation tool for illustrators (PSD export for Live2D). For one layer of a fully clothed anime-style character (a samurai outfit: kimono, armour, thigh-high leather boots), we send the scene crop plus that layer alone on white, and ask the model to redraw the same part with the occluded area completed (e.g. “a right thigh with boot”, plus a neutral costume description).
▎ - Sleeve and chest layers from the same image: generated normally.
▎ - Right thigh layer: finish_reason=PROHIBITED_CONTENT, no image, on repeated tries and with several neutral costume-design wordings (it passed once in two tries after neutral rewording).
▎ - google/nano-banana-2 on Replicate blocks the same input (E005) at its default safety level.
▎
▎ Nothing in the request is sexual and the character is clothed. The block appears to fire on the body-part noun (“thigh”) together with a leg crop. We can share the request structure and response metadata privately.

Environment

  • SDK: google-genai 1.60.0 (Python 3.11, Windows), direct Gemini API with an API key (not Vertex AI)
  • Model: gemini-3.1-flash-image
  • Date observed: 2026-10-03

Request

  • Call: client.models.generate_content(model=“gemini-3.1-flash-image”, contents=[prompt, image1, image2],
    config=types.GenerateContentConfig(response_modalities=[“IMAGE”, “TEXT”]))
  • image1: a crop of the illustration around the part (the scene, for context)
  • image2: the same crop with only the target layer kept on a plain white background
  • prompt (summary): “Image 2 shows one part of the character from image 1, a right thigh with boot.
    Redraw image 2 at the same position and scale, completing the areas hidden behind other parts,
    and draw nothing else on a white background.” Plus a short neutral costume description
    (colours and materials of the leg covering, boot, strap and buckle).
  • No safety_settings were passed (API defaults).

Response

  • No image part returned (candidates[0].content.parts was empty)
  • finish_reason=PROHIBITED_CONTENT, no prompt_feedback.block_reason
  • Same result on a second try with identical input
  • With the description rewritten in neutral costume-design wording: 1 of 2 tries produced an image
  • Two other layers of the same illustration (a sleeve and the chest area of a kimono), sent with the
    same structure, were generated normally every time
  • The same input to google/nano-banana-2 on Replicate is also refused at its default safety level (E005)

Hello @SPLIT_ANY,

PROHIBITED_CONTENT is returned by built-in core harm protections that remain active regardless of safetySettings (Safety filters).

Please try the below steps:

  • Test the request with gemini-nano-banana-2.1, or refer to the layer by the clothing item in the prompt (for example, "the right boot and leg covering" instead of "a right thigh with boot").
  • If the issue persists, please share the exact prompt text along with the image1 and image2 input images (via direct message if you prefer to share them privately) so that we can forward the request to relevant teams.

Thanks for the pointers. Naming the layer by the clothing item matches what we found: we now describe body-part layers by what they wear (e.g. “the thigh-high boot on the right leg”) and keep the wording neutral, and the same benign input has not been refused since. We also tried gemini-nano-banana-2.1 on the same inputs: it returned IMAGE_SAFETY on one of them too, and with either model the outcome varies from run to run for an identical request. We’ll keep the current model with the clothing-first wording for now. If it helps your teams, we can share a reproduction using our own test illustration by DM.