Image API returned no image? Declined requests explained
A declined request has no image. See how it looks in the API response, what the failure code tells you, and how to reword a harmless prompt that was misread.
Rendergrid editorsAbout the editors
In brief
When a request is declined under the content rules, the task ends as failed and there is no image. failure.type is declined, and the charge goes back to your balance. Read failure.code, change the prompt or the reference image, then send a new request with a new idempotency key. The same request gives the same result.
The three images in this article come from plain prompts that finished on the first attempt. A declined request leaves nothing to show.
Why does a request sometimes end without an image?
A request is accepted before its content is judged. So a decline is not an HTTP error: the API responds with 202, and the task later ends as failed with failure.code: content_policy.
Every declined task ends as failed, with no image. Three of the declined codes are:
content_policy: the prompt or the reference image was declined under the content rules.source_image_rejected: the source image was declined.no_image_output: the model responded with text, for example by describing the image in words, or the prompt refers to an image that was not attached.
The cause is in the request itself. A declined request is a failed one, and the success rate Rendergrid shows leaves it out.
What does a declined request look like in the API?
You get two responses. Submitting returns 202 with the task id and the cost. Then GET /creations/{id} returns 200 with status: "failed", an error string, and a failure object: the outcome of the task, not a problem with the status request. Poll no more often than once every 5 seconds, and stop at completed or failed.
CREATION_ID="5b0214ae-9e39-460a-820a-f6ae3e24400b" # the ID from the 202 response curl --fail-with-body --max-time 20 \ "https://api.rendergrid.io/ api/ public/ v1/ creations/ $CREATION_ID" \ -H "Authorization: Bearer $RENDERGRID_API_KEY"
import os import requests API = "https://api.rendergrid.io/ api/ public/ v1" creation_id = "5b0214ae-9e39-460a-820a-f6ae3e24400b" # the ID from the 202 response key = os.environ["RENDERGRID_API_KEY"] response = requests.get( f"{API}/creations/{creation_id}", headers={"Authorization": f"Bearer {key}"}, timeout=(5, 20), ) response.raise_for_status() creation = response.json() if creation["status"] == "failed": failure = creation.get("failure") or {} print(failure.get("type"), failure.get("code"), failure.get("retryable"))
// Node.js 22+, .mjs file const API = "https://api.rendergrid.io/ api/ public/ v1"; const id = "5b0214ae-9e39-460a-820a-f6ae3e24400b"; // the ID from the 202 response const response = await fetch(`${API}/creations/${id}`, { headers: { Authorization: `Bearer ${process.env.RENDERGRID_API_KEY}` }, signal: AbortSignal.timeout(20_000), }); if (!response.ok) throw new Error(`HTTP ${response.status}`); const creation = await response.json(); if (creation.status === "failed") { const { type, code, retryable } = creation.failure ?? {}; console.log(type, code, retryable); }
{
"id": "5b0214ae-9e39-460a-820a-f6ae3e24400b",
"status": "queued",
"task_id": "5b0214ae-9e39-460a-820a-f6ae3e24400b",
"cost": 0.02
}
{
"id": "5b0214ae-9e39-460a-820a-f6ae3e24400b",
"status": "failed",
"error": "The image or prompt was rejected by the safety filter. Try a different image or rephrase the prompt.",
"failure": {
"type": "declined",
"code": "content_policy",
"retryable": false
}
}
failure.type says whose move it is. With declined, change the request. With error, the cause is on the service side, and you can try again, as a new request with a new key, when retryable is not false. Build your logic on failure.type and failure.code: the error text is for display, and its wording may change.
Do you pay for a declined request?
No. A failed request is free: the charge is taken when the request is accepted, and the amount goes straight back to your balance, for the declined type and the error type alike. You can see the charge and the refund in the transaction history in the portal. Failed request refund explains how it works.
A new attempt is a new request. Repeating the old key does not restart a failed task, so use a new idempotency key. The attempt is paid for as usual and refunded if it fails too.
How do you reword a harmless prompt that was declined?
If you are sure the prompt is harmless, you still change it before you send again: the same request gives the same result.
Read the code. For
content_policy, change the prompt or the reference image. Forno_image_output, describe the image you want, or attach the source image the prompt refers to.Say what is in the image. Name the objects, the setting, the light, and the framing in concrete words, and replace a word that can be read two ways with the thing you mean.
Send a new request. Use a new idempotency key. If it is declined again, the charge comes back to your balance again.
The three images below come from prompts written like this. Each names its objects, its setting, its light, and its framing, and excludes lettering, logos, people, and watermarks. All three finished on the first attempt.
The prompt for this image
Three oranges sit in a plain white ceramic bowl on a pale table, one slightly above the other two. Soft daylight from the left reveals peel texture against a quiet neutral background. Center the entire bowl, leave open margins and add no other objects. No lettering, logos, people, or watermarks.
Nano Banana 2.1
nano-banana-2.1 · 1K · 1:1 · $0.02
Nano Banana 2.1, 1K, 1:1, one attempt. A white ceramic bowl of oranges stands on a pale wooden table with a quiet light wall behind it. The shadow falls to the right of the bowl, which fits the soft light from the left that the prompt asked for. The bowl is centered left to right but sits below the middle of the frame: the bowl with its oranges about 6% of the frame’s height below it, and the bowl alone about 11%, a departure from the prompt’s “Center the entire bowl”. The margins are open on every side. The prompt asked for three oranges, but a fourth is partly visible behind the front two, so the count is wrong. No lettering, logos, or people appear. This is a finished image, not a declined one.
The prompt for this image
Put three daisies in a small clear glass vase against cream. Their stems show through the water and the petals remain visually distinct. Diffuse light casts a light shadow to the right. Fit the vase and every flower into a spacious square frame. No lettering, logos, people, or watermarks.
Nano Banana 2.1
nano-banana-2.1 · 1K · 1:1 · $0.02
Nano Banana 2.1, 1K, 1:1, one attempt. Three white daisies with yellow-orange centers stand in a small clear glass jar about half full of water, with a cream wall behind it and a cream surface under it. The stems show through the glass and the water. A soft shadow falls to the right of the jar, as the prompt asked. The jar and all three flowers sit inside the frame with open margins. No lettering, logos, or people appear.
The prompt for this image
Stack two closed clothbound books with blank covers and spines on light gray, beside a wooden sphere. View from slightly above under soft light so cloth weave and wood grain remain distinct. Keep all objects centrally placed and fully inside the frame. No lettering, logos, people, or watermarks.
Nano Banana 2.1
nano-banana-2.1 · 1K · 1:1 · $0.02
Nano Banana 2.1, 1K, 1:1, one attempt. A navy clothbound book rests on a green one, slightly offset, on a light gray surface, and a wooden sphere with visible grain sits beside them. The view is from a high angle, steeper than the slight angle from above the prompt asked for: the surface fills the whole frame. The weave of the cloth covers can be seen. No lettering appears on the books, as the prompt asked, and no logos or people appear. The books and the sphere sit inside the frame with open margins, the group centered and the sphere at its right end.
Where does this advice not fit?
- Rewording is not a guarantee. A reworded prompt can be declined again. This article gives no way around the content rules.
- The response gives a code, not a cause.
content_policydoes not say which words in the prompt were the reason. - Three images are a sample. They say nothing about how often a prompt is declined. A finished image is not always an exact one: the first has four oranges where the prompt asked for three.
- A
400is something else. The request itself is invalid, for example an empty prompt, and nothing is charged: see Error codes.
A failed request is free
Try your reworded prompt
Run the new wording on Nano Banana 2.1 in the playground.
Try Nano Banana 2.1Questions and answers
Why did my request return no image?
failed. Check failure.type and failure.code: declined means the request was declined, for example under the content rules (content_policy), or the model responded with text (no_image_output); error means a failure on the service side.Do I pay for a declined request?
Can I send the same prompt again?
Can I rely on the error text?
failure.type and failure.code.Sources
- Error codesThe failure types, their codes, and what to do.
- Tasks and statusesThe
failedstatus and thefailureobject. - IdempotencyWhy a new attempt after
failedneeds a new key. - Create an imageThe request, the
202response, and the charge. - Failed request refundHow the charge and the refund work.
- Images in this articleThree prompts, Nano Banana 2.1, 1K, 1:1, one attempt each.





