
In short: an image can fail at two moments. Right at the request, with an error and a code; then nothing is reserved or charged. Or during the generation, with the failed status; then nothing is charged and the reserved credits go back to your balance on their own. In neither case do you need to ask for a refund.
It failed right at the request
POST /v1/media/generations answers with an error instead of 202. The code is in error.code:
| Status and code | What it means | What to do |
| 402 insufficient_credits | The balance does not cover the reservation. details.required and details.balance say how much you need and how much you have. | Buy credits, or choose a cheaper model or options. |
| 403 insufficient_scope | The key does not have ai:write. | Create a key with ai:read and ai:write. |
| 404 model_not_found | The id is wrong or the model is not an image model (a text model, for example). | Copy the id from the Models tab. |
| 422 validation_failed | A required field is missing or a value is not one of the model's options. | See details and the fields in GET /v1/models/{id}. |
| 429 rate_limited | Too many requests in the same minute. | Wait the seconds in Retry-After. |
| 502 upstream_error | The AI service did not respond as expected. | Try again shortly, or with another model. |
It failed during the generation
The request was accepted (202), but the status check returns failed:
curl "https://api.mozout.com/v1/media/generations/<id>" \
-H "Authorization: Bearer $MOZOUT_API_KEY"
| Field | With failed |
| status | failed |
| error | The reason, in plain language. |
| outputs | No files. |
| credits_charged | 0: nothing was charged and the reservation went back to your balance. |
Checking that the credits came back
See your balance with GET /v1/ai/balance, with aio balance or on the All in One AI page:
curl "https://api.mozout.com/v1/ai/balance" -H "Authorization: Bearer $MOZOUT_API_KEY"
The same goes for the MCP server and for aio: a generation that fails costs nothing.
Trying again
|
|
|
If the error is not clear, open a support ticket with the error's correlation_id (or the generation id) and the time. Never send the key.
| For a video or a voice, the statuses are the same: see an AI video or voice is taking long or has failed. |
|
Want to check your balance after a failure? It is on the All in One AI page. See All in One AI |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon) See plans |











