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

# Errors

> Standard error codes and HTTP status codes returned by the VoiceLab360 API.

# Errors

The VoiceLab360 API uses standard HTTP status codes. All error responses return a JSON body with a consistent structure.

## Error response format

```json theme={null}
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The voice_id field is required.",
    "status": 400
  }
}
```

## Status codes

| HTTP Status | Meaning                                            |
| ----------- | -------------------------------------------------- |
| `200`       | Success                                            |
| `400`       | Bad request — invalid parameters                   |
| `401`       | Unauthorized — missing or invalid API key          |
| `402`       | Insufficient credits                               |
| `403`       | Forbidden — key revoked or plan restriction        |
| `404`       | Resource not found                                 |
| `422`       | Unprocessable — valid format but failed validation |
| `429`       | Rate limit exceeded                                |
| `500`       | Internal server error                              |
| `503`       | Service temporarily unavailable                    |

## Error codes

| Code                   | Status | Description                                           |
| ---------------------- | ------ | ----------------------------------------------------- |
| `UNAUTHORIZED`         | 401    | No valid API key provided                             |
| `FORBIDDEN`            | 403    | Key is valid but access is denied                     |
| `INSUFFICIENT_CREDITS` | 402    | Not enough credits to complete this request           |
| `RATE_LIMIT_EXCEEDED`  | 429    | Too many requests in the current window               |
| `INVALID_REQUEST`      | 400    | Missing or invalid request parameters                 |
| `RESOURCE_NOT_FOUND`   | 404    | The requested resource does not exist                 |
| `VALIDATION_ERROR`     | 422    | Request format is valid but content failed validation |
| `SERVICE_UNAVAILABLE`  | 503    | Endpoint is temporarily offline                       |
| `INTERNAL_ERROR`       | 500    | Unexpected server error                               |

## Retry guidance

Retry `500` and `503` errors with exponential backoff. Do not retry `400`, `401`, `402`, `403`, or `422` errors — these require a fix before retrying.
