---
title: "Platform limits and error codes — Context Infrastructure"
canonical: "https://press.getalchemystai.com/books/context-infrastructure-build-ai-that-understands-your-business/appendix-b-platform-limits-and-error-codes"
last_updated: "2018-10-20"
book: "Context Infrastructure"
label: "Appendix B"
---

# Platform limits and error codes

| Limit | Value |
| --- | --- |
| **Maximum file size** | 50 MB per document |
| **Maximum batch size** | 100 documents per `add()` request |
| **Supported file types** | `.pdf`, `.txt`, `.docx`, `.md`, `.json`, `.csv` |
| **Token limit** | 8,192 tokens per document chunk |
| **Metadata** | Up to 20 keys per document; values must be strings or numbers |
| **Indexing speed** | About 120 records a second for text; about 5 seconds a page for OCR'd PDFs |
| **Rate limit** | 1,000 requests a minute (higher on request) |

| Code | Error | Common cause | Fix |
| --- | --- | --- | --- |
| 400 | Bad request | Invalid JSON, missing `source` or `query`, empty `documents` | Validate against the API schema |
| 401 | Unauthorized | Missing or invalid API key | Check the environment variable and key type |
| 403 | Forbidden | Accessing a scope the key cannot see | Verify the key and the scope |
| 409 | Conflict | `fileName` already exists, or cancelling a running job | Choose an update strategy (Chapter 8) |
| 413 | Payload too large | Over 50 MB, or too many documents in one request | Split the request |
| 422 | Unprocessable | `fileType` does not match the content, or documents not indexed | Send the right type; confirm ingestion finished |
| 429 | Rate limit | Over 1,000 requests a minute | Back off exponentially; cache repeated searches |

---

- Previous: [Appendix A: API endpoint reference](https://press.getalchemystai.com/books/context-infrastructure-build-ai-that-understands-your-business/appendix-a-api-endpoint-reference.md)
- Contents: [Context Infrastructure](https://press.getalchemystai.com/books/context-infrastructure-build-ai-that-understands-your-business.md)
- Next: [Appendix C: Benchmark data](https://press.getalchemystai.com/books/context-infrastructure-build-ai-that-understands-your-business/appendix-c-benchmark-data.md)
