Developer Documentationv1.0

AllPDFMagic API

Production-ready REST API for PDF processing, document conversion, and AI-powered intelligence. Build powerful document workflows in minutes.

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

Quick Start

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

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
  • All PDF & conversion endpoints
  • AI endpoints (invoice, OCR, summarize)
  • 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

20 endpoints

PDF Processing

Core PDF manipulation operations

4 endpoints
POST/api/v1/pdf/compress

Compress PDF to reduce file size

Parameters

filefilerequiredPDF file to compress
qualitystringlow | medium | high (default: medium)
target_size_kbintegerTarget size in KB
POST/api/v1/pdf/merge

Merge multiple PDFs into one

Parameters

filesfile[]requiredMultiple PDF files to merge
POST/api/v1/pdf/split

Split PDF into separate pages

Parameters

filefilerequiredPDF file to split
pagesstringPage ranges, e.g., '1-3,5,7-10'
POST/api/v1/pdf/rotate

Rotate PDF pages

Parameters

filefilerequiredPDF file to rotate
rotationintegerrequired90 | 180 | 270 degrees
pagesstringComma-separated page numbers

Document Conversion

Convert between formats

7 endpoints
POST/api/v1/convert/pdf-to-word

Convert PDF to Word document

Parameters

filefilerequiredPDF file to convert
POST/api/v1/convert/pdf-to-excel

Convert PDF tables to Excel

Parameters

filefilerequiredPDF file with tables
POST/api/v1/convert/pdf-to-jpg

Convert PDF pages to images

Parameters

filefilerequiredPDF file to convert
dpiintegerImage resolution (default: 150)
POST/api/v1/convert/word-to-pdf

Convert Word to PDF

Parameters

filefilerequired.docx file
POST/api/v1/convert/excel-to-pdf

Convert Excel to PDF

Parameters

filefilerequired.xlsx file
POST/api/v1/convert/ppt-to-pdf

Convert PowerPoint to PDF

Parameters

filefilerequired.pptx file
POST/api/v1/convert/image-to-pdf

Convert image to PDF

Parameters

filefilerequiredPNG, JPG, or WEBP

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)

Bulk Processing

Process multiple files at once

2 endpoints
POST/api/v1/bulk/upload

Upload multiple files for batch processing

Parameters

filesfile[]requiredUp to 50 PDF files
operationstringrequiredcompress | convert | ocr
GET/api/v1/bulk/{job_id}

Get batch job status and results

Parameters

job_idstringrequiredJob ID from upload

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,
  "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 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"
}

SDKs & Libraries

Coming Soon
🟢Node.js

Coming Q1 2025

🐍Python

Coming Q1 2025

🐘PHP

Coming Q2 2025

Start building today

Ready to integrate?

Get your API key and start processing PDFs in minutes.10,000 API calls included.