PDF Tools API

RESTful API for PDF processing — Convert, Merge, Split, and more

API Key Required v1.0.0

Authentication

All API endpoints require authentication via API Key. Include your key in the request header:

Authorization: Bearer your_api_key_here

// Alternative headers also accepted:
X-API-Key: your_api_key_here

You can find your API key in the Dashboard. Each API call costs 1 credit.

Two Ways to Use the API

🚀 Quick API (Recommended)

One-step upload & process. File is processed immediately and the result is returned in the response body.

  1. Send file + options in a single POST request
  2. Receive the result file directly in the response

Endpoints: /api/pdf-to-images, /api/merge, /api/split, /api/image-to-pdf

📋 Async Task API

Three-step workflow for larger files or background processing.

  1. Upload — POST file to /api/v1/upload
  2. Convert — POST taskId + options to /api/v1/convert
  3. Download — GET result from /api/v1/download/:id

Quick API Endpoints

POST /api/pdf-to-images

PDF to Images

Convert each page of a PDF into PNG or JPG images, returned as a ZIP file.

ParameterTypeRequiredDescription
fileFileYesPDF file (max 50MB)
dpiNumberNoResolution: 72, 150 (default), 300
formatStringNoOutput format: png (default), jpg
qualityNumberNoJPEG quality 1-100 (default 90, jpg only)

cURL Example

curl -X POST https://luluremon.com/api/pdf-to-images \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "dpi=150" \
  -o images.zip

Python Example

import requests

resp = requests.post(
    "https://luluremon.com/api/pdf-to-images",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    files={"file": open("document.pdf", "rb")},
    data={"dpi": "150"}
)
with open("images.zip", "wb") as f:
    f.write(resp.content)

Success Response

HTTP 200 Content-Type: application/zip X-Remaining-Credits: 99
POST /api/merge

Merge PDFs

Combine multiple PDF files into a single document.

ParameterTypeRequiredDescription
file_0, file_1, ...File[]YesPDF files to merge (at least 2)
fileCountNumberYesNumber of files being uploaded

cURL Example

curl -X POST https://luluremon.com/api/merge \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file_0=@part1.pdf" \
  -F "file_1=@part2.pdf" \
  -F "fileCount=2" \
  -o merged.pdf

Python Example

import requests

resp = requests.post(
    "https://luluremon.com/api/merge",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    files={
        "file_0": open("part1.pdf", "rb"),
        "file_1": open("part2.pdf", "rb"),
    },
    data={"fileCount": "2"}
)
with open("merged.pdf", "wb") as f:
    f.write(resp.content)

Success Response

HTTP 200 Content-Type: application/pdf X-Remaining-Credits: 98
POST /api/split

Split PDF

Extract specific pages from a PDF document using page ranges.

ParameterTypeRequiredDescription
fileFileYesPDF file (max 50MB)
pageRangesStringYesPage ranges, e.g. "1-3,5,7-10"

cURL Example

curl -X POST https://luluremon.com/api/split \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "pageRanges=1-3,5" \
  -o split.pdf

Python Example

import requests

resp = requests.post(
    "https://luluremon.com/api/split",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    files={"file": open("document.pdf", "rb")},
    data={"pageRanges": "1-3,5"}
)
with open("split.pdf", "wb") as f:
    f.write(resp.content)

Success Response

HTTP 200 Content-Type: application/pdf X-Remaining-Credits: 97
POST /api/image-to-pdf

Images to PDF

Convert one or more images (JPG, PNG, GIF, WebP) into a PDF document.

ParameterTypeRequiredDescription
image_0, image_1, ...File[]YesImage files (at least 1)
fileCountNumberYesNumber of images being uploaded

cURL Example

curl -X POST https://luluremon.com/api/image-to-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "image_0=@photo1.jpg" \
  -F "image_1=@photo2.png" \
  -F "fileCount=2" \
  -o output.pdf

Python Example

import requests

resp = requests.post(
    "https://luluremon.com/api/image-to-pdf",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    files={
        "image_0": open("photo1.jpg", "rb"),
        "image_1": open("photo2.png", "rb"),
    },
    data={"fileCount": "2"}
)
with open("output.pdf", "wb") as f:
    f.write(resp.content)

Success Response

HTTP 200 Content-Type: application/pdf X-Remaining-Credits: 96

Async Task API Endpoints

GET /api/v1/health

Health Check

Check API service status. No authentication required.

curl https://luluremon.com/api/v1/health

Response

{ "success": true, "data": { "status": "healthy", "timestamp": "2026-05-27T12:00:00.000Z", "version": "1.0.0" } }
POST /api/v1/upload

Upload File

Upload a file for async processing. Returns a taskId for subsequent operations.

ParameterTypeRequiredDescription
fileFileYesFile to upload (max 50MB)
typeStringYesTask type: pdf-to-images, merge, split, image-to-pdf

cURL Example

curl -X POST https://luluremon.com/api/v1/upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "type=pdf-to-images"

Response

{ "success": true, "data": { "taskId": "abc123def456", "filename": "document.pdf", "size": 245678, "type": "pdf-to-images", "uploadedAt": "2026-05-27T12:00:00.000Z", "expiresAt": "2026-05-28T12:00:00.000Z" } }
POST /api/v1/convert

Convert File

Start processing an uploaded file. Provide the taskId from the upload step.

ParameterTypeRequiredDescription
taskIdStringYesTask ID from upload response
dpiNumberNoDPI for PDF-to-Images (72-600, default 150)
formatStringNoOutput format: png (default), jpg
qualityNumberNoJPEG quality (1-100, default 90)
curl -X POST https://luluremon.com/api/v1/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "taskId=abc123def456" \
  -F "dpi=150"

Response

{ "success": true, "data": { "taskId": "abc123def456", "status": "processing", "type": "pdf-to-images", "message": "Conversion started" } }
GET /api/v1/status/:id

Check Task Status

Poll the status of an async task. Status values: pending, processing, completed, failed.

curl https://luluremon.com/api/v1/status/abc123def456 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{ "success": true, "data": { "taskId": "abc123def456", "status": "completed", "type": "pdf-to-images", "createdAt": "2026-05-27T12:00:00.000Z", "completedAt": "2026-05-27T12:00:05.000Z" } }
GET /api/v1/download/:id

Download Result

Download the processed result file. Only available when task status is completed. Costs 1 credit.

curl https://luluremon.com/api/v1/download/abc123def456 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o result.zip

Success Response

HTTP 200 Content-Type: application/zip Content-Disposition: attachment; filename="images.zip" X-Remaining-Credits: 95
DELETE /api/v1/delete/:id

Delete Task

Delete a task and its associated files. Costs 1 credit.

curl -X DELETE https://luluremon.com/api/v1/delete/abc123def456 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{ "success": true, "data": { "deleted": "abc123def456", "remainingCredits": 94 } }

Error Codes

CodeDescription
E1001Unauthorized — API key missing or invalid
E1002Invalid API key
E1004Rate limit exceeded
E2001No file uploaded
E2002Invalid file type
E2003File too large (max 50MB)
E3001Task not found
E3002Task processing failed
E3003Invalid conversion options
E3005Unsupported format
E4001Insufficient credits
E5001Internal server error

Rate Limits & Pricing

Note: Each API call costs 1 credit. Free accounts start with credits. Subscribe for $9.9/month to get 1,000 credits/month. Files are automatically deleted after 24 hours.