{"openapi":"3.1.0","info":{"title":"SmartPDF API","description":"\nВсе операции асинхронные: `POST /v1/pdf/…` возвращает `task_id`, статус — `GET /v1/tasks/{task_id}`.\nАвторизация — заголовок `X-API-Key` с ключом из кабинета (раздел «API и MCP»).\nЗапрос оплачивается с баланса API аккаунта (общий для всех ключей и MCP): 1,25 ₽ за каждые начатые\n10 МБ входа (файл до 10 МБ — 1,25 ₽, 25 МБ — 3,75 ₽; у объединения считается сумма файлов). Тяжёлые\nоперации — ещё и по страницам, берётся большее: распознавание текста (OCR) — 1,25 ₽ за каждые 10 страниц\n(до 100 страниц за раз, больше — `422` без списания), PDF в Word / Excel / PowerPoint / JPG — за каждые\n50 страниц (JPG 300 dpi — за 25). Ставки — `GET /v1/pricing/api` (`page_rates`). На тарифе\nБизнес сначала расходуются 500 включённых обычных запросов месяца. Нет денег на балансе или исчерпан\nлимит ключа — `402` с объяснением, ничего не списано. Ошибка обработки возвращает оплату автоматически.\nОстаток — `GET /v1/api-keys/balance` (`balance`, `spent_month`, `request_price`, `included_remaining`),\nсписанное — `charge` и `charge_units` в `GET /v1/account/operations`. Пополнение, лимиты ключей,\nперевыпуск и удаление — в кабинете (раздел «API и MCP»).\n\n## Вебхуки\n\nПередайте в запросе операции `webhook_url` (только https) — по завершении SmartPDF отправит на него\n`POST` с JSON: `event` (`task.done` / `task.failed`), `task_id`, `operation_type`, `status`, `timestamp`,\n`download_url` и `filename` (для `task.done`, ссылка действует 1 час) или `error_message`.\nИмя результата — `<исходное имя>_smartpdf.<расширение>` (оно же в заголовке `Content-Disposition`).\nОтветьте кодом 2xx; иначе будет ещё 3 попытки (через 10, 30 и 90 секунд). Редиректы не выполняются.\n\nЗаголовки: `X-SmartPDF-Event`, `X-SmartPDF-Delivery` (id операции, одинаков у повторов — по нему\nотсекайте дубли) и `X-SmartPDF-Signature: t=<unix-время>,v1=<подпись>`.\n\n**Проверка подписи.** Секрет — кабинет → «API и MCP» (там же выпускается новый, старый сразу\nперестаёт действовать).\nПодпись — HMAC-SHA256 от строки `<t>.<тело запроса как есть>` в hex. Сравнивайте в постоянном\nвремени и отклоняйте запросы старше 5 минут.\n\n```python\nimport hashlib, hmac, time\n\ndef verify(secret: str, body: bytes, header: str) -> bool:\n    parts = dict(p.split(\"=\", 1) for p in header.split(\",\"))\n    ts = int(parts[\"t\"])\n    if abs(time.time() - ts) > 300:\n        return False\n    expected = hmac.new(secret.encode(), f\"{ts}.\".encode() + body, hashlib.sha256).hexdigest()\n    return hmac.compare_digest(expected, parts[\"v1\"])\n```\n\n```javascript\nconst crypto = require(\"crypto\");\n\nfunction verify(secret, rawBody, header) {\n  const parts = Object.fromEntries(header.split(\",\").map((p) => p.split(\"=\")));\n  if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;\n  const expected = crypto.createHmac(\"sha256\", secret).update(`${parts.t}.`).update(rawBody).digest(\"hex\");\n  return expected.length === parts.v1.length &&\n    crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));\n}\n```\n","version":"1.0.0"},"servers":[{"url":"https://api.smartpdf.ru"}],"paths":{"/v1/upload":{"post":{"tags":["upload"],"summary":"Upload File","operationId":"upload_file_v1_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_v1_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/upload/from-task/{task_id}":{"post":{"tags":["upload"],"summary":"Upload From Task","description":"Результат своей операции → новый входной файл («Что дальше» на сайте).\n\nФайл копируется внутри MinIO, как будто его загрузили заново: те же лимит\nразмера по тарифу, лимит загрузок гостя и срок жизни, что у POST /upload.\nСкачиванием не считается — result_expires_at не трогаем. На бесплатном\nтарифе результат после скачивания удаляется уборкой (до 15 мин) — тогда 410.","operationId":"upload_from_task_v1_upload_from_task__task_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/to-word":{"post":{"tags":["operations"],"summary":"Pdf To Word","operationId":"pdf_to_word_v1_pdf_to_word_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfToWordRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/word-to-pdf":{"post":{"tags":["operations"],"summary":"Word To Pdf","operationId":"word_to_pdf_v1_pdf_word_to_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WordToPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/merge":{"post":{"tags":["operations"],"summary":"Merge Pdf","operationId":"merge_pdf_v1_pdf_merge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/compress":{"post":{"tags":["operations"],"summary":"Compress Pdf","operationId":"compress_pdf_v1_pdf_compress_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompressRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/sign":{"post":{"tags":["operations"],"summary":"Sign Pdf","operationId":"sign_pdf_v1_pdf_sign_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/jpg-to-pdf":{"post":{"tags":["operations"],"summary":"Jpg To Pdf","operationId":"jpg_to_pdf_v1_pdf_jpg_to_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JpgToPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/photo-to-pdf":{"post":{"tags":["operations"],"summary":"Photo To Pdf","description":"«Фото в PDF» (change photo-to-pdf; в API — с change api-all-tools): лист A4, уменьшение, оттенки серого,\nрежим «Скан документа». Своя строка photo_to_pdf в истории и статистике.","operationId":"photo_to_pdf_v1_pdf_photo_to_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoToPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/pptx-to-pdf":{"post":{"tags":["operations"],"summary":"Pptx To Pdf","operationId":"pptx_to_pdf_v1_pdf_pptx_to_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PptxToPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/xlsx-to-pdf":{"post":{"tags":["operations"],"summary":"Xlsx To Pdf","operationId":"xlsx_to_pdf_v1_pdf_xlsx_to_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XlsxToPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/html-to-pdf":{"post":{"tags":["operations"],"summary":"Html To Pdf","operationId":"html_to_pdf_v1_pdf_html_to_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HtmlToPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/to-jpg":{"post":{"tags":["operations"],"summary":"Pdf To Jpg","operationId":"pdf_to_jpg_v1_pdf_to_jpg_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfToJpgRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/to-pptx":{"post":{"tags":["operations"],"summary":"Pdf To Pptx","operationId":"pdf_to_pptx_v1_pdf_to_pptx_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfToPptxRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/to-excel":{"post":{"tags":["operations"],"summary":"Pdf To Excel","operationId":"pdf_to_excel_v1_pdf_to_excel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfToExcelRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/split":{"post":{"tags":["operations"],"summary":"Split Pdf","operationId":"split_pdf_v1_pdf_split_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/ocr":{"post":{"tags":["operations"],"summary":"Ocr Pdf","operationId":"ocr_pdf_v1_pdf_ocr_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/rotate":{"post":{"tags":["operations"],"summary":"Rotate Pdf","operationId":"rotate_pdf_v1_pdf_rotate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/delete-pages":{"post":{"tags":["operations"],"summary":"Delete Pages","operationId":"delete_pages_v1_pdf_delete_pages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePagesRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/extract-pages":{"post":{"tags":["operations"],"summary":"Extract Pages","operationId":"extract_pages_v1_pdf_extract_pages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractPagesRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/reorder-pages":{"post":{"tags":["operations"],"summary":"Reorder Pages","operationId":"reorder_pages_v1_pdf_reorder_pages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderPagesRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/protect":{"post":{"tags":["operations"],"summary":"Protect Pdf","operationId":"protect_pdf_v1_pdf_protect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtectRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/unlock":{"post":{"tags":["operations"],"summary":"Unlock Pdf","operationId":"unlock_pdf_v1_pdf_unlock_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlockRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/watermark":{"post":{"tags":["operations"],"summary":"Watermark Pdf","operationId":"watermark_pdf_v1_pdf_watermark_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatermarkRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/add-page-numbers":{"post":{"tags":["operations"],"summary":"Add Page Numbers","operationId":"add_page_numbers_v1_pdf_add_page_numbers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPageNumbersRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/to-txt":{"post":{"tags":["operations"],"summary":"Pdf To Txt","operationId":"pdf_to_txt_v1_pdf_to_txt_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfToTxtRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/flatten":{"post":{"tags":["operations"],"summary":"Flatten Pdf","operationId":"flatten_pdf_v1_pdf_flatten_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlattenRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/to-png":{"post":{"tags":["operations"],"summary":"Pdf To Png","operationId":"pdf_to_png_v1_pdf_to_png_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfToPngRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/crop":{"post":{"tags":["operations"],"summary":"Crop Pdf","description":"«Обрезать PDF» (change crop-pdf): область долями видимой страницы или белые поля автоматически.","operationId":"crop_pdf_v1_pdf_crop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CropRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/edit":{"post":{"tags":["operations"],"summary":"Edit Pdf","description":"«Редактор PDF» (change pdf-editor): объекты поверх страниц. Картинки и подпись картинкой — загрузки этого же\nпользователя (file_id), в задачу идут их ключи и номер в объекте. Подпись входит в лимит подписей free (D7).","operationId":"edit_pdf_v1_pdf_edit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/redact":{"post":{"tags":["operations"],"summary":"Redact Pdf","description":"«Скрыть персональные данные» (change redact-pdf): области удаляются из файла, скрытые данные файла — тоже.","operationId":"redact_pdf_v1_pdf_redact_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/find-personal-data":{"post":{"tags":["operations"],"summary":"Find Personal Data","description":"Поиск персональных данных (change api-all-tools): результат — JSON с местами на страницах, файл не меняется.\nНа сайте поиск — служебный запрос без списания (/upload/{id}/personal-data).","operationId":"find_personal_data_v1_pdf_find_personal_data_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindPersonalDataRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/to-markdown":{"post":{"tags":["operations"],"summary":"Pdf To Markdown","description":"«PDF в Markdown»: заголовки, списки, таблицы, ссылки; скан — с распознаванием (ocr).","operationId":"pdf_to_markdown_v1_pdf_to_markdown_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfToMarkdownRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/grayscale":{"post":{"tags":["operations"],"summary":"Grayscale Pdf","description":"«PDF в ч/б»: оттенки серого через Ghostscript, текст остаётся текстом.","operationId":"grayscale_pdf_v1_pdf_grayscale_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrayscaleRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/to-pdfa":{"post":{"tags":["operations"],"summary":"Pdf To Pdfa","description":"«PDF/A»: PDF/A-1b, 2b или 3b без распознавания текста.","operationId":"pdf_to_pdfa_v1_pdf_to_pdfa_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfaRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/repair":{"post":{"tags":["operations"],"summary":"Repair Pdf","description":"«Восстановить PDF»: битый файл — загрузка проверила только сигнатуру %PDF, открыть его не обязательно.","operationId":"repair_pdf_v1_pdf_repair_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepairRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/djvu-to-pdf":{"post":{"tags":["operations"],"summary":"Djvu To Pdf","operationId":"djvu_to_pdf_v1_pdf_djvu_to_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DjvuToPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/heic-to-jpg":{"post":{"tags":["operations"],"summary":"Heic To Jpg","description":"«HEIC в JPG» (change heic-to-jpg): одно фото — JPG, несколько — ZIP; одна операция на запуск.","operationId":"heic_to_jpg_v1_pdf_heic_to_jpg_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeicToJpgRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/compress-image":{"post":{"tags":["operations"],"summary":"Compress Image","operationId":"compress_image_v1_pdf_compress_image_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompressImagesRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/resize-image":{"post":{"tags":["operations"],"summary":"Resize Image","description":"«Изменить размер фото» (change quick-tools).","operationId":"resize_image_v1_pdf_resize_image_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResizeImagesRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/rotate-image":{"post":{"tags":["operations"],"summary":"Rotate Image","description":"«Повернуть фото» (change quick-tools).","operationId":"rotate_image_v1_pdf_rotate_image_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateImagesRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/crop-image":{"post":{"tags":["operations"],"summary":"Crop Image","description":"«Обрезать фото» (change quick-tools): одно фото, рамка долями кадра.","operationId":"crop_image_v1_pdf_crop_image_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CropImageRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/word-to-jpg":{"post":{"tags":["operations"],"summary":"Word To Jpg","description":"«Word в JPG» (change quick-tools): LibreOffice → PDF → страницы в JPG; одна страница — JPG, несколько — ZIP.","operationId":"word_to_jpg_v1_pdf_word_to_jpg_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WordToJpgRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/image-to-text":{"post":{"tags":["operations"],"summary":"Image To Text","description":"«Фото в текст» (change image-to-text): текст всех фото — в один TXT или DOCX.","operationId":"image_to_text_v1_pdf_image_to_text_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageToTextRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/png-to-jpg":{"post":{"tags":["operations"],"summary":"Png To Jpg","operationId":"png_to_jpg_v1_pdf_png_to_jpg_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagesRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/jpg-to-png":{"post":{"tags":["operations"],"summary":"Jpg To Png","operationId":"jpg_to_png_v1_pdf_jpg_to_png_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagesRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/webp-to-jpg":{"post":{"tags":["operations"],"summary":"Webp To Jpg","operationId":"webp_to_jpg_v1_pdf_webp_to_jpg_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagesRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/fb2-to-pdf":{"post":{"tags":["operations"],"summary":"Fb2 To Pdf","operationId":"fb2_to_pdf_v1_pdf_fb2_to_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EbookToPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdf/epub-to-pdf":{"post":{"tags":["operations"],"summary":"Epub To Pdf","operationId":"epub_to_pdf_v1_pdf_epub_to_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EbookToPdfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tasks/{task_id}":{"get":{"tags":["tasks"],"summary":"Get Task Status","operationId":"get_task_status_v1_tasks__task_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tasks/{task_id}/download":{"get":{"tags":["tasks"],"summary":"Get Download Url","operationId":"get_download_url_v1_tasks__task_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tasks/{task_id}/file":{"get":{"tags":["tasks"],"summary":"Download File","operationId":"download_file_v1_tasks__task_id__file_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/balance":{"get":{"tags":["api-keys"],"summary":"Get Balance","description":"Баланс API аккаунта (общий для всех ключей), траты месяца и цена запроса. Доступен и ключом.","operationId":"get_balance_v1_api_keys_balance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pricing":{"get":{"tags":["pricing"],"summary":"Get Public Pricing","operationId":"get_public_pricing_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PriceItem"},"type":"array","title":"Response Get Public Pricing V1 Pricing Get"}}}}}}},"/v1/pricing/api":{"get":{"tags":["pricing"],"summary":"Get Api Pricing","operationId":"get_api_pricing_v1_pricing_api_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPricing"}}}}}}}},"components":{"schemas":{"AddPageNumbersRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"position":{"type":"string","enum":["bottom-center","bottom-right","top-center","top-right"],"title":"Position","default":"bottom-center"},"start_from":{"type":"integer","minimum":1,"title":"Start From","default":1},"prefix":{"type":"string","title":"Prefix","default":""},"font_size":{"type":"integer","maximum":72,"minimum":6,"title":"Font Size","default":12},"pages":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"string","const":"all"}],"title":"Pages","default":"all"}},"type":"object","required":["file_id"],"title":"AddPageNumbersRequest"},"ApiKeyBalanceResponse":{"properties":{"balance":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Balance"},"spent_month":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Spent Month"},"request_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Request Price"},"request_unit_mb":{"type":"integer","title":"Request Unit Mb"},"included_limit":{"type":"integer","title":"Included Limit","default":0},"included_used":{"type":"integer","title":"Included Used","default":0},"included_remaining":{"type":"integer","title":"Included Remaining","default":0},"included_resets_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Included Resets At"}},"type":"object","required":["balance","spent_month","request_price","request_unit_mb"],"title":"ApiKeyBalanceResponse"},"ApiPricing":{"properties":{"request_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Request Price"},"request_unit_mb":{"type":"integer","title":"Request Unit Mb"},"topup_min":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Topup Min"},"topup_max":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Topup Max"},"trial":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Trial"},"business_included":{"type":"integer","title":"Business Included"},"bonuses":{"items":{"$ref":"#/components/schemas/TopupBonus"},"type":"array","title":"Bonuses"},"page_rates":{"items":{"$ref":"#/components/schemas/PageRate"},"type":"array","title":"Page Rates"},"ocr_max_pages":{"type":"integer","title":"Ocr Max Pages"}},"type":"object","required":["request_price","request_unit_mb","topup_min","topup_max","trial","business_included","bonuses","page_rates","ocr_max_pages"],"title":"ApiPricing","description":"Условия API/MCP для лендинга и кабинета — одно место вместо копий на фронтенде."},"Body_upload_file_v1_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_v1_upload_post"},"CompressImagesRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"File Ids"},"level":{"type":"string","enum":["light","medium","strong"],"title":"Level","default":"medium"},"target_kb":{"anyOf":[{"type":"number","maximum":50000,"minimum":10},{"type":"null"}],"title":"Target Kb"}},"type":"object","required":["file_ids"],"title":"CompressImagesRequest","description":"«Сжать фото»: light — высокое качество, medium — до 2560 px, strong — до 1600 px; target_kb (1 КБ = 1000 байт)\n— сжать до размера, level тогда не используется."},"CompressRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"level":{"type":"string","enum":["low","medium","high"],"title":"Level","default":"medium"},"target_mb":{"anyOf":[{"type":"number","maximum":500,"minimum":0.1},{"type":"null"}],"title":"Target Mb"}},"type":"object","required":["file_id"],"title":"CompressRequest"},"CropImageRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"box":{"items":{"type":"number","maximum":1,"minimum":0},"type":"array","maxItems":4,"minItems":4,"title":"Box"}},"type":"object","required":["file_id","box"],"title":"CropImageRequest","description":"box — [x0, y0, x1, y1] долями кадра, повёрнутого по EXIF."},"CropRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"mode":{"type":"string","enum":["box","auto"],"title":"Mode","default":"box"},"box":{"anyOf":[{"items":{"type":"number"},"type":"array","maxItems":4,"minItems":4},{"type":"null"}],"title":"Box"},"pages":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"string","const":"all"}],"title":"Pages","default":"all"}},"type":"object","required":["file_id"],"title":"CropRequest","description":"«Обрезать PDF»: mode \"box\" — box [x0, y0, x1, y1] долями видимой страницы, \"auto\" — убрать белые поля."},"DeletePagesRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"pages":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Pages"}},"type":"object","required":["file_id","pages"],"title":"DeletePagesRequest"},"DjvuToPdfRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"}},"type":"object","required":["file_id"],"title":"DjvuToPdfRequest","description":"«DjVu в PDF»."},"DownloadUrlResponse":{"properties":{"download_url":{"type":"string","title":"Download Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["download_url","expires_at","filename"],"title":"DownloadUrlResponse"},"EbookToPdfRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"page":{"type":"string","enum":["a5","a4"],"title":"Page","default":"a5"}},"type":"object","required":["file_id"],"title":"EbookToPdfRequest","description":"«FB2 в PDF» и «EPUB в PDF»: страница A5 или A4."},"EditBoxObject":{"properties":{"page":{"type":"integer","maximum":100000,"minimum":1,"title":"Page"},"type":{"type":"string","enum":["whiteout","highlight","rect","ellipse","check","cross"],"title":"Type"},"box":{"items":{"type":"number","maximum":1.5,"minimum":-0.5},"type":"array","maxItems":4,"minItems":4,"title":"Box"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color","default":"#000000"},"width":{"type":"number","maximum":50,"minimum":0.25,"title":"Width","default":2},"fill":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Fill"}},"additionalProperties":false,"type":"object","required":["page","type","box"],"title":"EditBoxObject"},"EditImageObject":{"properties":{"page":{"type":"integer","maximum":100000,"minimum":1,"title":"Page"},"type":{"type":"string","const":"image","title":"Type"},"box":{"items":{"type":"number","maximum":1.5,"minimum":-0.5},"type":"array","maxItems":4,"minItems":4,"title":"Box"},"file_id":{"type":"string","maxLength":64,"title":"File Id"}},"additionalProperties":false,"type":"object","required":["page","type","box","file_id"],"title":"EditImageObject"},"EditPdfRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"objects":{"items":{"oneOf":[{"$ref":"#/components/schemas/EditTextObject"},{"$ref":"#/components/schemas/EditSignatureObject"},{"$ref":"#/components/schemas/EditImageObject"},{"$ref":"#/components/schemas/EditBoxObject"},{"$ref":"#/components/schemas/EditStrokeObject"},{"$ref":"#/components/schemas/EditReplaceTextObject"}],"discriminator":{"propertyName":"type","mapping":{"arrow":"#/components/schemas/EditStrokeObject","check":"#/components/schemas/EditBoxObject","cross":"#/components/schemas/EditBoxObject","ellipse":"#/components/schemas/EditBoxObject","highlight":"#/components/schemas/EditBoxObject","image":"#/components/schemas/EditImageObject","ink":"#/components/schemas/EditStrokeObject","line":"#/components/schemas/EditStrokeObject","rect":"#/components/schemas/EditBoxObject","replace_text":"#/components/schemas/EditReplaceTextObject","signature":"#/components/schemas/EditSignatureObject","text":"#/components/schemas/EditTextObject","whiteout":"#/components/schemas/EditBoxObject"}}},"type":"array","maxItems":500,"minItems":1,"title":"Objects"}},"type":"object","required":["file_id","objects"],"title":"EditPdfRequest","description":"«Редактор PDF»: объекты поверх страниц (текст, подпись, картинка, «Закрасить», фигуры) и замена строк текста."},"EditReplaceTextObject":{"properties":{"page":{"type":"integer","maximum":100000,"minimum":1,"title":"Page"},"type":{"type":"string","const":"replace_text","title":"Type"},"box":{"items":{"type":"number","maximum":1.5,"minimum":-0.5},"type":"array","maxItems":4,"minItems":4,"title":"Box"},"x":{"type":"number","maximum":1.5,"minimum":-0.5,"title":"X"},"baseline":{"type":"number","maximum":1.5,"minimum":-0.5,"title":"Baseline"},"text":{"type":"string","maxLength":2000,"title":"Text","default":""},"font":{"type":"string","enum":["sans","serif","mono"],"title":"Font","default":"sans"},"bold":{"type":"boolean","title":"Bold","default":false},"italic":{"type":"boolean","title":"Italic","default":false},"size":{"type":"number","maximum":200,"minimum":1,"title":"Size","default":12},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color","default":"#000000"}},"additionalProperties":false,"type":"object","required":["page","type","box","x","baseline"],"title":"EditReplaceTextObject","description":"«Изменить текст» (этап B): box и baseline — исходная строка (GET /upload/{id}/text), text — новая строка\n(пустая — строку удалить), x — её начало."},"EditSignatureObject":{"properties":{"page":{"type":"integer","maximum":100000,"minimum":1,"title":"Page"},"type":{"type":"string","const":"signature","title":"Type"},"box":{"items":{"type":"number","maximum":1.5,"minimum":-0.5},"type":"array","maxItems":4,"minItems":4,"title":"Box"},"file_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"File Id"},"lines":{"anyOf":[{"items":{"type":"string","maxLength":200},"type":"array","maxItems":3,"minItems":1},{"type":"null"}],"title":"Lines"},"size":{"type":"number","maximum":200,"minimum":4,"title":"Size","default":24},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color","default":"#000000"}},"additionalProperties":false,"type":"object","required":["page","type","box"],"title":"EditSignatureObject","description":"Подпись: картинкой (file_id загрузки — нарисованная или загруженная) или введённая (строка рукописным шрифтом)."},"EditStrokeObject":{"properties":{"page":{"type":"integer","maximum":100000,"minimum":1,"title":"Page"},"type":{"type":"string","enum":["line","arrow","ink"],"title":"Type"},"points":{"items":{"items":{"type":"number","maximum":1.5,"minimum":-0.5},"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":5000,"minItems":2,"title":"Points"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color","default":"#000000"},"width":{"type":"number","maximum":50,"minimum":0.25,"title":"Width","default":2}},"additionalProperties":false,"type":"object","required":["page","type","points"],"title":"EditStrokeObject"},"EditTextObject":{"properties":{"page":{"type":"integer","maximum":100000,"minimum":1,"title":"Page"},"type":{"type":"string","const":"text","title":"Type"},"box":{"items":{"type":"number","maximum":1.5,"minimum":-0.5},"type":"array","maxItems":4,"minItems":4,"title":"Box"},"lines":{"anyOf":[{"items":{"type":"string","maxLength":5000},"type":"array","maxItems":500,"minItems":1},{"type":"null"}],"title":"Lines"},"text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Text"},"font":{"type":"string","enum":["sans","serif","mono"],"title":"Font","default":"sans"},"bold":{"type":"boolean","title":"Bold","default":false},"italic":{"type":"boolean","title":"Italic","default":false},"size":{"type":"number","maximum":200,"minimum":4,"title":"Size","default":12},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color","default":"#000000"}},"additionalProperties":false,"type":"object","required":["page","type","box"],"title":"EditTextObject","description":"Текст: lines — строки, уже перенесённые по ширине рамки (так шлёт редактор сайта, D3), или text — целиком, тогда\nстроки переносит сервер по ширине box (API). box[0], box[1] — левый верхний угол."},"ExtractPagesRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"pages":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Pages"}},"type":"object","required":["file_id","pages"],"title":"ExtractPagesRequest"},"FindPersonalDataRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"kinds":{"items":{"type":"string","enum":["passport","snils","inn","phone","email","card","account"]},"type":"array","maxItems":7,"title":"Kinds"},"words":{"items":{"type":"string","maxLength":100},"type":"array","maxItems":50,"title":"Words"},"file_id":{"type":"string","title":"File Id"}},"type":"object","required":["file_id"],"title":"FindPersonalDataRequest","description":"Найти персональные данные: результат — JSON {pages: [{page, items: [{kind, text, boxes}]}], scanned, total}."},"FlattenRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"}},"type":"object","required":["file_id"],"title":"FlattenRequest"},"GrayscaleRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"}},"type":"object","required":["file_id"],"title":"GrayscaleRequest","description":"«PDF в ч/б»: оттенки серого, текст остаётся текстом."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeicToJpgRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"File Ids"},"compact":{"type":"boolean","title":"Compact","default":false},"keep_metadata":{"type":"boolean","title":"Keep Metadata","default":false}},"type":"object","required":["file_ids"],"title":"HeicToJpgRequest","description":"«HEIC в JPG»: одно фото — JPG, несколько — ZIP. Число фото — по тарифу (MERGE_FILE_LIMITS)."},"HtmlToPdfRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"page_size":{"type":"string","enum":["A4","A3","Letter"],"title":"Page Size","default":"A4"},"orientation":{"type":"string","enum":["portrait","landscape"],"title":"Orientation","default":"portrait"},"margin":{"type":"string","enum":["standard","narrow","none"],"title":"Margin","default":"standard"}},"type":"object","title":"HtmlToPdfRequest"},"ImageToTextRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"File Ids"},"languages":{"items":{"type":"string","enum":["rus","eng","deu","fra"]},"type":"array","maxItems":4,"minItems":1,"title":"Languages","default":["rus","eng"]},"format":{"type":"string","enum":["txt","docx"],"title":"Format","default":"txt"}},"type":"object","required":["file_ids"],"title":"ImageToTextRequest","description":"«Фото в текст»: текст всех фото — в один TXT или DOCX. Языки — установленные в образе Tesseract."},"ImagesRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"File Ids"}},"type":"object","required":["file_ids"],"title":"ImagesRequest","description":"Инструменты картинок (change image-tools). Число файлов — по тарифу (MERGE_FILE_LIMITS)."},"JpgToPdfRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"File Ids"},"order":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Order"},"fit":{"type":"string","enum":["auto","portrait","landscape"],"title":"Fit","default":"auto"}},"type":"object","required":["file_ids"],"title":"JpgToPdfRequest"},"MergeRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_ids":{"items":{"type":"string"},"type":"array","minItems":2,"title":"File Ids"},"order":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Order"}},"type":"object","required":["file_ids"],"title":"MergeRequest"},"OcrRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"languages":{"items":{"type":"string","enum":["rus","eng","deu","fra"]},"type":"array","maxItems":4,"minItems":1,"title":"Languages","default":["rus","eng"]}},"type":"object","required":["file_id"],"title":"OcrRequest"},"PageRate":{"properties":{"operation_type":{"type":"string","title":"Operation Type"},"pages_per_unit":{"type":"integer","title":"Pages Per Unit"},"min_dpi":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Dpi"}},"type":"object","required":["operation_type","pages_per_unit"],"title":"PageRate"},"PdfToExcelRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"layout":{"type":"string","enum":["per-table","single-sheet"],"title":"Layout","default":"per-table"}},"type":"object","required":["file_id"],"title":"PdfToExcelRequest"},"PdfToJpgRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"dpi":{"type":"integer","enum":[72,150,300],"title":"Dpi","default":150},"pages":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Pages"}},"type":"object","required":["file_id"],"title":"PdfToJpgRequest"},"PdfToMarkdownRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"ocr":{"type":"boolean","title":"Ocr","default":false}},"type":"object","required":["file_id"],"title":"PdfToMarkdownRequest","description":"«PDF в Markdown» (change pdf-to-markdown). ocr — скан без текстового слоя: сначала распознать (rus, eng);\nцена в API — как у OCR, до 100 страниц."},"PdfToPngRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"dpi":{"type":"integer","enum":[72,150,300],"title":"Dpi","default":150}},"type":"object","required":["file_id"],"title":"PdfToPngRequest","description":"«PDF в PNG»: страницы — PNG в ZIP."},"PdfToPptxRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"}},"type":"object","required":["file_id"],"title":"PdfToPptxRequest"},"PdfToTxtRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"mode":{"type":"string","enum":["text","words","blocks"],"title":"Mode","default":"text"}},"type":"object","required":["file_id"],"title":"PdfToTxtRequest"},"PdfToWordRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"ocr":{"type":"boolean","title":"Ocr","default":false}},"type":"object","required":["file_id"],"title":"PdfToWordRequest"},"PdfaRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"version":{"type":"string","enum":["1","2","3"],"title":"Version","default":"2"}},"type":"object","required":["file_id"],"title":"PdfaRequest","description":"«PDF/A»: PDF/A-1b, 2b или 3b без распознавания текста."},"PersonalDataSearchRequest":{"properties":{"kinds":{"items":{"type":"string","enum":["passport","snils","inn","phone","email","card","account"]},"type":"array","maxItems":7,"title":"Kinds"},"words":{"items":{"type":"string","maxLength":100},"type":"array","maxItems":50,"title":"Words"}},"type":"object","title":"PersonalDataSearchRequest","description":"Что искать: виды номеров и свои слова (ФИО, адрес — каждое от 3 символов)."},"PhotoToPdfRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"File Ids"},"order":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Order"},"page":{"type":"string","enum":["a4","photo"],"title":"Page","default":"a4"},"compact":{"type":"boolean","title":"Compact","default":true},"grayscale":{"type":"boolean","title":"Grayscale","default":false},"mode":{"type":"string","enum":["photo","scan"],"title":"Mode","default":"photo"},"scan_color":{"type":"string","enum":["bw","color"],"title":"Scan Color","default":"bw"},"corners":{"anyOf":[{"items":{"anyOf":[{"items":{"items":{"type":"number","maximum":1,"minimum":0},"type":"array","maxItems":2,"minItems":2},"type":"array"},{"type":"null"}]},"type":"array"},{"type":"null"}],"title":"Corners"}},"type":"object","required":["file_ids"],"title":"PhotoToPdfRequest","description":"«Фото в PDF»: page \"a4\" — лист A4 в ориентации фото, \"photo\" — страница по размеру фото; compact — до 2000 px,\nJPEG без EXIF; mode \"scan\" — «Скан документа». Число фото — по тарифу (MERGE_FILE_LIMITS)."},"PptxToPdfRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"}},"type":"object","required":["file_id"],"title":"PptxToPdfRequest"},"PriceItem":{"properties":{"key":{"type":"string","title":"Key"},"category":{"type":"string","title":"Category"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["key","category","amount","currency"],"title":"PriceItem"},"ProtectRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"user_password":{"type":"string","minLength":1,"title":"User Password"},"owner_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Password"}},"type":"object","required":["file_id","user_password"],"title":"ProtectRequest"},"RedactArea":{"properties":{"page":{"type":"integer","maximum":100000,"minimum":1,"title":"Page"},"box":{"items":{"type":"number","maximum":1.5,"minimum":-0.5},"type":"array","maxItems":4,"minItems":4,"title":"Box"}},"additionalProperties":false,"type":"object","required":["page","box"],"title":"RedactArea"},"RedactRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"areas":{"items":{"$ref":"#/components/schemas/RedactArea"},"type":"array","maxItems":5000,"title":"Areas"},"find":{"anyOf":[{"$ref":"#/components/schemas/PersonalDataSearchRequest"},{"type":"null"}]},"clean":{"type":"boolean","title":"Clean","default":true}},"type":"object","required":["file_id"],"title":"RedactRequest","description":"Области (доли видимой страницы) удаляются и закрашиваются чёрным; find — ещё и найти персональные данные и\nскрыть их тем же запросом (API); clean — убрать скрытые данные файла. Нужно areas, find или оба."},"ReorderPagesRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"new_order":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"New Order"}},"type":"object","required":["file_id","new_order"],"title":"ReorderPagesRequest"},"RepairRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"}},"type":"object","required":["file_id"],"title":"RepairRequest","description":"«Восстановить PDF»: повреждённый файл пересобирается."},"ResizeImagesRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"File Ids"},"mode":{"type":"string","enum":["percent","pixels"],"title":"Mode","default":"percent"},"percent":{"anyOf":[{"type":"number","maximum":500,"minimum":1},{"type":"null"}],"title":"Percent","default":50},"width":{"anyOf":[{"type":"integer","maximum":10000,"minimum":1},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer","maximum":10000,"minimum":1},{"type":"null"}],"title":"Height"},"keep_aspect":{"type":"boolean","title":"Keep Aspect","default":true},"enlarge":{"type":"boolean","title":"Enlarge","default":false}},"type":"object","required":["file_ids"],"title":"ResizeImagesRequest","description":"mode=percent — percent (1–500); mode=pixels — width и/или height; keep_aspect — по меньшему из масштабов."},"RotateImagesRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"File Ids"},"angle":{"type":"integer","enum":[0,90,180,270],"title":"Angle","default":90},"flip":{"anyOf":[{"type":"string","enum":["horizontal","vertical"]},{"type":"null"}],"title":"Flip"}},"type":"object","required":["file_ids"],"title":"RotateImagesRequest","description":"angle — по часовой; flip — отражение после поворота."},"RotateRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"pages":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"string","const":"all"}],"title":"Pages","default":"all"},"angle":{"type":"integer","enum":[90,180,270],"title":"Angle","default":90}},"type":"object","required":["file_id"],"title":"RotateRequest"},"SignRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"signature_data":{"type":"string","maxLength":3000000,"minLength":1,"title":"Signature Data"},"page":{"type":"integer","minimum":1,"title":"Page","default":1},"x":{"type":"number","maximum":1,"minimum":0,"title":"X","default":0.1},"y":{"type":"number","maximum":1,"minimum":0,"title":"Y","default":0.85},"width":{"type":"number","maximum":1,"exclusiveMinimum":0,"title":"Width","default":0.2},"height":{"type":"number","maximum":1,"exclusiveMinimum":0,"title":"Height","default":0.05}},"type":"object","required":["file_id","signature_data"],"title":"SignRequest"},"SplitPdfRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"mode":{"type":"string","enum":["every-page","ranges","half"],"title":"Mode","default":"every-page"},"ranges":{"anyOf":[{"items":{"prefixItems":[{"type":"integer"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},"type":"array"},{"type":"null"}],"title":"Ranges"}},"type":"object","required":["file_id"],"title":"SplitPdfRequest"},"TaskIdResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"}},"type":"object","required":["task_id"],"title":"TaskIdResponse"},"TaskStatusResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"progress":{"type":"integer","title":"Progress","default":0},"estimated_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Seconds"},"input_file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input File Size"},"output_file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output File Size"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"}},"type":"object","required":["task_id","status"],"title":"TaskStatusResponse"},"TopupBonus":{"properties":{"from_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"From Amount"},"percent":{"type":"integer","title":"Percent"}},"type":"object","required":["from_amount","percent"],"title":"TopupBonus"},"UnlockRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"password":{"type":"string","minLength":1,"title":"Password"}},"type":"object","required":["file_id","password"],"title":"UnlockRequest"},"UploadResponse":{"properties":{"file_id":{"type":"string","title":"File Id"},"filename":{"type":"string","title":"Filename"},"size":{"type":"integer","title":"Size"},"text_layer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Text Layer"}},"type":"object","required":["file_id","filename","size"],"title":"UploadResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WatermarkRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"image_file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image File Id"},"font_size":{"type":"integer","maximum":200,"minimum":8,"title":"Font Size","default":48},"color":{"type":"string","title":"Color","default":"#FF0000"},"opacity":{"type":"number","maximum":1,"minimum":0,"title":"Opacity","default":0.3},"angle":{"type":"number","maximum":180,"minimum":-180,"title":"Angle","default":45},"position":{"type":"string","enum":["center","tile","top-left","top-right","bottom-left","bottom-right"],"title":"Position","default":"center"},"pages":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"string","const":"all"}],"title":"Pages","default":"all"},"scale":{"type":"number","maximum":2,"minimum":0.1,"title":"Scale","default":0.3}},"type":"object","required":["file_id"],"title":"WatermarkRequest"},"WordToJpgRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"},"dpi":{"type":"integer","enum":[72,150,300],"title":"Dpi","default":150}},"type":"object","required":["file_id"],"title":"WordToJpgRequest"},"WordToPdfRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"}},"type":"object","required":["file_id"],"title":"WordToPdfRequest"},"XlsxToPdfRequest":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"},"file_id":{"type":"string","title":"File Id"}},"type":"object","required":["file_id"],"title":"XlsxToPdfRequest"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}