> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamlayer.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Error codes

> Handle managed API errors by category without relying on private implementation details.

# Error codes

| HTTP  | Meaning                                | Client action                        |
| ----- | -------------------------------------- | ------------------------------------ |
| `400` | Invalid closed request                 | Fix the documented request fields    |
| `401` | Missing, invalid, or revoked key       | Replace the key                      |
| `402` | Insufficient live credits              | Add credits or switch to a test key  |
| `404` | Owned resource not found               | Check the opaque ID and account      |
| `409` | Idempotency or state conflict          | Read canonical state before retrying |
| `413` | Input exceeds a published limit        | Resize or recompress the image       |
| `422` | Valid syntax but unsupported operation | Use a supported V1 request           |
| `429` | Key, account, or concurrency limit     | Back off and honor response metadata |
| `503` | Managed execution is disabled          | Stop submitting and check status     |

## Sanitized generation failure

```json theme={null}
{
  "code": "generation_failed",
  "message": "Image generation failed."
}
```

Public errors do not include provider, model, routing, fallback, private cost, or hidden reasoning.
