AllPDFMagic API
Production-ready REST API for PDF processing, document conversion, and AI-powered intelligence. Build powerful document workflows in minutes.
Quick Start
# Compress a PDF file
curl -X POST \
https://api.allpdfmagic.com/api/v1/pdf/compress \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "quality=medium"const formData = new FormData();
formData.append('file', pdfFile);
formData.append('quality', 'medium');
const res = await fetch(
'https://api.allpdfmagic.com/api/v1/pdf/compress',
{ 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
- All PDF & conversion endpoints
- AI endpoints (invoice, OCR, summarize)
- Webhook notifications
- Priority email support
Rate Limit Headers
Every response includes these headers:
API Endpoints
20 endpointsPDF Processing
Core PDF manipulation operations
/api/v1/pdf/compressCompress PDF to reduce file size
Parameters
filefilerequiredPDF file to compressqualitystringlow | medium | high (default: medium)target_size_kbintegerTarget size in KB/api/v1/pdf/mergeMerge multiple PDFs into one
Parameters
filesfile[]requiredMultiple PDF files to merge/api/v1/pdf/splitSplit PDF into separate pages
Parameters
filefilerequiredPDF file to splitpagesstringPage ranges, e.g., '1-3,5,7-10'/api/v1/pdf/rotateRotate PDF pages
Parameters
filefilerequiredPDF file to rotaterotationintegerrequired90 | 180 | 270 degreespagesstringComma-separated page numbersDocument Conversion
Convert between formats
/api/v1/convert/pdf-to-wordConvert PDF to Word document
Parameters
filefilerequiredPDF file to convert/api/v1/convert/pdf-to-excelConvert PDF tables to Excel
Parameters
filefilerequiredPDF file with tables/api/v1/convert/pdf-to-jpgConvert PDF pages to images
Parameters
filefilerequiredPDF file to convertdpiintegerImage resolution (default: 150)/api/v1/convert/word-to-pdfConvert Word to PDF
Parameters
filefilerequired.docx file/api/v1/convert/excel-to-pdfConvert Excel to PDF
Parameters
filefilerequired.xlsx file/api/v1/convert/ppt-to-pdfConvert PowerPoint to PDF
Parameters
filefilerequired.pptx file/api/v1/convert/image-to-pdfConvert image to PDF
Parameters
filefilerequiredPNG, JPG, or WEBPAI 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)Bulk Processing
Process multiple files at once
/api/v1/bulk/uploadUpload multiple files for batch processing
Parameters
filesfile[]requiredUp to 50 PDF filesoperationstringrequiredcompress | convert | ocr/api/v1/bulk/{job_id}Get batch job status and results
Parameters
job_idstringrequiredJob ID from uploadUsage & 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,
"file": {
"filename": "compressed_document.pdf",
"download_url": "https://storage.allpdfmagic.com/...",
"size_bytes": 245000,
"expires_at": "2024-12-18T12:00:00Z"
},
"original_size": 1240000,
"compressed_size": 245000,
"reduction_percent": 80.2
}{
"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"
}SDKs & Libraries
Coming SoonComing Q1 2025
Coming Q1 2025
Coming Q2 2025
Ready to integrate?
Get your API key and start processing PDFs in minutes.10,000 API calls included.