Skip to content

Troubleshooting ​

This page covers common Gemini image-generation issues. See Gemini error handling for details.

What Should I Do If Requests Are Very Slow? ​

Very slow requests are most likely caused by the network connection. The primary node is located in North America. Prefer a server in North America, or call from a network with fast connectivity to North America.

If a suitable network environment is unavailable, switch the API endpoint from https://api.llmnex.com to the Hong Kong acceleration endpoint, https://hk.llmnex.com. Change only the hostname; keep the existing API path unchanged.

Hong Kong endpoint concurrency limit

The Hong Kong acceleration endpoint cannot handle high concurrency. Do not move high-concurrency workloads directly to this endpoint. For high-concurrency support or further assistance, contact support at contact@llmnex.com.

Requests Keep Waiting or Time Out ​

Image generation can take time. Recommended client timeouts:

ScenarioClient timeout
Gemini image generation300 seconds
Gemini 4K over a slow connection600 seconds recommended

Server generation time excludes image download. Historical Gemini 4K base64 response samples were about 25–28 MB; actual sizes vary by model and image content. Check client and proxy response-body limits as well.

Should I Retry Automatically? ​

The service already handles retries and account rotation internally. Avoid aggressive client-side retry loops.

  • 401: check that the key is valid and the authentication header is correct.
  • 429: back off for 2–5 seconds and retry once; avoid retry loops.
  • 500: retry once after a short delay; contact the service provider if the error persists.
  • 503: inspect the error message first. Fix model-name or permission issues before retrying. For other upstream connection problems, retry once after backoff.
  • 400: check the Gemini request body; do not repeat it unchanged.
  • 451: content was blocked by safety checks. Change the prompt or reference image; do not repeat the request unchanged.

Why Doesn't Streaming Return Images Earlier? ​

Historical IMAGE streaming behavior sends only the final image after generation, with no intermediate images and no usage statistics from the non-streaming response. This has not been rechecked for every model. It does not describe fast initial TEXT responses or establish Nano Banana 2.1 behavior.

Use non-streaming requests where possible. See Gemini streaming.

Why Does Pro Return Text Instead of an Image? ​

The backend supports TEXT mode for fast initial text responses. To generate images, generationConfig.responseModalities must explicitly include "IMAGE"; use ["IMAGE"]. If omitted or set to TEXT only, Pro models may generate text. Asking for an image in the prompt is not a substitute for this parameter. See Gemini quick start.

Why Didn't a Parameter Take Effect? ​

Historical documentation lists official parameters that were accepted but had no effect. These have not been revalidated for every model. Do not rely on their effects or on automatic fallback for invalid values. The -c suffix identifies billing mode, not a fixed resolution. An official SDK's parameter list alone does not establish this service's capabilities.

Why Have Model Names and Billing Changed? ​

Only Gemini models are currently supported. Old fixed-resolution-suffix models have been retired. Models with -c use per-request billing; models without -c use token-based billing. List available models before updating the full name in your requests. Do not automatically switch billing modes.

What Should I Include in an Issue Report? ​

Keep the X-Oneapi-Request-Id response header. Include the upstream job ID if present.

  • Gemini: responseId and upstreamJobId.

Never disclose your API key in an issue report.

LLMNEX · Model Integration Guide