Developer Documentationv1.0

AllPDFMagic API

Enterprise AI Document Intelligence API. Transform documents into actionable data with AI-powered workflows and pipelines. Build intelligent document automation in minutes.

17+ Endpoints99.9% UptimeSSL Encrypted<500ms Response
10,000
API calls/month
100MB
Max file size
17+
API endpoints
$29
per month

Quick Start

cURL
# 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"
JavaScript
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.

Authorization: Bearer apm_live_xxxxxxxxxxxxxxxxxxxxxxxx

Get your API key

Subscribe to the Developer plan ($29/mo) to generate API keys from your dashboard.

View Developer Plan

Rate 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:

X-RateLimit-Limit: 10000
Monthly quota
X-RateLimit-Remaining: 9847
Calls remaining
X-RateLimit-Reset: 1735689600
Reset timestamp (Unix)

API Endpoints

17 endpoints

AI Document Intelligence

AI-powered document processing

4 endpoints
POST/api/v1/ai/extract-invoice

Extract structured data from invoices

Parameters

filefilerequiredInvoice PDF
export_formatstringjson | csv | excel | quickbooks | xero
include_line_itemsbooleanExtract line items (default: true)
POST/api/v1/ai/ocr

Extract text from scanned documents

Parameters

filefilerequiredScanned PDF or image
POST/api/v1/ai/extract-tables

Extract tables to Excel format

Parameters

filefilerequiredPDF with tables
pagesstringPage numbers
POST/api/v1/ai/summarize

Generate AI summary of document

Parameters

filefilerequiredPDF document
max_lengthintegerMax words (default: 500)

Document Pipelines

Outcome-based pipelines that combine multiple workflows for business results

1 endpoints
POST/api/v1/pipelines/trusted-data

Turn 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

9 endpoints
POST/api/v1/workflows/normalize-data

Normalize any document format to standardized JSON

Parameters

filefilerequiredPDF, Excel, Word, or image file
extract_entitiesbooleanExtract entities like dates, amounts (default: true)
include_tablesbooleanInclude table data (default: true)
include_imagesbooleanInclude image data as base64 (default: false)
POST/api/v1/workflows/normalize-batch

Normalize multiple files in batch

Parameters

filesfile[]requiredUp to 100 files to normalize
extract_entitiesbooleanExtract entities (default: true)
include_tablesbooleanInclude table data (default: true)
POST/api/v1/workflows/validate-file

Validate file against rules and compliance requirements

Parameters

filefilerequiredFile to validate
format_typestringgst | bank_upload | vendor_onboarding | insurance_claim
validation_rulesstringJSON string with custom validation rules
POST/api/v1/workflows/validate-batch

Validate multiple files in batch

Parameters

filesfile[]requiredUp to 100 files to validate
format_typestringgst | bank_upload | vendor_onboarding | insurance_claim
POST/api/v1/workflows/detect-duplicates

Detect duplicate and similar documents

Parameters

filesfile[]requiredMultiple files to check for duplicates (2+ required)
similarity_thresholdfloatSimilarity threshold (0-1, default: 0.95)
POST/api/v1/workflows/auto-redact

Automatically detect and redact PII from PDF documents

Parameters

filefilerequiredPDF file to redact
pii_typesstringComma-separated PII types (pan,aadhaar,ssn,email,phone,bank_account,credit_card)
POST/api/v1/workflows/check-consistency

Check 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)
POST/api/v1/workflows/compare-versions

Compare two document versions and extract changes

Parameters

old_versionfilerequiredOld version of the document
new_versionfilerequiredNew version of the document
POST/api/v1/workflows/extract-clauses

Extract clauses, obligations, and deadlines from contracts/policies

Parameters

filefilerequiredContract or policy document
document_typestringDocument type (contract, policy, terms, default: contract)

Usage & Health

Monitor API usage and status

3 endpoints
GET/api/v1/health

API health check

GET/api/v1/usage/check

Check current usage limits

GET/api/v1/usage/stats

Get usage statistics

Response Format

Success Response (200)
{
  "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 Response (4xx/5xx)
{
  "error": "rate_limit_exceeded",
  "detail": "Monthly API quota exceeded",
  "status": 429,
  "limit": 10000,
  "reset_at": "2025-01-01T00:00:00Z"
}

Error Codes

Code
Status
Description
200
OK
Request successful
400
Bad Request
Invalid parameters or file format
401
Unauthorized
Missing or invalid API key
403
Forbidden
Feature requires higher plan
413
File Too Large
File exceeds size limit
429
Rate Limited
Monthly quota exceeded
500
Server Error
Internal processing error

Webhooks

Developer Plan

Receive real-time notifications when batch jobs complete. Configure webhook URLs in your dashboard.

Webhook Payload
{
  "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"
}
Start building today

Ready to integrate?

Get your API key and start building AI-powered document workflows in minutes.10,000 API calls included.