AllPDFMagic API
Enterprise AI Document Intelligence API. Transform documents into actionable data with AI-powered workflows and pipelines. Build intelligent document automation in minutes.
Quick Start
# Extract invoice data with AI
curl -X POST \
https://www.allpdfmagic.com/api/v1/ai/extract-invoice \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@invoice.pdf" \
-F "export_format=json"const formData = new FormData();
formData.append('file', invoiceFile);
formData.append('export_format', 'json');
const res = await fetch(
'https://www.allpdfmagic.com/api/v1/ai/extract-invoice',
{ method: 'POST', body: formData,
headers: { Authorization: `Bearer ${API_KEY}` } }
);Authentication
All API requests require authentication using a Bearer token in the Authorization header. API keys are generated from your dashboard after subscribing to the Developer plan.
Get your API key
Subscribe to the Developer plan ($29/mo) to generate API keys from your dashboard.
View Developer PlanRate Limits & Quotas
Developer Plan
$29/mo- 10,000 API calls per month
- 100MB maximum file size
- AI Document Intelligence endpoints
- Document Pipelines & Enterprise Workflows
- Webhook notifications
- Priority email support
Rate Limit Headers
Every response includes these headers:
API Endpoints
17 endpointsAI Document Intelligence
AI-powered document processing
/api/v1/ai/extract-invoiceExtract structured data from invoices
Parameters
filefilerequiredInvoice PDFexport_formatstringjson | csv | excel | quickbooks | xeroinclude_line_itemsbooleanExtract line items (default: true)/api/v1/ai/ocrExtract text from scanned documents
Parameters
filefilerequiredScanned PDF or image/api/v1/ai/extract-tablesExtract tables to Excel format
Parameters
filefilerequiredPDF with tablespagesstringPage numbers/api/v1/ai/summarizeGenerate AI summary of document
Parameters
filefilerequiredPDF documentmax_lengthintegerMax words (default: 500)Document Pipelines
Outcome-based pipelines that combine multiple workflows for business results
/api/v1/pipelines/trusted-dataTurn any document into trusted, validated data (combines normalization, validation, and quality scoring)
Parameters
filefilerequiredDocument to process (PDF, Excel, Word, images)extract_entitiesbooleanExtract entities (default: true)include_tablesbooleanInclude table data (default: true)Enterprise Workflows
Individual workflow tools for advanced use cases
/api/v1/workflows/normalize-dataNormalize any document format to standardized JSON
Parameters
filefilerequiredPDF, Excel, Word, or image fileextract_entitiesbooleanExtract entities like dates, amounts (default: true)include_tablesbooleanInclude table data (default: true)include_imagesbooleanInclude image data as base64 (default: false)/api/v1/workflows/normalize-batchNormalize multiple files in batch
Parameters
filesfile[]requiredUp to 100 files to normalizeextract_entitiesbooleanExtract entities (default: true)include_tablesbooleanInclude table data (default: true)/api/v1/workflows/validate-fileValidate file against rules and compliance requirements
Parameters
filefilerequiredFile to validateformat_typestringgst | bank_upload | vendor_onboarding | insurance_claimvalidation_rulesstringJSON string with custom validation rules/api/v1/workflows/validate-batchValidate multiple files in batch
Parameters
filesfile[]requiredUp to 100 files to validateformat_typestringgst | bank_upload | vendor_onboarding | insurance_claim/api/v1/workflows/detect-duplicatesDetect duplicate and similar documents
Parameters
filesfile[]requiredMultiple files to check for duplicates (2+ required)similarity_thresholdfloatSimilarity threshold (0-1, default: 0.95)/api/v1/workflows/auto-redactAutomatically detect and redact PII from PDF documents
Parameters
filefilerequiredPDF file to redactpii_typesstringComma-separated PII types (pan,aadhaar,ssn,email,phone,bank_account,credit_card)/api/v1/workflows/check-consistencyCheck consistency across multiple documents (e.g., Invoice vs PO)
Parameters
filesfile[]requiredMultiple files to compare (2+ required)comparison_typestringType of comparison (auto, invoice_po, vendor_verification)/api/v1/workflows/compare-versionsCompare two document versions and extract changes
Parameters
old_versionfilerequiredOld version of the documentnew_versionfilerequiredNew version of the document/api/v1/workflows/extract-clausesExtract clauses, obligations, and deadlines from contracts/policies
Parameters
filefilerequiredContract or policy documentdocument_typestringDocument type (contract, policy, terms, default: contract)Usage & Health
Monitor API usage and status
/api/v1/healthAPI health check
/api/v1/usage/checkCheck current usage limits
/api/v1/usage/statsGet usage statistics
Response Format
{
"success": true,
"data": {
"invoice_number": "INV-2024-001",
"date": "2024-12-15",
"vendor": "Acme Corp",
"total_amount": 1250.00,
"currency": "USD",
"line_items": [
{
"description": "Product A",
"quantity": 10,
"unit_price": 100.00,
"total": 1000.00
}
]
},
"confidence": 0.98,
"extracted_fields": ["invoice_number", "date", "vendor", "total_amount"]
}{
"error": "rate_limit_exceeded",
"detail": "Monthly API quota exceeded",
"status": 429,
"limit": 10000,
"reset_at": "2025-01-01T00:00:00Z"
}Error Codes
Webhooks
Developer PlanReceive real-time notifications when batch jobs complete. Configure webhook URLs in your dashboard.
{
"event": "job.completed",
"job_id": "job_abc123xyz",
"status": "success",
"files_processed": 25,
"download_url": "https://storage.allpdfmagic.com/batch/...",
"timestamp": "2024-12-17T10:30:00Z"
}Ready to integrate?
Get your API key and start building AI-powered document workflows in minutes.10,000 API calls included.