# SmartPDF API > 47 PDF and image operations over HTTP and MCP: conversion to and from PDF (including Markdown, DjVu, FB2, EPUB), compression, merging and splitting, text recognition (OCR, including Russian), a PDF editor, finding and removing personal data, pages, signatures, watermarks, passwords, image tools. REST: https://api.smartpdf.ru/v1, key in the X-API-Key header. MCP: https://mcp.smartpdf.ru/mcp, key in Authorization: Bearer. Pay per request from the API balance in rubles. All operations are asynchronous: POST /v1/upload (multipart, field file) → file_id; POST /v1/pdf/ (JSON with file_id and parameters) → task_id; GET /v1/tasks/{task_id} until status = done; GET /v1/tasks/{task_id}/download → download_url (valid for an hour). Create a key in your dashboard: https://smartpdf.ru/en/dashboard/api-keys. ## Getting started - [Introduction](https://smartpdf.ru/en/developers/docs/index.md): What the SmartPDF API can do: 47 PDF and image operations, the base URL, formats, the key and the request flow. - [Quick start](https://smartpdf.ru/en/developers/docs/quickstart.md): Your first request: key, upload, operation, waiting, download — in 7 languages. - [Keys and authentication](https://smartpdf.ru/en/developers/docs/auth.md): The API key in the X-API-Key or Authorization: Bearer header, key spending limits with a reset period, and key regeneration. - [How it works](https://smartpdf.ru/en/developers/docs/how-it-works.md): The operation lifecycle: task statuses, how uploaded files and results are stored, and how result files are named. ## API - [File upload](https://smartpdf.ru/en/developers/docs/upload.md): POST /v1/upload: accepted formats, the file size limit for each plan and how long the file_id of an upload stays valid. - [Operations](https://smartpdf.ru/en/developers/docs/operations.md): All 47 SmartPDF API operations: request URLs, parameters, MCP tools and the price unit of each operation. - [Status and download](https://smartpdf.ru/en/developers/docs/tasks.md): Task status via GET /v1/tasks/{task_id}: statuses, progress and processing stage, and the link to download the result. - [Webhooks](https://smartpdf.ru/en/developers/docs/webhooks.md): A completion notification instead of polling, HMAC-SHA256 signature verification. - [Errors](https://smartpdf.ru/en/developers/docs/errors.md): API response codes and what to do about them: balance and key limit, file size and format, processing errors, message language. - [Limits](https://smartpdf.ru/en/developers/docs/limits.md): API limits: request rate per key and IP, file size by plan, pages and files per operation, and processing time. - [Billing](https://smartpdf.ru/en/developers/docs/billing.md): Balance in rubles, request price, pages for heavy operations, bonuses and requests included in Business. ## Operations - [Word to PDF](https://smartpdf.ru/en/developers/docs/operations/word-to-pdf.md): /v1/pdf/word-to-pdf — Converts a Word document to PDF: fonts, tables and Cyrillic are preserved. - [JPG to PDF](https://smartpdf.ru/en/developers/docs/operations/jpg-to-pdf.md): /v1/pdf/jpg-to-pdf — Builds a PDF from images: each image becomes a separate page. - [Excel to PDF](https://smartpdf.ru/en/developers/docs/operations/xlsx-to-pdf.md): /v1/pdf/xlsx-to-pdf — Converts an Excel spreadsheet to PDF. Sheets, print area and scaling are taken from the file’s print settings. - [PowerPoint to PDF](https://smartpdf.ru/en/developers/docs/operations/pptx-to-pdf.md): /v1/pdf/pptx-to-pdf — Converts a PowerPoint presentation to PDF: one slide per page. - [HTML to PDF](https://smartpdf.ru/en/developers/docs/operations/html-to-pdf.md): /v1/pdf/html-to-pdf — Turns an HTML file into a PDF. External resources aren’t loaded: images and fonts must be embedded (data:), and styles must be in the file itself. - [PDF to Word](https://smartpdf.ru/en/developers/docs/operations/pdf-to-word.md): /v1/pdf/to-word — Converts a PDF to an editable Word document. For a scan without a text layer (the upload has text_layer: false), use ocr: true: the text is recognized and assembled into Word as paragraphs. - [PDF to Excel](https://smartpdf.ru/en/developers/docs/operations/pdf-to-excel.md): /v1/pdf/to-excel — Extracts tables from a PDF into Excel. - [PDF to PowerPoint](https://smartpdf.ru/en/developers/docs/operations/pdf-to-pptx.md): /v1/pdf/to-pptx — Converts a PDF to a PowerPoint presentation: each page becomes a separate slide. - [PDF to JPG](https://smartpdf.ru/en/developers/docs/operations/pdf-to-jpg.md): /v1/pdf/to-jpg — Saves PDF pages as JPG images. The result is a ZIP archive: page-1.jpg, page-2.jpg… - [PDF to text](https://smartpdf.ru/en/developers/docs/operations/pdf-to-txt.md): /v1/pdf/to-txt — Extracts text from a PDF into a TXT file (UTF-8). - [Merge PDF](https://smartpdf.ru/en/developers/docs/operations/merge.md): /v1/pdf/merge — Merges several PDFs into one. The price is based on the total size of the files. - [Split PDF](https://smartpdf.ru/en/developers/docs/operations/split.md): /v1/pdf/split — Splits a PDF into parts. The result is a ZIP archive with PDF files. - [Compress PDF](https://smartpdf.ru/en/developers/docs/operations/compress.md): /v1/pdf/compress — Reduces the size of a PDF. The result is never larger than the original file. - [OCR PDF](https://smartpdf.ru/en/developers/docs/operations/ocr.md): /v1/pdf/ocr — Recognizes text in scans and adds an invisible text layer, so the PDF can be searched and copied. Up to 100 pages at a time. - [Flatten PDF](https://smartpdf.ru/en/developers/docs/operations/flatten.md): /v1/pdf/flatten — Flattens form fields and annotations into the pages: the document looks the same but can’t be edited. - [Rotate pages](https://smartpdf.ru/en/developers/docs/operations/rotate.md): /v1/pdf/rotate — Rotates PDF pages. - [Delete pages](https://smartpdf.ru/en/developers/docs/operations/delete-pages.md): /v1/pdf/delete-pages — Deletes pages from a PDF completely, together with their content. - [Extract pages](https://smartpdf.ru/en/developers/docs/operations/extract-pages.md): /v1/pdf/extract-pages — Saves the selected pages to a new PDF in the specified order. - [Reorder pages](https://smartpdf.ru/en/developers/docs/operations/reorder-pages.md): /v1/pdf/reorder-pages — Changes the page order. Pages you don’t list are added at the end in their original order. - [Add page numbers](https://smartpdf.ru/en/developers/docs/operations/add-page-numbers.md): /v1/pdf/add-page-numbers — Adds page numbers. - [Sign PDF](https://smartpdf.ru/en/developers/docs/operations/sign.md): /v1/pdf/sign — Places a visual signature on a page: text or an image. It is not an electronic signature. - [Protect PDF](https://smartpdf.ru/en/developers/docs/operations/protect.md): /v1/pdf/protect — Sets a password to open the PDF (AES-256). - [Unlock PDF](https://smartpdf.ru/en/developers/docs/operations/unlock.md): /v1/pdf/unlock — Removes the password from a PDF if you know it. - [Add watermark](https://smartpdf.ru/en/developers/docs/operations/watermark.md): /v1/pdf/watermark — Adds a watermark: text or a logo. Exactly one of the text and image_file_id parameters is required. - [Photo to PDF](https://smartpdf.ru/en/developers/docs/operations/photo-to-pdf.md): /v1/pdf/photo-to-pdf — Builds a PDF from phone photos: each photo becomes an A4 page in its own orientation, and downscaling makes the file lighter. “Document scan” mode finds the sheet in the photo, straightens the perspective and makes the background white. - [DjVu to PDF](https://smartpdf.ru/en/developers/docs/operations/djvu-to-pdf.md): /v1/pdf/djvu-to-pdf — Converts a DjVu book or scan to PDF. The DjVu text layer isn’t carried over: to make the text searchable, run the result through the OCR PDF operation. - [FB2 to PDF](https://smartpdf.ru/en/developers/docs/operations/fb2-to-pdf.md): /v1/pdf/fb2-to-pdf — Converts an FB2 book to PDF: chapters become bookmarks, and the author and title go into the file properties. - [EPUB to PDF](https://smartpdf.ru/en/developers/docs/operations/epub-to-pdf.md): /v1/pdf/epub-to-pdf — Converts an EPUB book to PDF: chapters from the table of contents (toc.ncx) become bookmarks. - [PDF to PNG](https://smartpdf.ru/en/developers/docs/operations/pdf-to-png.md): /v1/pdf/to-png — Saves PDF pages as lossless PNG images — for diagrams, drawings and screenshots. The result is a ZIP archive. - [PDF to Markdown](https://smartpdf.ru/en/developers/docs/operations/pdf-to-markdown.md): /v1/pdf/to-markdown — Converts a PDF to Markdown for AI models, knowledge bases and documentation: headings by font size, lists, tables, links, bold and italics. Page numbers at the page edges are removed. - [Compress image](https://smartpdf.ru/en/developers/docs/operations/compress-image.md): /v1/pdf/compress-image — Compresses photos by level or to a target size in KB. One photo comes back as a file, several as a ZIP archive. - [HEIC to JPG](https://smartpdf.ru/en/developers/docs/operations/heic-to-jpg.md): /v1/pdf/heic-to-jpg — Converts HEIC/HEIF photos from an iPhone to JPG with the original colors (the ICC profile is preserved). One photo comes back as a JPG, several as a ZIP archive. - [Image to text](https://smartpdf.ru/en/developers/docs/operations/image-to-text.md): /v1/pdf/image-to-text — Recognizes text in photos and images: the text of all photos goes into one file, each photo starting on a new page. - [PNG to JPG](https://smartpdf.ru/en/developers/docs/operations/png-to-jpg.md): /v1/pdf/png-to-jpg — Converts PNG images to JPG. Transparency becomes a white background. One image comes back as a JPG, several as a ZIP archive. - [JPG to PNG](https://smartpdf.ru/en/developers/docs/operations/jpg-to-png.md): /v1/pdf/jpg-to-png — Converts JPG images to PNG. Lossless. One image comes back as a PNG, several as a ZIP archive. - [WEBP to JPG](https://smartpdf.ru/en/developers/docs/operations/webp-to-jpg.md): /v1/pdf/webp-to-jpg — Converts WEBP images to JPG. Transparency becomes a white background; for animations, the first frame is used. One image comes back as a JPG, several as a ZIP archive. - [Resize image](https://smartpdf.ru/en/developers/docs/operations/resize-image.md): /v1/pdf/resize-image — Resizes photos by percentage or in pixels; the format is preserved. One photo comes back as a file, several as a ZIP archive. - [Crop image](https://smartpdf.ru/en/developers/docs/operations/crop-image.md): /v1/pdf/crop-image — Crops a photo to a frame; the format is preserved. - [Rotate image](https://smartpdf.ru/en/developers/docs/operations/rotate-image.md): /v1/pdf/rotate-image — Rotates and flips photos; the format is preserved. One photo comes back as a file, several as a ZIP archive. - [Word to JPG](https://smartpdf.ru/en/developers/docs/operations/word-to-jpg.md): /v1/pdf/word-to-jpg — Saves the pages of a Word document as JPG images. One page comes back as a JPG, several as a ZIP archive. - [PDF editor](https://smartpdf.ru/en/developers/docs/operations/edit.md): /v1/pdf/edit — Adds text, a signature, an image, whiteout (the text under it is removed from the file), markup and shapes to pages, and replaces lines of text. Objects are flattened into the pages. - [Grayscale PDF](https://smartpdf.ru/en/developers/docs/operations/grayscale.md): /v1/pdf/grayscale — Converts a PDF to grayscale — for printing and “black and white only” requirements. Text stays text: it can still be searched and copied. - [PDF to PDF/A](https://smartpdf.ru/en/developers/docs/operations/to-pdfa.md): /v1/pdf/to-pdfa — Converts a PDF to PDF/A, the long-term preservation format for archives, courts and government agencies. A document with an electronic signature isn’t converted: the signature would stop being valid. - [Repair PDF](https://smartpdf.ru/en/developers/docs/operations/repair.md): /v1/pdf/repair — Repairs a damaged PDF that won’t open or opens with an error. If there’s nothing to recover, you get an error and aren’t charged. - [Crop PDF](https://smartpdf.ru/en/developers/docs/operations/crop.md): /v1/pdf/crop — Crops PDF pages to a frame or trims white margins automatically. Content outside the frame stays in the file; to hide data, use redact. - [Redact personal data](https://smartpdf.ru/en/developers/docs/operations/redact.md): /v1/pdf/redact — Redacts personal data: finds it on its own (find) and/or takes the areas you pass (areas), then removes it from the file — no text or pixels remain under the black boxes. If nothing is found and there are no areas, you get an error and aren’t charged. - [Find personal data](https://smartpdf.ru/en/developers/docs/operations/find-personal-data.md): /v1/pdf/find-personal-data — Finds personal data in a PDF without changing the file. The result is JSON: {"pages": [{"page", "items": [{"kind", "text", "boxes"}]}], "scanned": [scanned pages without text], "total"}; boxes are [x0, y0, x1, y1] as fractions of the page and can be passed to redact as areas. ## MCP and agents - [MCP server](https://smartpdf.ru/en/developers/docs/mcp.md): The SmartPDF MCP server for AI agents: URL, API key, the list of tools, the price per call and how to connect a client. - [Passing files](https://smartpdf.ru/en/developers/docs/files.md): Passing files: public file links for MCP tools and uploading files from your computer through the REST API. - [Claude Code](https://smartpdf.ru/en/developers/docs/claude-code.md): The SmartPDF plugin or the claude mcp add command; the key comes from an environment variable. - [Claude Desktop](https://smartpdf.ru/en/developers/docs/claude-desktop.md): Connect SmartPDF to Claude Desktop: a connector with an Authorization header, or a config through mcp-remote (needs Node.js). - [Cursor](https://smartpdf.ru/en/developers/docs/cursor.md): Connect SmartPDF to Cursor: an mcp.json file with the server URL; the key comes from the SMARTPDF_API_KEY environment variable. - [VS Code](https://smartpdf.ru/en/developers/docs/vscode.md): mcp.json for the Copilot agent, with the key entered via secure input. - [Codex CLI](https://smartpdf.ru/en/developers/docs/codex.md): Connect SmartPDF to Codex CLI: the server in ~/.codex/config.toml, the key from an environment variable via bearer_token_env_var. - [Gemini CLI](https://smartpdf.ru/en/developers/docs/gemini.md): Connect SmartPDF to Gemini CLI: the server in settings.json with the httpUrl field or via gemini mcp add, the key from an environment variable. - [Windsurf and Cline](https://smartpdf.ru/en/developers/docs/other-clients.md): Connect SmartPDF to Windsurf (Devin Desktop), Cline and any other MCP client with Streamable HTTP and custom headers. - [n8n](https://smartpdf.ru/en/developers/docs/n8n.md): SmartPDF in n8n: the MCP Client Tool node for an AI Agent, or HTTP Request to the REST API for fixed workflows. - [Make](https://smartpdf.ru/en/developers/docs/make.md): SmartPDF in Make: the MCP Client app (beta) with AI, or the HTTP module with the REST API for permanent scenarios. ## Reference - [OpenAPI and Postman](https://smartpdf.ru/en/developers/docs/openapi.md): The OpenAPI schema for generating a client, a Postman collection with request examples and Swagger to try requests in a browser. ## Optional - [OpenAPI](https://smartpdf.ru/en/developers/openapi.json): schema of the public requests - [Postman](https://smartpdf.ru/en/developers/postman.json): request collection - Русская версия: https://smartpdf.ru/developers/llms.txt