Skip to content

Image generation failures

Image generation can fail even when the request format is valid. Most failures come from provider safety rules, unsupported prompt goals, reference image issues, temporary capacity, or rate limits. Pixapi keeps the API response, task state, and credit ledger aligned so your product can show a clear next step.

Quick triage

What you seeLikely causeNext action
Safety or policy wordingPrompt or reference image triggered provider safety checksRemove restricted content, simplify the prompt, and retry with a safer description.
No image or text-only outputThe model responded without an image partInspect response parts, requested modality, prompt complexity, and model support.
Timeout, 503, or provider unavailableTemporary provider capacity or network issueRetry with bounded backoff and keep the same payload for one verification request.
Upload or reference-image errorUnsupported format, large file, corrupted file, or inaccessible URLUse PNG, JPEG, or WebP, keep files small, and make sure URLs are reachable by Pixapi.
429 or rate-limit wordingAccount, model, or provider-side rate pressureBack off with jitter and queue non-urgent jobs instead of retrying in a tight loop.
insufficient_creditsBalance was too low before generation startedAsk the user to top up credits; this is not a generation failure refund case.

Common causes

Safety and restricted content

Image providers may block prompts or reference images involving explicit sexual content, graphic violence, hate or harassment, self-harm, illegal activity, or inappropriate minor-related content. These rules can apply during generation, not only during request validation.

Watermark removal and copyrighted material

Requests to remove watermarks, reproduce protected characters, copy famous IP, or imitate public figures can be rejected or return no usable image. Reframe the request around an original concept, licensed assets, or a general visual style.

Prompt complexity

Very long prompts, conflicting instructions, dense text requirements, or too many subjects can make the model produce text-only output, partial output, or no image. Reduce the request to the main subject, style, composition, and output requirements before adding detail back.

Reference image problems

Image editing and image-to-image requests depend on the input asset. Check that the image URL is reachable, the file is not corrupted, and the format is supported. If a signed URL expires quickly, upload the image again or use a longer-lived URL.

Temporary provider issues

Provider capacity, rate limits, and upstream timeouts can happen intermittently. For production apps, retry only a small number of times with exponential backoff and jitter. Keep the same model, payload, and reference image for one retest so the diagnostic signal stays clean.

Refunded credits

If credits were consumed or reserved but the image generation job fails before a billable output is delivered, Pixapi returns the affected credits to your account. The credit ledger shows these rows as Refunded.

Open Credits to review refunded credit rows. A refunded row means your balance was restored; it does not mean the original prompt will succeed unchanged.

What to log before contacting support

Include the request id or task id, model id, timestamp, sanitized prompt, input image format and size, response error code, and whether credits were refunded. This lets support distinguish policy blocks, payload issues, provider downtime, and billing reconciliation quickly.