# Errors and limits

> Handle Raywake API errors, permission failures, insufficient funds and rate limits. Learn status codes and when to retry a request.

Canonical: https://raywake.si/docs/errors
Last updated: 2026-10-13

Errors return a JSON body with a readable `detail` message.

Error body:

```
{ "detail": "quote_id is required for customer generations" }
```

**HTTP status codes**

| Name | Type | Description |
| --- | --- | --- |
| `400` | Bad request | Invalid input, missing fields, or an input that cannot be priced. |
| `401` | Unauthorized | Missing or invalid API key. |
| `402` | Payment required | Not enough available funds for the quote. Top up and retry. |
| `403` | Forbidden | The key lacks the permission this endpoint needs. |
| `404` | Not found | Unknown model or job, or a job owned by another account. |
| `409` | Conflict | The quote expired or no longer matches the input, or the Idempotency-Key was used for a different request. |
| `429` | Too many requests | A usage limit was reached. Wait for `Retry-After` seconds; `X-Limit-Reason` names the limit. |
| `503` | Unavailable | A dependency is temporarily unavailable. Retry with backoff. |

## Limits

Accounts have limits on concurrent generations and daily spend to protect you from runaway usage. During the preview the limits are deliberately low; contact us if you need more.

## Your own spending limits

You can set limits on the [Alerts](https://raywake.si/alerts) page, per hour or per 24 hours. A generation that would pass one returns `429` with `X-Limit-Reason: spend_limit` and a `Retry-After` for when enough spending has left the window. Limits cover the studio and every API key, and can only be changed from the studio.

[API reference](https://raywake.si/docs/reference/models)

## Related

- [API documentation](https://raywake.si/docs)
