REST API v1

API Documentation

Every PDF tool available as a REST endpoint. Get started with 1,000 free API calls per month.

Authentication

Use API keys via X-API-Key header. Create keys in the dashboard.

File Upload

Send files via multipart/form-data. Max 100MB per file (Pro plan).

Webhooks

Get notified when async operations complete. Configure in dashboard.

Quick Start

# 1. Get your API key from the dashboard
# 2. Make your first request:

curl -X POST https://pdf.yantra.tools/api/v1/pdf/merge \
  -H "X-API-Key: ypdf_live_sk_your_key_here" \
  -F "files[][email protected]" \
  -F "files[][email protected]"

# Response:
# {
#   "success": true,
#   "document": {
#     "id": "doc_abc123",
#     "download_url": "https://pdf.yantra.tools/dl/...",
#     "pages": 42,
#     "size_bytes": 2457600
#   }
# }

All Endpoints

MethodEndpointDescription
POST/api/v1/pdf/mergeMerge multiple PDFs
POST/api/v1/pdf/splitSplit PDF by pages
POST/api/v1/pdf/compressCompress PDF
POST/api/v1/pdf/convertConvert file to PDF
POST/api/v1/pdf/convert/htmlConvert HTML to PDF
POST/api/v1/pdf/convert/urlConvert URL to PDF
POST/api/v1/pdf/exportExport PDF to other format
POST/api/v1/pdf/ocrOCR scanned PDF
POST/api/v1/pdf/watermarkAdd watermark
POST/api/v1/pdf/rotateRotate pages
POST/api/v1/pdf/page-numbersAdd page numbers
POST/api/v1/pdf/metadataRead/write metadata
POST/api/v1/pdf/flattenFlatten forms/annotations
POST/api/v1/pdf/protectPassword protect
POST/api/v1/pdf/unlockRemove password
POST/api/v1/pdf/compressCompress/optimize
POST/api/v1/pdf/repairRepair damaged PDF
POST/api/v1/pdf/extract/textExtract text
POST/api/v1/pdf/extract/metadataExtract metadata
POST/api/v1/documentsUpload document
GET/api/v1/documentsList documents
GET/api/v1/documents/:idGet document info
GET/api/v1/documents/:id/downloadDownload document
DELETE/api/v1/documents/:idDelete document

Interactive API explorer available at the API server

Open Swagger UI