{
  "openapi": "3.1.0",
  "info": {
    "title": "mepdf Web API (Beta)",
    "version": "0.1.0",
    "description": "Current website processing endpoints. This beta API is unauthenticated and has no production SLA. See https://mepdf.com/developers before use."
  },
  "servers": [
    {
      "url": "https://mepdf.com"
    }
  ],
  "paths": {
    "/api/pdf/merge": {
      "post": {
        "operationId": "processMerge",
        "summary": "Merge PDF",
        "description": "Combine PDFs in the order you choose.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/split": {
      "post": {
        "operationId": "processSplit",
        "summary": "Split PDF",
        "description": "Preview your pages and split by range, count, selection or size.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "pages"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "pages": {
                    "type": "string",
                    "description": "Pages or ranges; example: 1-3,5."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/rotate": {
      "post": {
        "operationId": "processRotate",
        "summary": "Rotate PDF",
        "description": "Turn every page in your PDF clockwise.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "degrees"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "degrees": {
                    "type": "string",
                    "description": "Clockwise rotation; example: 90, 180, 270."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/organize": {
      "post": {
        "operationId": "processOrganize",
        "summary": "Organize PDF",
        "description": "Rearrange pages by entering them in a new order.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "pages"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "pages": {
                    "type": "string",
                    "description": "Page order; example: 3, 1–2."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/page-layout": {
      "post": {
        "operationId": "processPageLayout",
        "summary": "PDF Page Layout",
        "description": "Place multiple PDF pages on each sheet for compact printing.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "pages_per_sheet",
                  "sheet_width",
                  "sheet_height",
                  "margin"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "pages_per_sheet": {
                    "type": "string",
                    "description": "Pages per sheet (1, 2, 4, 6, or 9); example: 2."
                  },
                  "sheet_width": {
                    "type": "string",
                    "description": "Sheet width (pt); example: 595."
                  },
                  "sheet_height": {
                    "type": "string",
                    "description": "Sheet height (pt); example: 842."
                  },
                  "margin": {
                    "type": "string",
                    "description": "Margins (pt); example: 24."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/booklet": {
      "post": {
        "operationId": "processBooklet",
        "summary": "Create Booklet",
        "description": "Impose PDF pages on landscape sheets for duplex booklet printing. Print double-sided and flip on the short edge.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "page_width",
                  "page_height",
                  "margin"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "page_width": {
                    "type": "string",
                    "description": "Book page width (pt); example: 595."
                  },
                  "page_height": {
                    "type": "string",
                    "description": "Book page height (pt); example: 842."
                  },
                  "margin": {
                    "type": "string",
                    "description": "Page margins (pt); example: 18."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/visual-editor": {
      "post": {
        "operationId": "processVisualEditor",
        "summary": "PDF Editor",
        "description": "Add text, ink, highlights, shapes and images; reorder, rotate, insert blank pages or delete pages.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "manifest"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Optional PNG/JPEG images referenced by image actions; up to 5."
                  },
                  "manifest": {
                    "type": "string",
                    "description": "Bounded JSON edit and page manifest; example: {\"version\":1,\"pages\":[{\"source\":1,\"rotation\":0}],\"actions\":[]}."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/extract-pages": {
      "post": {
        "operationId": "processExtractPages",
        "summary": "Extract PDF pages",
        "description": "Save selected pages in a new PDF.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "pages"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "pages": {
                    "type": "string",
                    "description": "Pages to extract; example: 1–3, 5."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/remove-pages": {
      "post": {
        "operationId": "processRemovePages",
        "summary": "Remove PDF pages",
        "description": "Delete selected pages and keep the rest.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "pages"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "pages": {
                    "type": "string",
                    "description": "Pages to remove; example: 2, 4–6."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/crop": {
      "post": {
        "operationId": "processCrop",
        "summary": "Crop PDF",
        "description": "Trim margins on all or selected pages.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "left": {
                    "type": "string",
                    "description": "Left margin (pt); example: 0."
                  },
                  "right": {
                    "type": "string",
                    "description": "Right margin (pt); example: 0."
                  },
                  "top": {
                    "type": "string",
                    "description": "Top margin (pt); example: 0."
                  },
                  "bottom": {
                    "type": "string",
                    "description": "Bottom margin (pt); example: 0."
                  },
                  "pages": {
                    "type": "string",
                    "description": "Pages (blank for all); example: 1–3, 5."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/protect": {
      "post": {
        "operationId": "processProtect",
        "summary": "Protect PDF",
        "description": "Require a password to open your PDF.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "password"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "password": {
                    "type": "string",
                    "description": "New password."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/unlock": {
      "post": {
        "operationId": "processUnlock",
        "summary": "Unlock PDF",
        "description": "Remove encryption using the current password.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "password"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "password": {
                    "type": "string",
                    "description": "Current password."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/compress": {
      "post": {
        "operationId": "processCompress",
        "summary": "Compress PDF",
        "description": "Optimize PDF storage without reducing image quality.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/repair": {
      "post": {
        "operationId": "processRepair",
        "summary": "Repair PDF",
        "description": "Recover pages from a PDF with repairable errors.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/watermark": {
      "post": {
        "operationId": "processWatermark",
        "summary": "Watermark PDF",
        "description": "Add a text watermark across your pages.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "text"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "text": {
                    "type": "string",
                    "description": "Watermark text; example: Confidential."
                  },
                  "pages": {
                    "type": "string",
                    "description": "Page selection; example: all or 1-3,5."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/page-numbers": {
      "post": {
        "operationId": "processPageNumbers",
        "summary": "Number PDF pages",
        "description": "Add page numbers starting at the number you choose.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "start": {
                    "type": "string",
                    "description": "Start numbering at; example: 1."
                  },
                  "pages": {
                    "type": "string",
                    "description": "Page selection; example: all or 1-3,5."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/flatten": {
      "post": {
        "operationId": "processFlatten",
        "summary": "Flatten PDF",
        "description": "Make form fields and annotations part of the page.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/image-to-pdf": {
      "post": {
        "operationId": "processImageToPdf",
        "summary": "JPG & PNG to PDF",
        "description": "Combine images into a PDF, one image per page.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/pdf-to-jpg": {
      "post": {
        "operationId": "processPdfToJpg",
        "summary": "PDF to JPG",
        "description": "Export PDF pages as JPG files in a ZIP.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "dpi": {
                    "type": "string",
                    "description": "Resolution (72–300 DPI); example: 144."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed zip file.",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/pdf-to-png": {
      "post": {
        "operationId": "processPdfToPng",
        "summary": "PDF to PNG",
        "description": "Export PDF pages as PNG files in a ZIP.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "dpi": {
                    "type": "string",
                    "description": "Resolution (72–300 DPI); example: 144."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed zip file.",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/compare": {
      "post": {
        "operationId": "processCompare",
        "summary": "Compare PDF text",
        "description": "Generate a PDF report of differences in selectable text.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/fill-form": {
      "post": {
        "operationId": "processFillForm",
        "summary": "Fill PDF forms",
        "description": "Set named text or choice fields in a fillable PDF.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "fields"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "fields": {
                    "type": "string",
                    "description": "Form values (JSON); example: {\"Name\":\"Alex\"}."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/annotate": {
      "post": {
        "operationId": "processAnnotate",
        "summary": "Annotate PDF",
        "description": "Add a short text note at the top of a page.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "text"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "text": {
                    "type": "string",
                    "description": "Note text; example: Review this section."
                  },
                  "page": {
                    "type": "string",
                    "description": "Page number; example: 1."
                  },
                  "pages": {
                    "type": "string",
                    "description": "Page selection; example: all or 1-3,5."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/sign": {
      "post": {
        "operationId": "processSign",
        "summary": "Sign PDF",
        "description": "Draw a handwritten signature to stamp on a page.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "strokes"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "page": {
                    "type": "string",
                    "description": "Page number; example: 1."
                  },
                  "strokes": {
                    "type": "string",
                    "description": "Signature drawing; example: Normalized stroke coordinates."
                  },
                  "pages": {
                    "type": "string",
                    "description": "Page selection; example: all or 1-3,5."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/word-to-pdf": {
      "post": {
        "operationId": "processWordToPdf",
        "summary": "Word to PDF",
        "description": "Convert a Word document to PDF.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/excel-to-pdf": {
      "post": {
        "operationId": "processExcelToPdf",
        "summary": "Excel to PDF",
        "description": "Convert a Excel document to PDF.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/powerpoint-to-pdf": {
      "post": {
        "operationId": "processPowerpointToPdf",
        "summary": "PowerPoint to PDF",
        "description": "Convert a PowerPoint document to PDF.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/redact": {
      "post": {
        "operationId": "processRedact",
        "summary": "Redact PDF",
        "description": "Black out a rectangle and export an image-only PDF. Searchable text is removed from every page.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files",
                  "page",
                  "left",
                  "top",
                  "right",
                  "bottom"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  },
                  "page": {
                    "type": "string",
                    "description": "Page number; example: 1."
                  },
                  "left": {
                    "type": "string",
                    "description": "Left (%); example: 5."
                  },
                  "top": {
                    "type": "string",
                    "description": "Top (%); example: 5."
                  },
                  "right": {
                    "type": "string",
                    "description": "Right (%); example: 40."
                  },
                  "bottom": {
                    "type": "string",
                    "description": "Bottom (%); example: 20."
                  },
                  "pages": {
                    "type": "string",
                    "description": "Page selection; example: all or 1-3,5."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pdf file.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/extract-images": {
      "post": {
        "operationId": "processExtractImages",
        "summary": "Extract PDF images",
        "description": "Save embedded raster images at their original dimensions in a ZIP.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed zip file.",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/markdown": {
      "post": {
        "operationId": "processMarkdown",
        "summary": "PDF to Markdown",
        "description": "Export selectable text by page to a Markdown file.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed md file.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/pdf-to-word": {
      "post": {
        "operationId": "processPdfToWord",
        "summary": "PDF to Word",
        "description": "Export selectable text to an editable Word document with reflowed layout.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed docx file.",
            "content": {
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/pdf-to-powerpoint": {
      "post": {
        "operationId": "processPdfToPowerpoint",
        "summary": "PDF to PowerPoint",
        "description": "Create one slide per PDF page using page images.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed pptx file.",
            "content": {
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    },
    "/api/pdf/pdf-to-excel": {
      "post": {
        "operationId": "processPdfToExcel",
        "summary": "PDF to Excel",
        "description": "Extract tables with visible borders and preserve cell values as text.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Repeat the files field for each input."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed xlsx file.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid files or parameters."
          },
          "413": {
            "description": "Request or files exceed the 30 MiB input limit."
          },
          "415": {
            "description": "Expected multipart/form-data."
          },
          "429": {
            "description": "Service is busy or throttling requests."
          },
          "503": {
            "description": "PDF service is unavailable."
          }
        }
      }
    }
  }
}
