API Overview
Under Review
This article is currently under review. Some content may be incomplete or inaccurate.
DocAI Fabric exposes a comprehensive REST API for programmatic access to all platform features.
Base URL
The base URL depends on your deployment:
- SaaS:
https://app.docaifabric.com - Self-hosted: Your configured domain (e.g.,
https://docai.yourcompany.com)
Interactive API Explorer
The built-in Swagger UI is available at:
https://app.docaifabric.com/api-docs
This provides interactive documentation where you can try API calls directly from your browser.
API Structure
The API is organized around these resource types:
| Resource | Endpoint Prefix | Description |
|---|---|---|
| Tenants | /tenants/ | Organization management |
| Projects | /tenants/{tenant_id}/projects/ | Project CRUD and configuration |
| Transactions | /tenants/{tenant_id}/projects/{project_id}/transactions/ | Document upload and processing |
| Transaction Operations | /transactions/{transaction_id}/ | Status, results, file upload, start processing |
| Admin | /admin/ | Client and API key management |
| Health | /health | Service health check |
Request Format
- Content-Type:
application/jsonfor most endpoints - File uploads:
multipart/form-data(for/transactions/{id}/source-files) - All request/response field names use snake_case
Response Format
API responses return the resource directly:
{
"transaction_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"created_at": "2025-01-15T10:45:00Z"
}
Error responses:
{
"detail": "Error description"
}
Common Operations
Create a Project
curl -X POST "https://app.docaifabric.com/tenants/{tenant_id}/projects" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "Invoice Processing",
"description": "Process vendor invoices"
}'
Upload and Process Documents
# One-step: submit documents and start processing immediately
curl -X POST "https://app.docaifabric.com/tenants/{tenant_id}/projects/{project_id}/transactions/process" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"source_files": [
{
"filename": "invoice.pdf",
"base64_data": "JVBERi0xLjQK..."
}
]
}'
See Process Documents via API for the complete guide including multi-step workflows and dataset selection.
Get Extraction Results
curl "https://app.docaifabric.com/transactions/{transaction_id}/documents" \
-H "X-API-Key: your-api-key"
Next Steps
- Authentication: Set up API keys
- Process Documents via API: Submit, process, and retrieve document results via API
- Webhooks: Get results pushed to your endpoint instead of polling
- Datasets: Route transactions to Playground, Production, or Evaluation datasets
- Rate Limiting: Per-key limits, response headers, and retry behavior
- Open the Swagger UI at
https://app.docaifabric.com/api-docsto try the interactive API explorer