Overview

Image generation requests can fail even when the API call is correctly formed. The most common causes are model safety policies, reference image issues, temporary upstream instability, or incompatible request parameters.

This page explains the common categories so you can adjust the request and retry.

Common reasons

Safety or NSFW restrictions

Gemini and GPT Image models apply official safety policies before returning generated images. Requests may be rejected or return no image when the prompt or reference image involves adult content, violence, hate, minors, public figures, copyrighted characters, or similar high-risk material.

Reference image issues

Image editing can fail when the reference image URL is unavailable, the image format is invalid, the resolution is too low, the subject is unclear, or the image itself triggers safety review.

Temporary upstream instability

Official model providers may experience capacity pressure, timeouts, rate limits, or short outages. In these cases, retrying later may succeed without changing your request.

Parameter or model mismatch

Some sizes, quality levels, image counts, or edit modes are only supported by specific models. Incompatible parameters can cause the request to be rejected before generation completes.

How to improve success rate

  • Make the prompt specific but neutral. Describe scene, composition, materials, lighting, and style.
  • Avoid explicit, harmful, provocative, or policy-evasion wording.
  • Use clear, publicly accessible, safe reference images.
  • If multi-image editing fails, try one reference image first.
  • Try another model or retry after a few minutes if the upstream service is unstable.

Credits

Credit handling depends on the type of failure and the product route used for the request. Check your credit records for the final transaction status.