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

# API Limits & Rate Limiting

> File size limits, page limits, and rate limits for the Datalab API.

Datalab implements limits to ensure fair usage and maintain service quality. This guide covers file size limits, page limits, and rate limiting.

## File Size Limits

| File Type | Maximum Size |
| - | - |
| PDF Documents | 200 MB |
| Images | 200 MB |
| Office Documents | 200 MB |

## Page Limits

| Limit | Value |
| - | - |
| Maximum pages per request | 7,000 |

For documents exceeding these limits, use the `page_range` parameter to process in segments:

```python theme={null}
from datalab_sdk import DatalabClient, ConvertOptions

client = DatalabClient()

# Process a large document in segments
options = ConvertOptions(page_range="0-999")
result1 = client.convert("large_document.pdf", options=options)

options = ConvertOptions(page_range="1000-1999")
result2 = client.convert("large_document.pdf", options=options)
```

## Rate Limits

### Request Rate Limit

| Plan | Requests per minute | Concurrent requests |
| - | - | - |
| Free | 25 | 25 |
| Launch | 400 | 400 |
| Team | 400 | 400 |
| Enterprise | Custom | Custom |

When you exceed request rate limits, you'll receive a `429` response. The SDK handles retries automatically. For raw API calls, implement retry logic:

```python theme={null}
import time
import requests

def api_call_with_retry(url, headers, files, data, max_retries=3):
    for attempt in range(max_retries):
        response = requests.post(url, headers=headers, files=files, data=data)

        if response.status_code == 429:
            time.sleep(60)
            continue

        return response

    raise Exception("Max retries exceeded")
```

### Page Concurrency Limit

In addition to request rate limits, Datalab enforces a limit on the total number of pages being processed concurrently across all your requests.

| Limit | Value |
| - | - |
| Concurrent pages in flight per team (default) | 15,000 |

Most workloads will not hit this limit. It primarily affects high-volume workloads with longer-running requests — for example, large or complex documents processed in accurate mode with additional features enabled — or extremely high-volume workloads. Such sustained workloads would benefit from an enterprise agreement or a batch job that we orchestrate for you. Contact [support@datalab.to](mailto:support@datalab.to) to discuss your requirements.

This limit differs from request rate limits in two important ways:

1. **It is not time-bound.** It limits the number of pages actively being processed at any given moment, not the number of requests per minute.
2. **It is enforced during processing, not at submission.** Page counts are determined by the worker. Submission can succeed, but polling `request_check_url` returns HTTP `429` if processing would exceed your team's page-concurrency limit:

```json theme={null}
{
  "detail": "Page rate limit exceeded. Your team has {current_pages} pages in flight and this request adds {page_count} more ({total} total, limit: 15000). Please wait for some requests to complete before submitting more, or contact support@datalab.to for a higher limit. See https://documentation.datalab.to/docs/common/limits#page-concurrency-limit"
}
```

The limit applies across the whole team and can be overridden for your team. A rejected request is not queued. Wait for earlier requests to finish, then submit the document again as a new request; polling the rejected request again will continue to return `429` while its result is available. Deleted or expired results return `404`.

## Enterprise Limits

Custom limits are available for enterprise plans:

* Higher file size limits
* Increased rate limits
* Priority processing

See [pricing](https://www.datalab.to/pricing) for details, or contact support to discuss your requirements.

## Next Steps

> [card] [Batch Processing](https://documentation.datalab.to/docs/recipes/conversion/batch-documents.md)
>
> Process multiple documents efficiently in batch.

> [card] [Error Codes](https://documentation.datalab.to/platform/errors.md)
>
> Understand HTTP error codes and subscription errors.

> [card] [Billing](https://documentation.datalab.to/platform/billing.md)
>
> Learn about per-page pricing and usage monitoring.

> [card] [Webhooks](https://documentation.datalab.to/platform/webhooks.md)
>
> Receive notifications when processing completes instead of polling.


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