PDF Mage API Documentation

AI-powered PDF form filling, OCR, and field mapping APIs. Process documents with 99.5% accuracy using advanced machine learning.

Quick Start

1. Get Your API Key

Sign up for a free account and generate your API key from the dashboard. You'll get 20 free pages to get started.

2. Make Your First Request

Upload a PDF file to any of our endpoints. The most common use case is the complete PDF processing endpoint.

3. Handle the Response

Receive your processed PDF or structured data. Monitor your credit usage via response headers.

Complete Example
// Using fetch API
const formData = new FormData();
formData.append('file', pdfFile);
formData.append('data', JSON.stringify({
  firstName: 'John',
  lastName: 'Doe',
  email: '[email protected]'
}));

const response = await fetch('https://pdfmage.app/api/v1/fill-pdf', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer pk_live_abc123...'
  },
  body: formData
});

if (response.ok) {
  const filledPdf = await response.blob();
  // Process the filled PDF file
} else {
  const error = await response.json();
  console.error('Error:', error.error);
}
API Documentation | PDF Mage