{"openapi":"3.1.0","info":{"title":"PDF Efforts API","version":"1.0.0","description":"Free PDF tools for AI agents: merge, split, compress, convert (Word/Excel/PowerPoint/images/web pages to PDF and back), OCR, protect/unlock, watermark, page numbers and more. Files are processed on the PDF Efforts server and deleted within 60 minutes. No API key.\n\nPDF Efforts (pdfefforts.com) – free PDF tools. No API key.\n- Send files as {\"url\": \"https://…\"} (public direct link), {\"base64\": \"…\", \"filename\": \"x.pdf\"} or {\"file_id\": \"…\"} from an earlier result. Base64 requests are limited to about 32 MB in total; use URLs for bigger files.\n- Results come back as download links plus a file_id you can pass to the next tool (e.g. merge_pdfs → compress_pdf → protect_pdf).\n- Privacy: files you send are uploaded to and processed on the PDF Efforts server. Input files are deleted as soon as the task ends; result files are deleted after 60 minutes. Do not send files the user has not agreed to upload.\n- Limits: 30 tasks per hour per IP address, 30 MB per file, 20 files per task. get_pdf_info does not count.\n- Only process documents the user owns or is allowed to edit. unlock_pdf needs the known password; it does not crack passwords.\nDocs: https://pdfefforts.com/ai-agents/","contact":{"name":"PDF Efforts","url":"https://pdfefforts.com/contact/","email":"support@pdfefforts.com"},"termsOfService":"https://pdfefforts.com/terms/"},"servers":[{"url":"https://pdfefforts.com"}],"externalDocs":{"url":"https://pdfefforts.com/ai-agents/"},"paths":{"/api/v1/tools":{"get":{"operationId":"listTools","summary":"List the available PDF tools with their input schemas","responses":{"200":{"description":"Tool list"}}}},"/api/v1/tools/merge_pdfs":{"post":{"operationId":"merge_pdfs","summary":"Merge PDFs","description":"Combine 2 to 20 PDF files into one PDF, in the order given. Pages are copied without re-compression.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","minItems":2,"maxItems":20,"items":{"type":"object","description":"An input file. Give exactly one of: \"url\" (a public http/https link the server downloads), \"base64\" (the file bytes, base64-encoded, optionally as a data: URL) or \"file_id\" (a result file of an earlier PDF Efforts call, to chain tools without downloading).","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"description":"The PDFs to merge, in order."}},"required":["files"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/split_pdf":{"post":{"operationId":"split_pdf","summary":"Split PDF","description":"Split one PDF into several PDFs: by page ranges (each range becomes a file), every N pages, or one file per page.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF to split.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"mode":{"type":"string","enum":["ranges","every","single"],"default":"ranges","description":"\"ranges\" = one file per range in \"ranges\"; \"every\" = a new file every \"every\" pages; \"single\" = one file per page."},"ranges":{"type":"string","default":"1-2, 3-end","description":"For mode \"ranges\": comma-separated ranges, each becomes one file, e.g. \"1-3, 4-6, 7-end\"."},"every":{"type":"integer","minimum":1,"default":2,"description":"For mode \"every\": pages per file."}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/rotate_pdf":{"post":{"operationId":"rotate_pdf","summary":"Rotate PDF pages","description":"Rotate all or selected pages of a PDF by 90, 180 or 270 degrees clockwise (saved permanently in the file).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF to rotate.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"angle":{"type":"integer","enum":[90,180,270],"default":90,"description":"Clockwise rotation in degrees."},"pages":{"type":"string","default":"all","description":"Pages to rotate: \"all\", or numbers and ranges such as \"1-3, 5, 8-end\" (\"end\" = last page)."}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/delete_pages":{"post":{"operationId":"delete_pages","summary":"Delete PDF pages","description":"Remove pages from a PDF. The remaining pages are copied unchanged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"pages":{"type":"string","description":"Pages to delete: \"all\", or numbers and ranges such as \"1-3, 5, 8-end\" (\"end\" = last page)."}},"required":["file","pages"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/extract_pages":{"post":{"operationId":"extract_pages","summary":"Extract PDF pages","description":"Create a new PDF containing only the selected pages, in the order given (e.g. \"5, 1, 2\" starts with page 5).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"pages":{"type":"string","description":"Pages to keep, in this order: \"all\", or numbers and ranges such as \"1-3, 5, 8-end\" (\"end\" = last page)."}},"required":["file","pages"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/compress_pdf":{"post":{"operationId":"compress_pdf","summary":"Compress PDF","description":"Reduce PDF file size with Ghostscript, keeping text as text. Either pick a quality level, or give target_kb to get the best-quality file under that size (reports whether the target was met).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF to compress.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"level":{"type":"string","enum":["light","balanced","strong"],"default":"balanced","description":"light = best quality, strong = smallest file. Ignored when target_kb is set."},"target_kb":{"type":"integer","minimum":10,"maximum":102400,"description":"Optional maximum size in KB (e.g. 200). The server searches for the best quality that fits."},"grayscale":{"type":"boolean","default":false,"description":"Also convert to grayscale (much smaller for scans)."},"remove_images":{"type":"boolean","default":false,"description":"Drop all images, keeping only text and vector drawings."}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/protect_pdf":{"post":{"operationId":"protect_pdf","summary":"Password-protect PDF","description":"Encrypt a PDF with AES-256 so it needs a password to open; optionally block printing, copying or editing. The password is used once and not stored.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF to protect.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"password":{"type":"string","minLength":4,"maxLength":128,"description":"Password needed to open the PDF (at least 4 characters)."},"block_printing":{"type":"boolean","default":false},"block_copying":{"type":"boolean","default":false},"block_editing":{"type":"boolean","default":false}},"required":["file","password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/unlock_pdf":{"post":{"operationId":"unlock_pdf","summary":"Unlock PDF","description":"Remove a KNOWN open password and/or editing restrictions from a PDF. Does not crack unknown passwords. Only use on documents the user owns or may open.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The protected PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"password":{"type":"string","maxLength":128,"default":"","description":"The current open password. Leave empty if the PDF only has restrictions."}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/repair_pdf":{"post":{"operationId":"repair_pdf","summary":"Repair PDF","description":"Rebuild the internal structure of a damaged or corrupted PDF (qpdf, with a Ghostscript fallback).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The damaged PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/grayscale_pdf":{"post":{"operationId":"grayscale_pdf","summary":"Convert PDF to grayscale","description":"Convert every colour in a PDF to shades of gray; text stays searchable.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/optimize_pdf_for_web":{"post":{"operationId":"optimize_pdf_for_web","summary":"Optimize PDF for web (linearize)","description":"Linearize a PDF (\"fast web view\") so browsers can show page 1 before the whole file has downloaded.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/convert_to_pdfa":{"post":{"operationId":"convert_to_pdfa","summary":"Convert PDF to PDF/A","description":"Convert a PDF to the PDF/A archiving standard (PDF/A-1b, 2b or 3b) with Ghostscript, embedding fonts and an sRGB colour profile.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"level":{"type":"integer","enum":[1,2,3],"default":2,"description":"PDF/A part: 1, 2 (recommended) or 3."}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/office_to_pdf":{"post":{"operationId":"office_to_pdf","summary":"Word / Excel / PowerPoint to PDF","description":"Convert an office document to PDF with LibreOffice: .doc, .docx, .odt, .rtf, .txt, .xls, .xlsx, .ods, .csv, .ppt, .pptx, .odp, .html. The file name (or URL) must have the right extension.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The document. Give \"filename\" with the extension when sending base64.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/images_to_pdf":{"post":{"operationId":"images_to_pdf","summary":"Images to PDF","description":"Combine 1 to 20 images (JPG, PNG, WEBP, GIF, BMP) into one PDF, one image per page, in the order given. JPG and PNG are embedded at full resolution.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","description":"An input file. Give exactly one of: \"url\" (a public http/https link the server downloads), \"base64\" (the file bytes, base64-encoded, optionally as a data: URL) or \"file_id\" (a result file of an earlier PDF Efforts call, to chain tools without downloading).","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"description":"The images, in page order."},"page_size":{"type":"string","enum":["fit","A4","Letter"],"default":"fit","description":"\"fit\" = each page is the size of its image."},"orientation":{"type":"string","enum":["auto","portrait","landscape"],"default":"auto"},"margin":{"type":"string","enum":["none","small","large"],"default":"none"}},"required":["files"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/pdf_to_images":{"post":{"operationId":"pdf_to_images","summary":"PDF to JPG / PNG images","description":"Render PDF pages as images (one JPG or PNG file per page).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"format":{"type":"string","enum":["jpg","png"],"default":"jpg"},"dpi":{"type":"integer","enum":[72,150,300],"default":150,"description":"72 = web, 150 = standard, 300 = print quality."},"pages":{"type":"string","default":"all","description":"Pages to render: \"all\", or numbers and ranges such as \"1-3, 5, 8-end\" (\"end\" = last page)."},"jpg_quality":{"type":"integer","minimum":30,"maximum":100,"default":85,"description":"JPG quality in percent (JPG only)."},"transparent":{"type":"boolean","default":false,"description":"Transparent background (PNG only)."}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/pdf_to_text":{"post":{"operationId":"pdf_to_text","summary":"Extract text from PDF","description":"Extract the plain text of a PDF that has a text layer. The text is returned inline (up to 200,000 characters) and as a .txt file. For scans without text, use ocr_pdf.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"page_markers":{"type":"boolean","default":true,"description":"Insert \"[Page n]\" markers between pages."}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/pdf_to_word":{"post":{"operationId":"pdf_to_word","summary":"PDF to Word (DOCX)","description":"Rebuild a PDF as an editable Word .docx with paragraphs, fonts, colours, tables, lists, links and pictures. Charts and drawn shapes are not included. Scanned PDFs need ocr_pdf first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/pdf_to_excel":{"post":{"operationId":"pdf_to_excel","summary":"PDF tables to Excel","description":"Detect tables in a digitally created PDF (statements, invoices, reports) and save them as an .xlsx workbook or .csv. Numbers become real numbers.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"format":{"type":"string","enum":["xlsx","csv"],"default":"xlsx"}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/ocr_pdf":{"post":{"operationId":"ocr_pdf","summary":"OCR (make scans searchable)","description":"Recognize text in a scanned PDF or an image with Tesseract (self-hosted). Output a searchable PDF (invisible text layer) or plain text. Up to 50 pages; about 3-10 seconds per page.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The scanned PDF or image (JPG, PNG, WEBP, GIF, BMP).","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"language":{"type":"string","enum":["eng","urd","ara","hin","ben","fra","deu","spa","ita","por","tur","rus","ind","chi_sim","jpn","kor"],"default":"eng","description":"Tesseract language code of the document."},"output":{"type":"string","enum":["pdf","txt"],"default":"pdf","description":"\"pdf\" = searchable PDF, \"txt\" = plain text (also returned inline)."}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/add_watermark":{"post":{"operationId":"add_watermark","summary":"Add text watermark","description":"Stamp a text watermark (e.g. CONFIDENTIAL, DRAFT) on all or selected pages. Text must use Latin characters (Western European).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"text":{"type":"string","minLength":1,"maxLength":200,"description":"Watermark text (Latin characters)."},"layout":{"type":"string","enum":["diagonal","center","tile","bottom"],"default":"diagonal","description":"diagonal center, center, tiled pattern, or bottom right."},"font_size":{"type":"integer","minimum":8,"maximum":200,"default":60},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","default":"#d0312d","description":"Hex colour, e.g. \"#d0312d\"."},"opacity":{"type":"integer","minimum":5,"maximum":100,"default":25,"description":"Opacity in percent."},"pages":{"type":"string","default":"all","description":"Pages to watermark: \"all\", or numbers and ranges such as \"1-3, 5, 8-end\" (\"end\" = last page)."}},"required":["file","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/add_page_numbers":{"post":{"operationId":"add_page_numbers","summary":"Add page numbers","description":"Add page numbers as real text in a chosen corner with a custom format such as \"Page {n} of {total}\".","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false},"position":{"type":"string","enum":["bc","br","bl","tc","tr","tl"],"default":"bc","description":"b/t = bottom/top, c/r/l = center/right/left."},"format":{"type":"string","maxLength":60,"default":"Page {n} of {total}","description":"{n} = page number, {total} = page count. Latin characters only."},"start":{"type":"integer","minimum":0,"maximum":100000,"default":1,"description":"Number of the first numbered page."},"font_size":{"type":"integer","minimum":6,"maximum":36,"default":10},"skip_first_page":{"type":"boolean","default":false,"description":"Do not number the first page (cover)."}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/webpage_to_pdf":{"post":{"operationId":"webpage_to_pdf","summary":"Web page to PDF","description":"Open a public web page in the server's headless Chromium and save it as a PDF (print styles apply). Pages behind a login cannot be reached.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The public http(s) address of the page."},"page_size":{"type":"string","enum":["A4","Letter"],"default":"A4"}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/djvu_to_pdf":{"post":{"operationId":"djvu_to_pdf","summary":"DjVu to PDF","description":"Convert a bundled DjVu document (scanned book) to PDF with DjVuLibre, keeping its hidden text layer as searchable text when present.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The .djvu file.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}},"/api/v1/tools/get_pdf_info":{"post":{"operationId":"get_pdf_info","summary":"PDF information","description":"Read basic facts about a PDF without changing it: page count, page sizes, encryption, title/author metadata, file size and whether it has a text layer on page 1. Does not count against the hourly task limit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","description":"The PDF.","properties":{"url":{"type":"string","description":"Public http(s) URL of the file. Private/internal addresses are refused."},"base64":{"type":"string","description":"Base64-encoded file content (or a data: URL)."},"file_id":{"type":"string","description":"file_id of a result from an earlier call (valid for 60 minutes)."},"filename":{"type":"string","description":"Optional file name, e.g. \"report.pdf\". Used for the result name and to detect the type."}},"additionalProperties":false}},"required":["file"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result files (download links expire after 60 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Result files. Download them before expires_at; pass file_id to another tool to chain.","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 time when the file is deleted."}},"required":["file_id","name","mime_type","size_bytes","download_url","expires_at"]}},"text":{"type":"string","description":"Extracted text (pdf_to_text, ocr_pdf)."},"info":{"type":"object","description":"Facts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf)."},"note":{"type":"string","description":"Anything the user should know about the result."}},"required":["files"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"429":{"description":"Rate limit (30 tasks/hour per IP); see Retry-After"},"503":{"description":"Busy or temporarily unavailable; retry later"}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}