Skip to main content

Short answer

When the API returns finishReason: NO_IMAGE and parts is null, the model usually processed the request but did not return image content. This does not necessarily mean that the prompt triggered a content-safety block. Prompts such as “What is GEO?” or “Explain this concept” look more like text questions. The model may not be able to confirm that the user explicitly wants an image, so it returns NO_IMAGE. Make the image intent explicit at the beginning of the prompt, then describe the subject, layout, style, and output requirements. Another frequent cause is a prompt that asks the model to write text, such as “produce a design proposal” or “make the analysis thorough.” When the call only allows image output, such a request returns NO_IMAGE some of the time, so the same request may fail and then succeed. See “The prompt asks for written output” below.
If the response has no candidates but contains promptFeedback.blockReason (for example OTHER), that is a different problem: the input was blocked by the provider before generation started. See Why Does Gemini Image Return blockReason: OTHER?

Why does NO_IMAGE happen?

1. The prompt looks like a text question

For example:
This explains a concept, but does not clearly say:
  • what type of image to generate;
  • which elements should appear in the image;
  • how the information should be laid out;
  • whether the response should contain only an image.
Even when the request contains the words “generate an image,” the model may still interpret the overall request as a text explanation.

2. The image intent is not specific enough

Some platform tools automatically prepend instructions such as “Generate an image:”. With a direct API call, however, the request may be transparently forwarded without a complete image-generation instruction being added automatically. Instead of writing only:
State the image type and visual goal directly:

3. The prompt has no visual description

If the prompt only explains a concept, the model does not know how to turn it into a visual composition. Consider specifying:
  • image type: infographic, poster, flowchart, or promotional graphic;
  • layout: three columns, timeline, or radial structure;
  • visual style: technology, business, minimalist, or branded;
  • text hierarchy: title, numbered sections, body copy, and layout;
  • output instruction: generate an image only, without a text explanation.

4. The prompt asks for written output

Gemini image models can also read images and write text. If the prompt contains sentences that ask for written output, the model will sometimes “write the proposal first” instead of generating the image:
Sentences like these suit a text model. When they are sent to an image model with image-only output (responseModalities: ["IMAGE"]), the proposal the model wants to write cannot be returned, so the response becomes finishReason: NO_IMAGE, parts: null, and zero output tokens. We re-ran a real shoe-design request (3 reference images plus a prompt like the one above) in September 2026 (UTC+8) on gemini-3.1-flash-image with responseModalities: ["IMAGE"]: That is why the same request can fail several times in a row and then succeed, even though the route has not changed. The simplest fix is to append a sentence like this to the end of the prompt:
When a reference image contains clearly readable text or third-party marks (for example, brand lettering on a shoe sole), the model is more likely to start by analyzing the material. In the same test, blurring that lettering also brought the request to 0/36.

Different responseModalities settings, different symptoms

The same request with unclear image intent fails differently depending on responseModalities: Troubleshooting tip: resend the failing request a few times without responseModalities and read what the model writes when it does not return an image:
  • A proposal, an analysis, or an image prompt → the image intent is unclear; fix the prompt as described on this page
  • A refusal such as “I can’t generate this” → a content-safety policy was triggered; see Nano Banana image generation failures

Example GEO prompt

You can rewrite the original prompt as follows:
“Generate an image” is only an action hint. It does not replace a description of the visual result. The more clearly you describe the image type, subject, layout, and style, the easier it is for the model to identify the request as image generation.

How to troubleshoot NO_IMAGE

1

Step 1: Identify which field carries the failure

If candidates[0].finishReason is NO_IMAGE, this page applies. If there are no candidates and promptFeedback.blockReason has a value, the input was blocked before generation; see Troubleshooting blockReason: OTHER.
2

Step 2: Check whether the response contains image data

Check parts, inlineData, image, or the equivalent image field in the response. If parts is null, the response usually contains no image content.
3

Step 3: Confirm that the prompt explicitly requests an image

Make sure the prompt contains a clear instruction such as “generate an image,” “create a poster,” or “create an image.” Do not submit only a text question such as “What is…” or “Explain…”. Also look for sentences that ask for written output, such as “produce a proposal,” “analyze in depth,” or “explain your design.” Remove them, or append “output the image only” to the end of the prompt.
4

Step 4: Check content-safety factors next

If the prompt clearly requests an image but still returns NO_IMAGE, check for NSFW content, minors, well-known IP, watermark removal, real-person portraits, or other upstream safety policies.
5

Step 5: Check the call logs

Review the complete response, model name, request ID, and charge record in the call logs. usageMetadata shows that the model processed the request, but it does not prove that an image was generated or that a safety block occurred.

How is NO_IMAGE different from a safety block?

finishReason: NO_IMAGE only means that no image was returned. It does not by itself prove that the prompt violated a policy. Use the complete error, prompt, and call logs together.

Frequently asked questions

No. It only makes the basic intent clearer. Also describe the image type, subject, composition, style, and output requirements. For abstract concepts, explicitly ask for an infographic, poster, or flowchart.
The GEO concept itself does not appear to contain an obvious safety risk. However, NO_IMAGE alone cannot completely rule out an upstream policy decision. In this case, the prompt reads more like a knowledge explanation, so unclear image intent is the more appropriate first check.
In most cases the route has not changed. NO_IMAGE caused by unclear intent is probabilistic: on each request the model chooses between generating an image and writing text first. In our tests, the same request failed about 21% of the time, often several times in a row. Retry NO_IMAGE responses automatically 1–2 times in your client, and fix the prompt to remove the root cause.
usageMetadata only shows that the model processed the input and produced reasoning or text tokens. It does not mean that the response contains an image. Check the image data fields in the response.
Do not determine billing from NO_IMAGE alone. Check the APIYI call logs to confirm whether the request created a charge record.

Still stuck? Contact support

If the request still returns NO_IMAGE after you make the image intent explicit, contact APIYI support and include:
  • Model name and token group;
  • Complete error message and request ID;
  • Redacted prompt;
  • Time of occurrence;
  • Charge record from the call logs.
Never send a complete API key. Redact the key before sharing screenshots or logs.

WeCom Support

WeCom support QR codeScan the QR code, or click this card to contact support directly.

Email Support

Support: support@apiyi.comWe recommend including “NO_IMAGE” and the model name in the subject.

Why Does Gemini Image Return blockReason: OTHER?

How to find the blocked input image and preprocess reference images

Nano Banana image generation failures

Common causes including safety, watermark removal, well-known IP, and minors

How can I troubleshoot model API errors?

General guidance for 401, 429, 503, 504, timeout, and group issues

How do I read billing amounts in the logs?

Use call logs to confirm whether a request succeeded and was charged