RESTful API for PDF processing — Convert, Merge, Split, and more
API Key Required v1.0.0
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.
One-step upload & process. File is processed immediately and the result is returned in the response body.
Endpoints: /api/pdf-to-images, /api/merge, /api/split, /api/image-to-pdf
Three-step workflow for larger files or background processing.
/api/v1/upload/api/v1/convert/api/v1/download/:idConvert each page of a PDF into PNG or JPG images, returned as a ZIP file.
| Parameter | Type | Required | Description |
|---|---|---|---|
file | File | Yes | PDF file (max 50MB) |
dpi | Number | No | Resolution: 72, 150 (default), 300 |
format | String | No | Output format: png (default), jpg |
quality | Number | No | JPEG 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
Combine multiple PDF files into a single document.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_0, file_1, ... | File[] | Yes | PDF files to merge (at least 2) |
fileCount | Number | Yes | Number 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
Extract specific pages from a PDF document using page ranges.
| Parameter | Type | Required | Description |
|---|---|---|---|
file | File | Yes | PDF file (max 50MB) |
pageRanges | String | Yes | Page 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
Convert one or more images (JPG, PNG, GIF, WebP) into a PDF document.
| Parameter | Type | Required | Description |
|---|---|---|---|
image_0, image_1, ... | File[] | Yes | Image files (at least 1) |
fileCount | Number | Yes | Number 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
Check API service status. No authentication required.
curl https://luluremon.com/api/v1/health
Response
Upload a file for async processing. Returns a taskId for subsequent operations.
| Parameter | Type | Required | Description |
|---|---|---|---|
file | File | Yes | File to upload (max 50MB) |
type | String | Yes | Task 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
Start processing an uploaded file. Provide the taskId from the upload step.
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | String | Yes | Task ID from upload response |
dpi | Number | No | DPI for PDF-to-Images (72-600, default 150) |
format | String | No | Output format: png (default), jpg |
quality | Number | No | JPEG 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
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
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
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
| Code | Description |
|---|---|
| E1001 | Unauthorized — API key missing or invalid |
| E1002 | Invalid API key |
| E1004 | Rate limit exceeded |
| E2001 | No file uploaded |
| E2002 | Invalid file type |
| E2003 | File too large (max 50MB) |
| E3001 | Task not found |
| E3002 | Task processing failed |
| E3003 | Invalid conversion options |
| E3005 | Unsupported format |
| E4001 | Insufficient credits |
| E5001 | Internal server error |