> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apiyi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Can an image be rejected after generation?

> Learn why 451 image_safety can occur after an image is generated, with an anonymized controlled retest and practical clothing-prompt fixes.

## Short answer

Yes. An image API may finish generation and then review the output image for content safety. If the image fails that review, the API does not return it. This is called **post-generation review** or **output-side review**; it does not necessarily mean that the prompt or reference image contains explicitly prohibited content.

Start with output-side troubleshooting when the response contains information like this:

```json theme={null}
{
  "error": {
    "code": "image_safety",
    "message": "The generated image was filtered by the safety policy."
  }
}
```

In tests with `gpt-image-2.5-sunburst-vip`, this error was returned as HTTP 451.

## How to identify output-side review

Read the error message first, then consider the request behavior:

| Signal | Common indication of output-side review |
| - | - |
| Error message | Explicitly mentions "generated image", `output`, or image safety filtering |
| Response time | The request spends time generating instead of failing immediately like a parameter error |
| Result after a change | Adjusting visual constraints such as clothing, pose, or composition changes a failure into a success |

> [!NOTE]
>
> **The error message is more reliable than latency.** Generation time varies across models and routes, and the latency ranges for successful and failed requests can overlap. Elapsed time alone cannot establish the review stage. Without internal upstream review logs, do not claim to know the exact safety category that was triggered.

## An anonymized controlled retest

The test used a person reference image to create a character sheet containing a facial close-up plus full-body front, side, and back views against a white studio background. Only test variables and outcomes are shown:

| Test combination | Result | Elapsed time |
| - | - | - |
| Original prompt + original reference image | 3/3 returned 451 `image_safety` | 81.8–95.9 seconds |
| Same reference image with a neutral, fully clothed half-body portrait prompt | 1/1 succeeded | 35.7 seconds |
| Original prompt without the reference image, using the text-to-image endpoint | 1/1 succeeded | 29.1 seconds |
| Original prompt plus only “fully clothed, opaque, non-sexualized, and non-explicit” | 1/1 returned 451 | 216.8 seconds |
| Original prompt plus a clearly specified adult subject, turtleneck, trousers, and sneakers | 3/3 succeeded | 65.1–238.6 seconds |

The same reference image succeeded with a neutral prompt, and the original prompt succeeded without the reference. Neither input is therefore necessarily blocked on its own. The results instead support the interpretation that **the generated image crossed a safety threshold when the reference person's features were combined with the full-body multi-view requirement**. They do not establish that the reference image is prohibited or that any single word is the trigger.

Removing the reference also changed the input and endpoint, so that comparison is only supporting evidence. During troubleshooting, keep the model, endpoint, reference image, and parameters unchanged, and alter only one prompt variable at a time.

## How to resolve it

**1. Describe the desired image precisely**

For people, do not rely only on phrases such as “non-sexual” or “non-explicit.” Describe the clothing and image you want. For example:

```text theme={null}
The same adult woman wearing a loose, opaque beige turtleneck, dark trousers, and sneakers, with no sexualized or exposed presentation.
```

The useful part is the positive description of the top, trousers, and shoes; negative wording is only a supplement.

**2. Change one variable at a time**

Keep the model, reference image, and other parameters unchanged, and adjust only one clothing or composition phrase. Otherwise, a successful result will not show which change worked.

**3. Repeat the successful variant 2 to 3 times**

Output-side review can vary because each generated image is different. One success does not prove that a variant is reliable. If the original combination fails repeatedly, avoid resubmitting it unchanged; adjust it first and then run regression checks.

> [!TIP]
>
> Explicit clothing may change the character design. If a particular outfit must be preserved, describe its style, material, coverage, and coordinating pieces, then rerun the test instead of only saying “match the reference outfit.”

## Common questions

> [accordion] If the reference works on its own, is it guaranteed to pass review?
>
> No. The reference may pass input processing, while an image generated from it—such as a full-body or multi-view composition—can still trigger output-side filtering.

> [accordion] Why did adding “non-explicit” still fail?
>
> Negative wording does not tell the model precisely what to draw. The model may still improvise, especially when the reference shows only part of an outfit. A complete, concrete description of everyday clothing is more effective.

> [accordion] Does output-side review mean the prompt is problematic?
>
> Not necessarily. Output-side review evaluates the generated image. Even without explicitly prohibited text, the rendered person, clothing, pose, or composition can still be filtered.

## Related documentation

* [Content safety troubleshooting: use word ablation to find triggers](https://docs.apiyi.com/en/api-capabilities/image-safety-troubleshooting.md)
* [How to generate satisfying images](https://docs.apiyi.com/en/api-capabilities/image-generation-success-tips.md)
* [GPT-Image-2 image editing](https://docs.apiyi.com/en/api-capabilities/gpt-image-2/image-edit.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.