API Reference Overview
DocLD exposes a REST API for programmatic access to document processing, extraction, chat, and more.
Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYCreate and manage API keys in Settings → API Keys.
Note: Some endpoints also accept session authentication (cookies) when using the dashboard.
Base URL
Use your deployment URL:
https://your-deployment.vercel.appFor local development:
http://localhost:3000Endpoints by Category
Upload & Parse
| Method | Endpoint | Description |
|---|---|---|
POST | /api/upload | Upload a document |
POST | /api/upload/presigned | Get presigned URL for large files |
POST | /api/parse | Parse synchronously |
POST | /api/parse/async | Parse asynchronously with webhooks |
POST | /api/pdf-to-text | Simple PDF to text (public) |
POST | /api/pdf-to-markdown | PDF to Markdown with structure (public) |
POST | /api/pdf-to-json | PDF to structured JSON: pages, blocks, tables (public) |
Documents
| Method | Endpoint | Description |
|---|---|---|
GET | /api/documents | List documents |
GET | /api/documents/{id} | Get document details |
PATCH | /api/documents/{id} | Update document |
DELETE | /api/documents/{id} | Delete document |
POST | /api/documents/bulk | Bulk operations |
GET | /api/documents/{id}/status | Stream status (SSE) |
POST | /api/documents/{id}/reprocess | Reprocess document |
GET | /api/documents/{id}/parse | Get parsed content |
GET | /api/documents/{id}/preview | Get preview data |
GET | /api/documents/{id}/audit | Get audit trail |
Extract
| Method | Endpoint | Description |
|---|---|---|
POST | /api/extract/run | Run extraction |
GET/POST | /api/extract/batch | Batch extractions |
GET/POST | /api/extract/schemas | Manage schemas |
GET | /api/extract/schemas/prebuilt | Prebuilt schemas |
POST | /api/extract/schemas/generate | Generate from document |
GET/POST | /api/extract/ground-truth | Ground truth data |
POST | /api/extract/corrections | Manual corrections |
GET | /api/extract/suggested-schema | Get suggested schema for document |
Chat
| Method | Endpoint | Description |
|---|---|---|
POST | /api/chat | Send message |
GET | /api/chat | Get history |
GET | /api/chat/sessions | List sessions |
GET/PATCH/DELETE | /api/chat/sessions/{id} | Manage session |
GET | /api/chat/sessions/{id}/export | Export session |
POST/DELETE | /api/chat/sessions/{id}/share | Sharing |
Knowledge Bases
| Method | Endpoint | Description |
|---|---|---|
GET/POST | /api/knowledge-bases | List/create |
GET/PATCH/DELETE | /api/knowledge-bases/{id} | Manage |
GET/POST | /api/knowledge-bases/{id}/documents | Documents |
GET | /api/knowledge-bases/{id}/analytics | Analytics |
GET | /api/knowledge-bases/{id}/suggestions | Smart suggestions |
Workflows
| Method | Endpoint | Description |
|---|---|---|
GET/POST | /api/workflows | List/create |
GET/PUT/DELETE | /api/workflows/{id} | Manage |
POST | /api/workflows/{id}/execute | Execute |
GET | /api/workflows/{id}/executions | History |
GET/POST/PUT/DELETE | /api/workflows/{id}/schedule | Schedules |
GET/POST/PUT/DELETE | /api/workflows/integrations | Integrations |
Additional APIs
- Split —
/api/split/*— Document splitting - Generate —
/api/generate/*— Document generation - Edit —
/api/edit/*— Document editing - Analytics —
/api/analytics/*— Platform analytics - Organizations —
/api/organizations/*— Team management - API Keys — Dashboard only (Settings → API Keys) — Create and manage keys
- User —
/api/user/*— Profile and credits - GDPR —
/api/gdpr/*— Compliance features - Jobs —
/api/jobs/*— Job status - Webhooks — Webhook configuration
Response Format
Successful responses return JSON:
{
"data": {...}
}Error responses:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message",
"details": {}
}
}Rate Limits
Rate limits are per API key, based on tier. In addition, split creation endpoints (POST /api/split/run, POST /api/split/batch, POST /api/split/analyze) are limited per user (e.g. 20 requests per minute per user) for both session and API-key authentication.
| Tier | Requests/Minute | Requests/Day |
|---|---|---|
| Free | 100 | 10,000 |
| Standard | 1,000 | 100,000 |
| Premium | 10,000 | 1,000,000 |
Rate Limit Headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 950
X-RateLimit-Reset: 1705322400Handling Rate Limits
When rate limited, you’ll receive HTTP 429:
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"details": {
"limit_type": "rpm",
"retry_after": 60
}
}
}Input Formats
Many endpoints accept flexible input:
| Format | Example |
|---|---|
| Document ID | {"document_id": "uuid"} |
| DocLD reference | {"input": "docld://uuid"} |
| URL | {"input": "https://example.com/doc.pdf"} |
| Job ID | {"input": "jobid://uuid"} |
| File upload | multipart/form-data |
Credits
Operations consume credits:
| Operation | Credits |
|---|---|
| Parse | 1.5 per page |
| Extract | 2.0 per extraction |
| Chat | 0.1 per query |
| Generate | 1.0 per document |
| Agentic parse | 3.0 per page |
Check credit balance: User API (GET /api/user/credits)