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.

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.

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: 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.
2

Step 2: 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…”.
3

Step 3: 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.
4

Step 4: 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.
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

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

Email Support

Support: [email protected]We recommend including “NO_IMAGE” and the model name in the subject.

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