> ## 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.

# REST API Overview

> OpenAPI 3.1 REST API on https://api.zerodrive.dev with safe conflict checks, retry keys, live streams, and big uploads.

The ZeroDrive REST API lives at **`https://api.zerodrive.dev`**. Every call reads and writes the same account files, share links, and Knowledge Brain index as Finder, File Explorer, MCP, and `zd`.

| Service | Official URL |
| :- | :- |
| Website and downloads | `https://zerodrive.dev` and `https://zerodrive.dev/download` |
| Web app, sharing, Brain, and billing | `https://app.zerodrive.dev` |
| REST API | `https://api.zerodrive.dev` |
| Hosted MCP Server (24/7) | `https://api.zerodrive.dev/mcp` |
| S3 gateway | `https://api.zerodrive.dev/s3` |
| OpenAPI 3.1 schema | `https://api.zerodrive.dev/openapi.json` |
| Health check | `https://api.zerodrive.dev/v1/health` |

## OpenAPI schema and test playground

* **Schema.** [`https://api.zerodrive.dev/openapi.json`](https://api.zerodrive.dev/openapi.json)
* **Live Playground.** Open any route under **Endpoints** to run requests and copy `curl`, `TypeScript`, and `Python` code.

## Key API patterns

### Safe edits and retries

Write routes support `expected_revision` or `If-Match` (returns `409 Conflict` if another edit landed first), `Idempotency-Key` (makes network retries safe), and `on_conflict` (`fail` or `overwrite`).

### Live push events (SSE)

Listen on `GET /v1/events` or `GET /v1/activity/stream` so desktop drives refresh right after API or MCP changes.

### Big uploads and range downloads

* `POST /v1/files/upload-urls` gives 1-hour direct `PUT` URLs up to 5 GiB.
* `POST /v1/files/multipart/*` uploads up to 5 TiB across 45 MB parts.
* `GET /v1/files/download-url` gives 24-hour links supporting byte-range requests (`Accept-Ranges: bytes`).

## Retired endpoints (`410 endpoint_removed`)

| Closed URL | Replacement |
| :- | :- |
| `POST /v1/vault/provision` | PKCE sign-in or Web App, then `GET /v1/me/credentials` |
| `POST /v1/auth/create-account` | Sign in at `https://app.zerodrive.dev` |
| `GET /v1/auth/account-status` | `GET /v1/me/usage` or `GET /v1/me/credentials` |
| `GET /v1/auth/session` | `POST /v1/auth/handoff/start` and `/exchange` |
| `POST /v1/license/activate` | Not needed (per-user tokens only) |
| `POST /v1/billing/checkout` & `checkout/complete` | Start checkout at `https://app.zerodrive.dev` |
| `GET` / `POST /v1/billing/portal` | Open Billing at `https://app.zerodrive.dev` |


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