Quickstart
1. Get Your API Key
Sign up at pdflys.com and generate an API key:
- Go to Settings → API Keys
- Click Create Key
- Copy the key — it starts with
pdf_live_and is only shown once
2. Make Your First Request
Let's compress a PDF. Replace YOUR_API_KEY and document.pdf with your own values:
curl -X POST https://api.pdflys.com/api/v1/compress \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "level=medium"
3. Get Your Result
For files under 5 MB, you'll get an immediate response with a download URL:
{
"success": true,
"data": {
"fileId": "output/abc123.pdf",
"url": "https://storage.pdflys.com/output/abc123.pdf?token=...",
"expiresAt": "2026-02-25T11:00:00.000Z"
}
}
Download your processed file from the url field. The link expires after 1 hour.
For larger files (>= 5 MB), you'll receive a jobId instead. Poll for the result:
curl https://api.pdflys.com/api/v1/jobs/YOUR_JOB_ID \
-H "Authorization: Bearer YOUR_API_KEY"
4. Try More Operations
Here are a few more things you can do:
Merge two PDFs:
curl -X POST https://api.pdflys.com/api/v1/merge \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "files=@report-q1.pdf" \
-F "files=@report-q2.pdf"
Check accessibility compliance:
curl -X POST https://api.pdflys.com/api/v2/accessibility/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf"
Add a watermark:
curl -X POST https://api.pdflys.com/api/v1/watermark \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "mode=text" \
-F "text=CONFIDENTIAL" \
-F "position=diagonal"
Next Steps
- Authentication — Learn about API key management
- PDF Operations — Full reference for all 21 PDF tools
- Accessibility API — WCAG compliance checking and auto-fix
- Rate Limits — Understand usage quotas