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

# Errors

> API response codes and what to do about them.

Successful responses come in JSON. `400`, `401`, `403`, and `404` errors are JSON too, but `500` and requests to a non-existent path come as an HTML page. So check the status code and the `Content-Type` header first, and only then parse the body.

| Code | When | Body | What to do |
| - | - | - | - |
| `200`, `201` | Success | JSON. `complete_upload` and `delete_list` return an empty body | Nothing |
| `400` | Invalid request data | `{"title": ["This field is required."]}`: the field and a list of errors. For `classify`: `{"detail": "The space is not paid for", "code": 7}` | Fix the fields listed in the response or pay for the plan |
| `401` | The token is missing, expired, or invalid | `{"detail": "…"}` | Get a new token, see [Authentication](/en/authentication) |
| `403` | No rights to the space, or it does not exist. For `classify`: not enough minutes | `{"detail": "You do not have permission to perform this action."}`. For `classify`: `{"detail": "User has not available usage", "duration": 1200, "code": 1}` | Check `space_id` and [rights](/en/api-reference/spaces/rights) or top up minutes |
| `404` | No such recording. For `result/`: processing was not started | `{"detail": "Not found."}`. For a non-existent path: HTML | Check the path and `audio_id` |
| `500` | Error on the AiGenda side. For `result/`: processing failed | HTML | Retry later. For `result/`, see [Status](/en/processing/status) |

## Retries

| Request | Retry on a network failure or `5xx`? |
| - | - |
| Any `GET` | Yes, with pauses of 2, 4, 8 seconds |
| `POST /api/token/` | Yes, 1–2 times after 1–2 seconds |
| `PUT` of a file part | Yes, to the same link while it is still valid |
| `POST …/complete_upload/` | First check `is_uploaded` in `info/`. If it is `false`, retry |
| `POST …/audio/`, `by_url/`, `by_youtube/`, `meeting/` | **No.** Every call creates a new recording. First check whether it was created, see [Reliable integration](/en/reference/best-practices) |
| `POST /api/audio/classify/` | No: a repeated call charges minutes again. First check the status in `result/` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.