Safety3 min read

GPT Image 2 Safety and Content Policy in Practice

What the model refuses, how fal.ai surfaces policy errors, and a clean pattern for handling them in production without retry loops that get you rate limited.


Every production pipeline eventually hits a content policy refusal. Handling it clean is the difference between a support ticket and a 429. Here is how GPT Image 2 refusals look on fal.ai and how to wire the error path.

Categories the model refuses

  • Sexual content involving minors (hard block).
  • Realistic violence against named individuals (hard block).
  • Celebrity likeness without a consent reference (hard block on public figures).
  • Trademarked IP (soft block on major brand IP, negotiable with explicit derivative intent).
  • Self-harm depictions with how-to detail (hard block).
  • Hateful imagery targeting protected groups (hard block).

The error shape

A refusal returns HTTP 400 with a structured body:

example.jsonJSON
1{
2 "detail": {
3 "error": "content_policy_violation",
4 "category": "celebrity_likeness",
5 "message": "The prompt requests a likeness of a specific public figure. Provide a consent reference or adjust the prompt."
6 }
7}

Your error handler should log the category, surface a human-readable message to the user, and not retry. Retrying a policy block is the fastest way to get a rate limit.

The clean handler

example.tsTS
1try {
2 const res = await fal.subscribe("fal-ai/gpt-image-2", { input });
3 return res.data.images[0].url;
4} catch (err) {
5 const body = (err as any)?.body;
6 if (body?.detail?.error === "content_policy_violation") {
7 await logPolicyEvent(body.detail.category, input.prompt);
8 throw new UserFacingError(body.detail.message);
9 }
10 throw err;
11}

Pre-filtering prompts

For user-generated prompts, run a quick moderation pass before calling the image endpoint. OpenAI and Anthropic both expose cheap moderation APIs. Catch the refusal server-side and you avoid the unnecessary billable call.

A flowchart showing the refusal path with logging and user feedback
A flowchart showing the refusal path with logging and user feedback

Also reading