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

> ## Agent Instructions
> Hosted remote MCP endpoint: https://api.zerodrive.dev/mcp (OAuth 2.0 PKCE or Bearer token).
> REST API base URL: https://api.zerodrive.dev with OpenAPI 3.1.0 specification at https://api.zerodrive.dev/openapi.json.
> S3-compatible gateway: https://api.zerodrive.dev/s3 (AWS Signature V4, region auto).
> Local command-line tool: zd (or zerodrive) and local stdio MCP server: zerodrive mcp.
> Token prefixes: zdk_ (Personal API Key), zdt_ (device session token), zda_ (OAuth access token), zdr_ (OAuth refresh token), zdx_ (temporary sandbox key). Never paste real keys into prompts or code.
> Be honest about platform boundaries: cloud files require internet access, files are encrypted at rest and in transit by Cloudflare rather than end-to-end encrypted, ZeroDrive is not a replacement for an independent backup, Windows 11 support is an unsigned x64 beta, and the 7-day Pro free trial requires a card and charges automatically when it ends.

# Error Codes, Refusals & Limits

> HTTP status codes, refusal errors, quota limits, and batch size caps across the ZeroDrive API.

## HTTP error codes

| Status | Error | Meaning |
| :- | :- | :- |
| `400` | `invalid_json` / `invalid_request` | Bad JSON, invalid path (`..`, backslash, over limit), or missing field. |
| `401` | `unauthorized` | Missing, revoked, expired, or invalid token. |
| `402` | `plan_required` | No active plan on `/v1/me/credentials`. |
| `403` | `plan_required` | No active plan on `/v1/*` or `/mcp`. |
| `403` | `read_only` | Inside 30-day read-only window (reads work, writes blocked). |
| `403` | `insufficient_scope` / `scope_denied` | Missing scope or tried escaping locked folder, drive, or branch. |
| `403` | S3 `AccessDenied` / `QuotaExceeded` | Wrong tenant prefix or out of storage. |
| `404` | `not_found` | Item, version, scan, branch, or snapshot not found in account. |
| `409` | `conflict` / `Destination already exists` | Revision mismatch, folder exists, or handoff already claimed. |
| `410` | `endpoint_removed` / `release_withdrawn` | Retired URL or withdrawn app version older than `3.2.0`. |
| `411` | `Length Required` | Missing `Content-Length` on upload. |
| `413` | `payload_too_large` | File over `5 GiB` or body too big (use `/v1/files/upload-urls` or `multipart`). |
| `429` | `rate_limit_exceeded` | Too many calls. Wait for `Retry-After` seconds. |
| `503` | `server_misconfigured` / `search_index_unavailable` | Required server setup temporarily unavailable. |
| `507` | `quota_exceeded` | Out of storage. Reads, deletes, and moves still work. |

## Size and batch limits

| Route | Limit | Handling larger jobs |
| :- | :- | :- |
| `POST /v1/files/move` | **200 files**/step, **5 GiB**/file | Pass `resume: true` + `after` until `done: true`. |
| `POST /v1/files/batch` | **50 ops**, **400 files**, folders `<= 200` | Use `/v1/files/move` for huge folders or split batches. |
| `POST /v1/files/references` | **150 files** (`<= 256 KiB`, `8 MiB` total), 5 pages, 50 hits | Watch `truncated: true` if scan stopped early. |
| `POST /v1/duplicates/scan` | **500,000 files** (`1 KiB` to `10 GiB`) | Pass `path` per folder if `stopped_at_cap: true`. |
| `POST /v1/duplicates/remove` | **100 groups** / **400 paths**, 25 moves, 256 MiB check | Repeat with `groups.slice(next_group)` until `done: true`. |
| `read-bytes` / `write-bytes` | **64 KiB** per call | Use `/v1/files/download-url`, `patch-url`, or `upload-urls`. |
| `convert-markdown` | **15 MB** max doc | Split big PDFs or run local Mac OCR. |
| `POST /v1/brain/corpora` | **50 corpora** per account | Combine folders using `include_paths`. |


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