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

# Errors

> HTTP status codes and troubleshooting.

All errors return JSON with an `error` object:

```json theme={null}
{
  "error": {
    "code": "insufficient_balance",
    "message": "Not enough balance for this generation"
  }
}
```

## Status codes

| Status | Meaning                    |
| ------ | -------------------------- |
| `400`  | Invalid request parameters |
| `401`  | Missing or invalid API key |
| `402`  | Insufficient balance       |
| `404`  | Generation not found       |
| `409`  | Idempotency conflict       |
| `502`  | Generation failed          |

## Common fixes

<AccordionGroup>
  <Accordion title="401 Unauthorized">
    Use an API key from your dashboard (`ak_...`). Create a new key if needed.
  </Accordion>

  <Accordion title="402 Payment Required">
    Add balance on the [pricing page](https://seedanceapi.us/pricing). Check your balance with `GET /v1/credits`.
  </Accordion>

  <Accordion title="502 Generation failed">
    Generation failed. Retry the request, or try a different model or shorter duration.
  </Accordion>
</AccordionGroup>
