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

# Limits & Error Codes

> Review file size limits, recording duration ceilings, rate limits, and complete HTTP error codes for API v1.

## Technical limits

Paid HearDraft plans do not impose cumulative monthly minute caps. Instead, API requests are governed by clear per-request and per-workspace technical limits:

| Limit | Value | Notes |
| - | - | - |
| **Max file size** | **100 MB** | Enforced via `Content-Length` (`413 INVALID_FILE_SIZE`) |
| **Max recording duration** | **10 hours** | Applies to active paid plans |
| **Workspace rate limit** | **120 requests / minute** | Shared across `POST` and `GET` calls for the workspace |
| **Filename length** | **160 characters** | Must end with a supported audio or video extension |
| **Retention** | **No 3-day expiry** | Active paid uploads remain in your workspace |

### Supported upload extensions & media types

Pass a standard audio or video `Content-Type` (such as `audio/wav`, `audio/mpeg`, `audio/mp4`, `audio/ogg`, `audio/flac`, `video/mp4`, `video/quicktime`, `video/webm`) or `application/octet-stream`, paired with a filename using a supported extension (`.mp3`, `.m4a`, `.wav`, `.aac`, `.flac`, `.ogg`, `.opus`, `.mp4`, `.mov`, `.webm`, `.mkv`). The file must contain an audible speech track.

## Error response format

All error responses return JSON with a machine-readable `code` and human-readable `message`:

```json theme={null}
{
  "error": {
    "code": "INVALID_FILE_SIZE",
    "message": "Use a file up to 100 MB."
  }
}
```

## Complete error code reference

| HTTP | Error code | Meaning | Recommended action |
| - | - | - | - |
| `400` | `INVALID_IDEMPOTENCY_KEY` | Header missing or does not match `^[A-Za-z0-9._-]{8,128}$` | Send a valid key between 8 and 128 characters |
| `400` | `INVALID_FILENAME` | Missing filename, illegal path chars, >160 chars, or unsupported extension | Supply a clean filename with a supported media extension |
| `400` | `INVALID_LANGUAGE` | Language query value is not supported | Use `auto` or a supported ISO language code |
| `401` | `UNAUTHORIZED` | Missing, malformed, or revoked Bearer key | Verify `HEARDRAFT_API_KEY` or create a new key |
| `403` | `FORBIDDEN` | Active annual plan required or API disabled for workspace | Confirm active Starter Annual or Team Annual subscription |
| `404` | `TASK_NOT_FOUND` | Unknown task UUID, wrong workspace, or expired task | Verify task ID and owning workspace key |
| `409` | `IDEMPOTENCY_CONFLICT` | `Idempotency-Key` was already used with different file metadata | Generate a new `Idempotency-Key` for the new file |
| `409` | `UPLOAD_IN_PROGRESS` | Another request with the same key is still streaming | Wait briefly and retry with the same key |
| `411` | `LENGTH_REQUIRED` | Missing or non-numeric `Content-Length` header | Send exact payload byte length in `Content-Length` |
| `413` | `INVALID_FILE_SIZE` | Payload is empty or exceeds 100 MB | Compress or split the recording under 100 MB |
| `415` | `UNSUPPORTED_MEDIA_TYPE` | `Content-Type` is not `audio/*`, `video/*`, or `application/octet-stream` | Set an appropriate media MIME type |
| `429` | `RATE_LIMITED` | Exceeded 120 requests/minute per workspace | Slow polling cadence and retry with backoff |
| `503` | `QUEUE_UNAVAILABLE` / `TASK_UNAVAILABLE` | Transcription queue is temporarily paused or busy | Retry with backoff using the same `Idempotency-Key` |
| `200` (job `failed`) | `TRANSCRIPTION_FAILED` | Worker could not finish transcription (e.g., silent or corrupt media) | Inspect source audio track and resubmit with a fresh key |


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