Operations
Each operation is a POST /v1/pdf/<operation> request with JSON: the file_id of the uploaded file (or file_ids for operations on several files: merging, photos and images) and parameters. The response is 202 and a task_id; then see status and download.
| Operation | Request | MCP tool | Price unit |
|---|---|---|---|
| To PDF | |||
| Word to PDF | POST /v1/pdf/word-to-pdf | word_to_pdf | 10 MB |
| JPG to PDF | POST /v1/pdf/jpg-to-pdf | jpg_to_pdf | 10 MB of all files |
| Photo to PDF | POST /v1/pdf/photo-to-pdf | photo_to_pdf | 10 MB of all files |
| Excel to PDF | POST /v1/pdf/xlsx-to-pdf | xlsx_to_pdf | 10 MB |
| PowerPoint to PDF | POST /v1/pdf/pptx-to-pdf | pptx_to_pdf | 10 MB |
| DjVu to PDF | POST /v1/pdf/djvu-to-pdf | djvu_to_pdf | 10 MB |
| FB2 to PDF | POST /v1/pdf/fb2-to-pdf | fb2_to_pdf | 10 MB |
| EPUB to PDF | POST /v1/pdf/epub-to-pdf | epub_to_pdf | 10 MB |
| HTML to PDF | POST /v1/pdf/html-to-pdf | html_to_pdf | 10 MB |
| From PDF | |||
| PDF to Word | POST /v1/pdf/to-word | pdf_to_word | 10 MB or 50 pages |
| PDF to JPG | POST /v1/pdf/to-jpg | pdf_to_jpg | 10 MB or 50 pages (300 dpi: 25) |
| PDF to PNG | POST /v1/pdf/to-png | pdf_to_png | 10 MB |
| PDF to Excel | POST /v1/pdf/to-excel | pdf_to_excel | 10 MB or 50 pages |
| PDF to PowerPoint | POST /v1/pdf/to-pptx | pdf_to_pptx | 10 MB or 50 pages |
| PDF to Markdown | POST /v1/pdf/to-markdown | pdf_to_markdown | 10 MB or 50 pages |
| PDF to text | POST /v1/pdf/to-txt | pdf_to_txt | 10 MB |
| Images | |||
| Compress image | POST /v1/pdf/compress-image | compress_image | 10 MB of all files |
| HEIC to JPG | POST /v1/pdf/heic-to-jpg | heic_to_jpg | 10 MB of all files |
| Image to text | POST /v1/pdf/image-to-text | image_to_text | 10 MB of all files or 10 photos |
| PNG to JPG | POST /v1/pdf/png-to-jpg | png_to_jpg | 10 MB of all files |
| JPG to PNG | POST /v1/pdf/jpg-to-png | jpg_to_png | 10 MB of all files |
| WEBP to JPG | POST /v1/pdf/webp-to-jpg | webp_to_jpg | 10 MB of all files |
| Resize image | POST /v1/pdf/resize-image | resize_image | 10 MB of all files |
| Crop image | POST /v1/pdf/crop-image | crop_image | 10 MB |
| Rotate image | POST /v1/pdf/rotate-image | rotate_image | 10 MB of all files |
| Word to JPG | POST /v1/pdf/word-to-jpg | word_to_jpg | 10 MB |
| Manage | |||
| PDF editor | POST /v1/pdf/edit | edit_pdf | 10 MB |
| Compress PDF | POST /v1/pdf/compress | compress_pdf | 10 MB |
| Grayscale PDF | POST /v1/pdf/grayscale | grayscale_pdf | 10 MB |
| PDF to PDF/A | POST /v1/pdf/to-pdfa | pdf_to_pdfa | 10 MB |
| Repair PDF | POST /v1/pdf/repair | repair_pdf | 10 MB |
| Merge PDF | POST /v1/pdf/merge | merge_pdfs | 10 MB of all files |
| Split PDF | POST /v1/pdf/split | split_pdf | 10 MB |
| OCR PDF | POST /v1/pdf/ocr | ocr_pdf | 10 MB or 10 pages |
| Flatten PDF | POST /v1/pdf/flatten | flatten_pdf | 10 MB |
| Pages | |||
| Delete pages | POST /v1/pdf/delete-pages | delete_pages | 10 MB |
| Crop PDF | POST /v1/pdf/crop | crop_pdf | 10 MB |
| Extract pages | POST /v1/pdf/extract-pages | extract_pages | 10 MB |
| Rotate pages | POST /v1/pdf/rotate | rotate_pdf | 10 MB |
| Reorder pages | POST /v1/pdf/reorder-pages | reorder_pages | 10 MB |
| Add page numbers | POST /v1/pdf/add-page-numbers | add_page_numbers | 10 MB |
| Sign & protect | |||
| Sign PDF | POST /v1/pdf/sign | sign_pdf | 10 MB |
| Protect PDF | POST /v1/pdf/protect | protect_pdf | 10 MB |
| Unlock PDF | POST /v1/pdf/unlock | unlock_pdf | 10 MB |
| Redact personal data | POST /v1/pdf/redact | redact_pdf | 10 MB |
| Find personal data | POST /v1/pdf/find-personal-data | find_personal_data | 10 MB |
| Add watermark | POST /v1/pdf/watermark | watermark_pdf | 10 MB |
Common parameter
All operations accept an optional webhook_url — an https address: when the operation finishes, SmartPDF sends a POST request with the result and a signature to it. Details: Webhooks.
Operation chains
The PDF result of one operation can be passed straight to the next one — without downloading and re-uploading it:
curl -X POST https://api.smartpdf.ru/v1/upload/from-task/$TASK_ID -H "X-API-Key: $SMARTPDF_API_KEY"The response is the same as for an upload: a new file_id that’s valid for an hour. This way you can, for example, recognize the text in a scan and then compress the result. It works only for PDF results (otherwise 422); before the operation finishes, you get 409, and after the result is deleted, 410. On the Free plan, this doesn’t use up the one-time download link. Each operation in a chain is paid for separately.