{
  "openapi": "3.1.1",
  "info": {
    "title": "pdfRest API Toolkit Cloud",
    "version": "2.58.0",
    "summary": "pdfRest OpenAPI specification",
    "description": "## Getting Started\n\n---\n\nWelcome to the pdfRest API Toolkit reference for the Cloud API. This\nguide provides the information you need to start using pdfRest tools\nwith your API key. If you do not have a key, you can\n[create one for free](https://pdfrest.com/getstarted/).\n\nThe reference is organized by Tool and its associated endpoint. Most\nprocessing endpoints are named for the type of output they generate.\nFor example, send a JPG file to the `/pdf` endpoint to convert it to a\nPDF. A successful processing request typically returns a unique\nresource ID (UUID), which you can use with the `/resource/{id}`\nendpoint to retrieve the processed file.\n\n<br>\n\n## Cloud Deployment\n---\n\n**Standard Cloud API** - `https://api.pdfrest.com`\n\nOur Standard Cloud API service is hosted in secure data centers based in the United States. By directing your API calls to our standard root endpoint, `https://api.pdfrest.com`, you can take advantage of our robust infrastructure designed for high performance and reliability.\n\n\n**EU GDPR Cloud API** - `https://eu-api.pdfrest.com`\n\nFor users needing data processing within the European Union to comply with GDPR regulations, we offer a dedicated EU-based backend. By directing your API requests to `https://eu-api.pdfrest.com`, you ensure that all data is processed and stored in compliance with EU data protection laws.\n\nPlease note that additional fees may apply for using the EU GDPR-compliant service. [Learn more about how this works](https://pdfrest.com/pricing/#how-do-eu-gdpr-api-calls-work).\n\n<br>\n\n## Integration Options\n\n---\n\n**Python package**\n\n- Install the\n  [`pdfrest` package](https://pypi.org/project/pdfrest/) with `pip`.\n  See the [Python documentation](https://python.pdfrest.com/) for\n  implementation details and examples.\n\n**Docker**\n\n- Pull the official\n  [pdfRest API Toolkit image](https://hub.docker.com/r/pdfrest/pdf-api-toolkit)\n  from Docker Hub for containerized deployments.\n\n<br>\n\n## Additional Resources\n\n---\n\n- Explore the\n  [pdfRest API samples repository](https://github.com/pdfrest/pdfrest-api-samples)\n  for functional, in-depth examples in popular programming languages.\n",
    "license": {
      "name": "Proprietary",
      "identifier": "LicenseRef-proprietary"
    }
  },
  "servers": [
    {
      "url": "https://api.pdfrest.com",
      "description": "Public Cloud API"
    },
    {
      "url": "https://eu-api.pdfrest.com",
      "description": "EU Public Cloud API for GDPR-compliant regional processing"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "API Status",
      "description": "Check API availability and release information"
    },
    {
      "name": "OpenAPI Specification",
      "description": "Download the Cloud or Container OpenAPI specification"
    },
    {
      "name": "Retrieve Files",
      "description": "Retrieve a stored resource by ID"
    },
    {
      "name": "API Polling",
      "description": "Poll for the status and result of an asynchronous request"
    },
    {
      "name": "Delete Files",
      "description": "Delete one or more stored resources"
    },
    {
      "name": "Upload Files",
      "description": "Upload files or public file URLs"
    },
    {
      "name": "Summarize PDF",
      "description": "Summarize PDF, Markdown, or plain-text content"
    },
    {
      "name": "Translate PDF",
      "description": "Translate PDF, Markdown, or plain-text content"
    },
    {
      "name": "Query PDF",
      "description": "Query PDF metadata and document properties"
    },
    {
      "name": "Extract Text",
      "description": "Extract text and optional layout information from PDF"
    },
    {
      "name": "Extract Images",
      "description": "Extract embedded images from PDF"
    },
    {
      "name": "OCR PDF",
      "description": "Add searchable OCR text to PDF"
    },
    {
      "name": "Convert to PDF",
      "description": "Convert supported input files to PDF"
    },
    {
      "name": "Convert PDF to Microsoft Word",
      "description": "Convert PDF to Microsoft Word"
    },
    {
      "name": "Convert PDF to Microsoft Excel",
      "description": "Convert PDF to Microsoft Excel"
    },
    {
      "name": "Convert PDF to Microsoft PowerPoint",
      "description": "Convert PDF to Microsoft PowerPoint"
    },
    {
      "name": "Convert PDF to Images",
      "description": "Convert PDF pages to supported image formats"
    },
    {
      "name": "Convert PDF to Markdown",
      "description": "Convert PDF content to Markdown"
    },
    {
      "name": "Convert PDF to PDF/A",
      "description": "Convert PDF to an archival PDF/A standard"
    },
    {
      "name": "Create ZUGFeRD PDF",
      "description": "Create and validate a ZUGFeRD PDF/A-3 invoice"
    },
    {
      "name": "Validate ZUGFeRD PDF",
      "description": "Validate an existing ZUGFeRD PDF and its PDF/A conformance"
    },
    {
      "name": "Convert PDF to PDF/X",
      "description": "Convert PDF to a print-production PDF/X standard"
    },
    {
      "name": "Convert PDF to PostScript",
      "description": "Convert PDF pages to PostScript"
    },
    {
      "name": "Compress PDF",
      "description": "Reduce PDF file size"
    },
    {
      "name": "Sign PDF",
      "description": "Apply a digital signature to PDF"
    },
    {
      "name": "Redact PDF",
      "description": "Preview and apply permanent PDF text redactions"
    },
    {
      "name": "Watermark PDF",
      "description": "Add a watermark to PDF"
    },
    {
      "name": "Encrypt PDF",
      "description": "Add or remove PDF open-password encryption"
    },
    {
      "name": "Restrict PDF",
      "description": "Add or remove PDF permissions restrictions"
    },
    {
      "name": "TDM Reserve PDF",
      "description": "Apply a text and data mining reservation policy to PDF"
    },
    {
      "name": "Merge PDFs",
      "description": "Merge multiple PDFs into one document"
    },
    {
      "name": "Split PDF",
      "description": "Split PDF into multiple files"
    },
    {
      "name": "Create Blank PDF",
      "description": "Create a blank PDF document"
    },
    {
      "name": "Add to PDF",
      "description": "Add text, images, shapes, tables, or file attachments to PDF"
    },
    {
      "name": "Set Page Boxes",
      "description": "Set PDF page boundaries"
    },
    {
      "name": "Convert PDF Colors",
      "description": "Convert PDF color spaces"
    },
    {
      "name": "Rasterize PDF",
      "description": "Convert PDF page content to raster images within PDF"
    },
    {
      "name": "Linearize PDF",
      "description": "Optimize PDF for fast web view"
    },
    {
      "name": "Extract Form Data",
      "description": "Extract form data from PDF"
    },
    {
      "name": "Import Form Data",
      "description": "Import form data into PDF"
    },
    {
      "name": "XFA to AcroForms",
      "description": "Convert XFA forms to AcroForms"
    },
    {
      "name": "Flatten Forms",
      "description": "Flatten PDF form fields into page content"
    },
    {
      "name": "Flatten Transparencies",
      "description": "Flatten PDF transparency effects"
    },
    {
      "name": "Flatten Annotations",
      "description": "Flatten PDF annotations into page content"
    },
    {
      "name": "Flatten Layers",
      "description": "Flatten PDF layers into page content"
    },
    {
      "name": "Zip Files",
      "description": "Create or extract ZIP archives"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Resource",
      "tags": [
        "Upload Files",
        "Retrieve Files",
        "Delete Files",
        "API Polling",
        "Zip Files",
        "OpenAPI Specification",
        "API Status"
      ]
    },
    {
      "name": "Convert",
      "tags": [
        "Convert PDF to Images",
        "Convert PDF to Microsoft Excel",
        "Convert PDF to Microsoft PowerPoint",
        "Convert PDF to Microsoft Word",
        "Convert PDF to PDF/A",
        "Create ZUGFeRD PDF",
        "Validate ZUGFeRD PDF",
        "Convert PDF to PostScript",
        "Convert PDF to PDF/X",
        "Convert to PDF"
      ]
    },
    {
      "name": "Optimize",
      "tags": [
        "Compress PDF",
        "Convert PDF Colors",
        "Flatten Annotations",
        "Flatten Layers",
        "Flatten Transparencies",
        "Linearize PDF",
        "Rasterize PDF"
      ]
    },
    {
      "name": "Secure",
      "tags": [
        "Encrypt PDF",
        "Redact PDF",
        "Restrict PDF",
        "Sign PDF",
        "TDM Reserve PDF",
        "Watermark PDF"
      ]
    },
    {
      "name": "Extract",
      "tags": [
        "Convert PDF to Markdown",
        "Extract Images",
        "Extract Text",
        "OCR PDF",
        "Query PDF"
      ]
    },
    {
      "name": "Modify",
      "tags": [
        "Add to PDF",
        "Create Blank PDF",
        "Merge PDFs",
        "Set Page Boxes",
        "Split PDF"
      ]
    },
    {
      "name": "Forms",
      "tags": [
        "Extract Form Data",
        "Flatten Forms",
        "Import Form Data",
        "XFA to AcroForms"
      ]
    },
    {
      "name": "Analyze",
      "tags": [
        "Summarize PDF",
        "Translate PDF"
      ]
    }
  ],
  "paths": {
    "/up": {
      "get": {
        "tags": [
          "API Status"
        ],
        "summary": "Check API status",
        "description": "Check whether the API is available and return product and release information. This endpoint does not require authentication.\n",
        "operationId": "getApiStatus",
        "security": [],
        "responses": {
          "200": {
            "description": "API is available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiStatusResponse"
                },
                "example": {
                  "status": "OK",
                  "product": "pdfRest API Toolkit",
                  "releaseDate": "2026-08-21",
                  "version": "2.54.1"
                }
              }
            }
          }
        }
      }
    },
    "/pdfrest-openapi.yaml": {
      "get": {
        "tags": [
          "OpenAPI Specification"
        ],
        "summary": "Download an OpenAPI specification as YAML",
        "description": "Download the Cloud or self-hosted Container OpenAPI specification in YAML format. When `type` is omitted, the running image's default specification is returned.\n",
        "operationId": "getOpenApiYaml",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/OpenApiTypeQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "OpenAPI specification in YAML format",
            "content": {
              "application/yaml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/pdfrest-openapi.json": {
      "get": {
        "tags": [
          "OpenAPI Specification"
        ],
        "summary": "Download an OpenAPI specification as JSON",
        "description": "Download the Cloud or self-hosted Container OpenAPI specification in JSON format. When `type` is omitted, the running image's default specification is returned.\n",
        "operationId": "getOpenApiJson",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/OpenApiTypeQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "OpenAPI specification in JSON format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "openapi": "3.1.1",
                  "info": {
                    "title": "pdfRest API Toolkit Cloud",
                    "version": "2.54.1"
                  },
                  "paths": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/resource/{id}": {
      "get": {
        "tags": [
          "Retrieve Files"
        ],
        "summary": "Retrieve a resource or its URL by ID",
        "description": "Retrieve a resource file directly, its URL, or metadata about it by ID. Resource IDs can be found in the JSON response of POST requests.\n",
        "operationId": "getResourceById",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/ResourceIdPath"
          },
          {
            "name": "format",
            "in": "query",
            "required": true,
            "description": "Specify whether to return the file directly, a URL to the file, or information about the file.\n\n- `file`: Return the file itself.\n- `url`: Return JSON containing the URL of the resource file.\n- `info`: Return JSON containing the resource ID, file name, URL, file type, file size in bytes, and last modified date and time.\n",
            "schema": {
              "type": "string",
              "enum": [
                "file",
                "url",
                "info"
              ],
              "x-enum-descriptions": {
                "file": "Return the resource file directly.",
                "url": "Return JSON containing the URL of the resource file.",
                "info": "Return JSON containing the resource ID, file name, URL, file type, file size in bytes, and last modified date and time."
              }
            }
          },
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ResourceUrlResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ResourceInfoResponse"
                    }
                  ]
                },
                "examples": {
                  "url": {
                    "summary": "format = url",
                    "value": {
                      "url": "https://api.pdfrest.com/resource/0950b9bdf-0465-4d3f-8ea3-d2894f1ae839?format=url"
                    }
                  },
                  "info": {
                    "summary": "format = info",
                    "value": {
                      "id": "2e523af74-7de9-492a-b7c6-c96eacd18a3a",
                      "name": "smallword.doc",
                      "url": "https://api.pdfrest.com/resource/2e523af74-7de9-492a-b7c6-c96eacd18a3a?format=info",
                      "type": "application/msword",
                      "size": 22528,
                      "modified": "2023-05-19T16:22:56.780Z"
                    }
                  }
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Invalid Request"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "That file does not exist"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Delete Files"
        ],
        "summary": "Delete a resource by ID",
        "description": "Delete a previously uploaded or generated resource file by ID. Resource IDs can be found in the JSON response of POST requests. The resource must have been uploaded or generated using the same API key supplied with this request.\n\n**Note:** To batch delete multiple files with a single call, use the [`/delete`](#tag/delete-files/POST/delete) endpoint.\n\n#### Required Headers\n---\n- `Api-Key`\n",
        "operationId": "deleteResourceById",
        "parameters": [
          {
            "$ref": "#/components/parameters/ResourceIdPath"
          },
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ]
                },
                "example": {
                  "message": "File has already been deleted"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided resource ID does not exist, or you lack the necessary permissions. Verify the resource ID and API Key and try again."
                }
              }
            }
          }
        }
      }
    },
    "/request-status/{requestId}": {
      "get": {
        "tags": [
          "API Polling"
        ],
        "summary": "Poll for an async request result",
        "description": "Poll for the status of an asynchronous API request. To receive a `requestId`, send a POST request to a pdfRest endpoint with the `Response-Type` header set to `requestId`, then use the returned ID to poll for the original POST request's status.\n\n#### Required Headers\n---\n- `Api-Key`\n",
        "operationId": "getRequestStatus",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestIdPath"
          },
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RequestStatusPendingResponse"
                    },
                    {
                      "$ref": "#/components/schemas/RequestStatusCompletedResponse"
                    }
                  ]
                },
                "examples": {
                  "pending": {
                    "value": {
                      "status": "pending",
                      "requestId": "0950b9bd-f046-4d3f-8ea3-d2894f1ae839"
                    }
                  },
                  "completed": {
                    "value": {
                      "status": "completed",
                      "requestId": "0950b9bd-f046-4d3f-8ea3-d2894f1ae839",
                      "outputUrl": "https://api.pdfrest.com/resource/01240b25a-8936-4437-8652-8410130f1199?format=file",
                      "outputId": "01240b25-a893-4437-8652-8410130f1199",
                      "inputId": "112f7ea0-d0e5-644b-ca3d-242fdff96d99"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Invalid Request"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "requestID not found. Please check that the Api-Key and requestId are correct. If this persists, please refer the issue to https://pdfrest.com/support."
                }
              }
            }
          }
        }
      }
    },
    "/delete": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Delete Files"
        ],
        "summary": "Delete one or more resource files by ID",
        "description": "Delete one or more resource files by ID. Resource IDs can be found in the JSON response of POST requests. Note that files must have been uploaded or generated using the same API Key provided with the call to delete them.\n\n[Learn More](https://pdfrest.com/apitools/delete-files/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=delete&eu=false)\n\n#### Required Headers\n---\n- `Api-Key`\n- `Content-Type: application/json`\n",
        "operationId": "deleteResources",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteResourcesRequest"
              },
              "example": {
                "ids": "0950b9bd-f046-4d3f-8ea3-d2894f1ae839, 12f7ea0d-0e56-44bc-a3d2-42fdff96d993"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/DeleteResourcesResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                },
                "example": {
                  "deletionResponses": {
                    "2ab5c15d-300c-b48a-69bf-512ec770ef07": "Successfully Deleted",
                    "19acb760-7641-5469-ea61-13314bd58db1": "The provided resource ID does not exist, or you lack the necessary permissions. Verify the resource ID and API Key and try again.",
                    "1a13d1f0-3c63-2416-7be4-fc36c51e9b0b": "File has already been deleted"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "An Api-Key header is required to send this request."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/upload": {
      "post": {
        "tags": [
          "Upload Files"
        ],
        "summary": "Upload files or URLs",
        "description": "Upload files using one of the following methods:\n\n- **Multipart upload** — Repeat `file` to upload one or more files directly, or repeat `url` to upload one or more files from public URLs. Do not combine `file` and `url` in the same request.\n- **Binary upload** — Send one file as an `application/octet-stream` body and set the `Content-Filename` header to its filename and extension.\n\n[Learn More](https://pdfrest.com/apitools/upload-files/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=upload&eu=false)\n\n#### Required Headers\n---\n- `Api-Key`\n- For multipart uploads of more than one file: `Accept: application/json` and `Content-Type: multipart/form-data`\n- For a single binary file: `Content-Type: application/octet-stream` and `Content-Filename` set to the actual filename and extension\n",
        "operationId": "uploadFiles",
        "parameters": [
          {
            "$ref": "#/components/parameters/ResponseTypeHeader"
          },
          {
            "$ref": "#/components/parameters/ContentFilenameHeader"
          },
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UploadRequest"
              }
            },
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary",
                "description": "Binary file upload body."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UploadResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Files and URLs cannot be uploaded together."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          }
        }
      }
    },
    "/summarized-pdf-text": {
      "post": {
        "tags": [
          "Summarize PDF"
        ],
        "summary": "Summarize PDF, Markdown, or plain text",
        "description": "Generate structured AI summaries from PDF, Markdown, or plain-text content supplied as an upload or existing resource ID. The tool leverages OpenAI technology to extract key information and condense it according to the requested summary settings. Supports JSON inline output or file output.\n\n[Learn More](https://pdfrest.com/apitools/summarize-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=summarized-pdf-text&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key`\n",
        "operationId": "summarizePdfText",
        "parameters": [
          {
            "$ref": "#/components/parameters/ResponseTypeHeader"
          },
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SummarizedPdfTextRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SummarizedPdfTextRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SummarizedPdfTextJsonResponse"
                    },
                    {
                      "$ref": "#/components/schemas/MultiInputFileProcessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "An Api-Key header is required to send this request."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/translated-pdf-text": {
      "post": {
        "tags": [
          "Translate PDF"
        ],
        "summary": "Translate PDF, Markdown, or plain text",
        "description": "Translate PDF, Markdown, or plain-text content into a requested language using AI. The service extracts text, detects source languages, translates the content via OpenAI, and returns translated text from an upload or existing resource ID. Supports JSON inline output or file output.\n\n[Learn More](https://pdfrest.com/apitools/translate-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=translated-pdf-text&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key`\n",
        "operationId": "translatePdfText",
        "parameters": [
          {
            "$ref": "#/components/parameters/ResponseTypeHeader"
          },
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TranslatedPdfTextRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TranslatedPdfTextRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TranslatedPdfTextJsonResponse"
                    },
                    {
                      "$ref": "#/components/schemas/TranslatedPdfTextFileResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "An Api-Key header is required to send this request."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/pdf-info": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Query PDF"
        ],
        "summary": "Query PDF metadata and document properties",
        "description": "Return detailed information about a PDF document and its contents to assess its current state and drive conditional processing. Password protection, corruption, or content that is not actually a PDF may prevent all queries from completing. The response always includes `allQueriesProcessed`; when it is `false`, a human-readable `warning` explains why every query could not be processed.\n\n[Learn More](https://pdfrest.com/apitools/query-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-info&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key`\n",
        "operationId": "queryPdfInfo",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PdfInfoRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PdfInfoRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PdfInfoResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "This route will only accept a File or an ID, not both."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "An Api-Key header is required to send this request."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/extracted-text": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Extract Text"
        ],
        "summary": "Extract text from PDF",
        "description": "Extract all text from a PDF, optionally including style and/or position information.\n\n[Learn More](https://pdfrest.com/apitools/extract-text/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=extracted-text&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key`\n",
        "operationId": "extractPdfText",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExtractedTextRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ExtractedTextRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ExtractedTextInlineResponse"
                    },
                    {
                      "$ref": "#/components/schemas/FileProcessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Uploaded file is not valid input for this route. See documentation for valid file format(s)."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "An Api-Key header is required to send this request."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/extracted-images": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Extract Images"
        ],
        "summary": "Extract embedded images from PDF",
        "description": "Extract all embedded images from a PDF file, or from a specified page range, and return one resource per extracted image in its original JPG, PNG, or TIFF format while preserving its compression and properties.\n\n[Learn More](https://pdfrest.com/apitools/extract-images/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=extracted-images&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key`\n",
        "operationId": "extractPdfImages",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExtractedImagesRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ExtractedImagesRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ExtractedImagesResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Uploaded file is not valid input for this route. See documentation for valid file format(s)."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file is password protected and cannot be processed."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-ocr-text": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "OCR PDF"
        ],
        "summary": "OCR PDF to add searchable text",
        "description": "Use optical character recognition (OCR) to identify text within images embedded in a PDF and place the detected text behind those images, producing searchable and extractable text. This endpoint can preprocess PDFs before `/extracted-text` so image text can be extracted with other document text.\n\n[Learn More](https://pdfrest.com/apitools/ocr-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-ocr-text&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key`\n",
        "operationId": "ocrPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/OcrPdfRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/OcrPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file is password protected and cannot be processed."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert to PDF"
        ],
        "summary": "Convert supported files to PDF",
        "description": "Convert any of the following supported inputs to PDF:\n\n| Input type | Supported formats |\n| --- | --- |\n| Microsoft Word | `.doc`, `.docx` |\n| Microsoft Excel | `.xls`, `.xlsx` |\n| Microsoft PowerPoint | `.ppt`, `.pptx` |\n| PostScript and EPS | `.ps`, `.eps` |\n| Email | `.eml` |\n| JPEG | `.jpg`, `.jpeg` |\n| TIFF | `.tif`, `.tiff` |\n| BMP | `.bmp` |\n| PNG | `.png` |\n| HTML | `.html` file or HTML from a URL |\n| Markdown | `.md`, `.markdown` |\n| Plain text | `.txt` |\n| Structured data | `.json`, `.xml`, `.csv` |\n\nMarkdown, plain-text, JSON, XML, and CSV inputs use the structured-text converter. Tagged output is enabled by default for these formats. Use `structured_text_options` to control document metadata, tagging, page setup, typography, tables, and format-specific behavior.\n\nMarkdown inputs can reference GIF, JPEG, PNG, and TIFF images. Map non-HTTPS Markdown image targets to repeated `image_files` uploads or `image_ids` resource IDs through `structured_text_options.markdown.image_sources`. Public HTTPS image targets are downloaded automatically. The API rejects URLs with credentials, non-HTTPS URLs, private or loopback network addresses, unsafe redirect targets, unsupported image types, and remote images larger than 20 MB.\n\nPostScript and EPS inputs use the standard conversion settings unless a custom `.joboptions` profile is supplied through `job_options` or `job_options_id`. Custom joboptions profiles are supported only for `.ps` and `.eps` input. Supplying a joboptions profile for any other input type returns a validation error. When a custom joboptions profile is supplied, its resource ID is returned in `inputId` with the source input ID.\n\n[Learn More](https://pdfrest.com/apitools/convert-to-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key`\n",
        "operationId": "convertToPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConvertToPdfJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ConvertToPdfRequest"
              },
              "encoding": {
                "structured_text_options": {
                  "contentType": "application/json"
                },
                "image_files": {
                  "contentType": "image/gif, image/jpeg, image/png, image/tiff",
                  "style": "form",
                  "explode": true
                },
                "image_ids": {
                  "style": "form",
                  "explode": true
                },
                "job_options": {
                  "contentType": "application/octet-stream"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Completed conversion with one input",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ConvertToPdfSingleInputResponse"
                        }
                      ]
                    },
                    {
                      "title": "Completed Markdown conversion",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ConvertToPdfMarkdownResponse"
                        }
                      ]
                    },
                    {
                      "title": "Accepted asynchronous request",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/word": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to Microsoft Word"
        ],
        "summary": "Convert PDF to Microsoft Word",
        "description": "Converts a PDF to an editable Microsoft Word document.\n\n[Learn More](https://pdfrest.com/apitools/pdf-to-word/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=word&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToWord",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WordRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WordRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "This route will only accept a File or an ID, not both."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file is password protected and cannot be processed."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/excel": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to Microsoft Excel"
        ],
        "summary": "Convert PDF to Microsoft Excel",
        "description": "Converts a PDF to an editable Microsoft Excel document.\n\n[Learn More](https://pdfrest.com/apitools/pdf-to-excel/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=excel&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToExcel",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExcelRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ExcelRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/powerpoint": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to Microsoft PowerPoint"
        ],
        "summary": "Convert PDF to Microsoft PowerPoint",
        "description": "Converts a PDF to a Microsoft PowerPoint document.\n\n[Learn More](https://pdfrest.com/apitools/pdf-to-powerpoint/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=powerpoint&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToPowerPoint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PowerpointRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PowerpointRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/bmp": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to Images"
        ],
        "summary": "Convert PDF to BMP images",
        "description": "Convert a PDF into BMP image files, one output image per page.\n\n[Learn More](https://pdfrest.com/apitools/pdf-to-images/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=bmp&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToBmp",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BmpRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BmpRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PdfToImageResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/gif": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to Images"
        ],
        "summary": "Convert PDF to GIF images",
        "description": "Convert a PDF into GIF image files, one output image per page.\n\n[Learn More](https://pdfrest.com/apitools/pdf-to-images/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=gif&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToGif",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/GifRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/GifRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PdfToImageResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "0 is not within the acceptable range for resolution."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file is password protected and cannot be processed."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/jpg": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to Images"
        ],
        "summary": "Convert PDF to JPEG images",
        "description": "Convert a PDF into JPEG image files, one output image per page.\n\n[Learn More](https://pdfrest.com/apitools/pdf-to-images/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=jpg&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToJpg",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/JpgRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/JpgRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PdfToImageResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/png": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to Images"
        ],
        "summary": "Convert PDF to PNG images",
        "description": "Convert a PDF into PNG image files, one output image per page.\n\n[Learn More](https://pdfrest.com/apitools/pdf-to-images/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=png&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToPng",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PngRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PngRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PdfToImageResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/tif": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to Images"
        ],
        "summary": "Convert PDF to TIFF images",
        "description": "Convert a PDF into TIFF image files, one output image per page.\n\n[Learn More](https://pdfrest.com/apitools/pdf-to-images/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=tif&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToTif",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TifRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TifRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PdfToImageResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "0 is not within the acceptable range for resolution."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file is password protected and cannot be processed."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/markdown": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to Markdown"
        ],
        "summary": "Convert PDF to Markdown",
        "description": "Convert PDF documents into clean, structured Markdown format, facilitating content repurposing, easy text manipulation, and LLM training.\n\n[Learn More](https://pdfrest.com/apitools/pdf-to-markdown/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=markdown&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToMarkdown",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MarkdownRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MarkdownRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MarkdownInlineResponse"
                    },
                    {
                      "$ref": "#/components/schemas/FileProcessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "An Api-Key header is required to send this request."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdfa": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to PDF/A"
        ],
        "summary": "Convert PDF to PDF/A",
        "description": "Convert a PDF to one of the following PDF/A conformance levels:\n\n- **PDF/A-1b** — Provides basic visual conformance.\n- **PDF/A-2b** — Adds support for newer PDF features, including OpenType fonts, layers, PDF/A-compliant attachments, and JPEG 2000.\n- **PDF/A-2u** — Adds Unicode mappings for all text to PDF/A-2b.\n- **PDF/A-3b** — Allows embedded files of any type; embedded files do not need to conform to PDF/A.\n- **PDF/A-3u** — Adds Unicode mappings for all text to PDF/A-3b.\n\n[Learn More](https://pdfrest.com/apitools/convert-to-pdfa/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdfa&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToPdfA",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PdfARequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PdfARequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "PDF/A-2x is not within the acceptable range for output_type."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file is password protected and cannot be processed."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/zugferd-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Create ZUGFeRD PDF"
        ],
        "summary": "Create a ZUGFeRD PDF",
        "description": "Create a validated ZUGFeRD or Factur-X PDF/A-3 invoice from CII\nXML. Supply XML alone to generate the visual PDF, or include a\nPDF to preserve it when it matches the XML. Set\n`regenerate_pdf` to create a replacement PDF when the supplied\nPDF and XML cannot be confirmed as matching. Use\n`render_options` and an optional logo to customize generated or\nregenerated invoices. Supported ZUGFeRD 2.5.2 and Factur-X\n1.09.2 profiles are `MINIMUM`, `BASIC WL`, `BASIC`, and\n`EN16931`; `EXTENDED`, `XRECHNUNG`, and other profiles are\nrejected as unsupported.\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "createZugferdPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ZugferdPdfJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ZugferdPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/xml, text/xml"
                },
                "pdf_file": {
                  "contentType": "application/pdf"
                },
                "logo_file": {
                  "contentType": "image/png, image/jpeg"
                },
                "render_options": {
                  "contentType": "application/json"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK. `inputId` is the XML resource ID when XML is the only input. For requests with additional inputs, `inputId` is an ordered array containing the XML ID, optional PDF ID, and optional logo ID.\n",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MultiInputFileProcessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZugferdErrorResponse"
                },
                "example": {
                  "error": "The input file is password-protected and cannot be processed.",
                  "findings": [
                    {
                      "code": "PDF_ENCRYPTED",
                      "severity": "BLOCKING",
                      "message": "The input PDF is encrypted."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZugferdErrorResponse"
                },
                "example": {
                  "error": "The operation exceeded the maximum allowable time"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZugferdErrorResponse"
                },
                "example": {
                  "error": "There was an internal error while processing your file."
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZugferdErrorResponse"
                },
                "example": {
                  "error": "There was an internal error while processing your file."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/validated-zugferd": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Validate ZUGFeRD PDF"
        ],
        "summary": "Validate a ZUGFeRD PDF",
        "description": "Validate a completed ZUGFeRD or Factur-X hybrid invoice without\nmodifying it. Supply the PDF file or resource ID to check its\nembedded XML, attachment relationship, package metadata,\nsupported profile, and PDF/A-3 conformance. The response\nreports overall conformance, PDF/A status, content-match status,\nand findings. Supported ZUGFeRD 2.5.2 and Factur-X 1.09.2\nprofiles are `MINIMUM`, `BASIC WL`, `BASIC`, and `EN16931`;\n`EXTENDED`, `XRECHNUNG`, and other profiles are reported as\nunsupported.\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "validateZugferdPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidatedZugferdJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ValidatedZugferdRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validation result",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ZugferdValidationResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZugferdErrorResponse"
                },
                "example": {
                  "error": "The input file is password-protected and cannot be processed.",
                  "findings": [
                    {
                      "code": "PDF_ENCRYPTED",
                      "severity": "BLOCKING",
                      "message": "The input PDF is encrypted."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZugferdErrorResponse"
                },
                "example": {
                  "error": "The operation exceeded the maximum allowable time"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZugferdErrorResponse"
                },
                "example": {
                  "error": "There was an internal error while processing your file."
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZugferdErrorResponse"
                },
                "example": {
                  "error": "There was an internal error while processing your file."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/postscript": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to PostScript"
        ],
        "summary": "Convert PDF to PostScript",
        "description": "Convert a PDF to PostScript level 2 or level 3. The output is\nreturned as a downloadable `.ps` resource. The converter\nsupports page ranges, binary output, scaling,\nrotation, shrink-to-fit, and annotation control.\n\nFor print-oriented normalization, this endpoint can be paired\nwith `/pdf`: first convert the PDF to PostScript, then submit\nthe resulting `.ps` file to `/pdf`, optionally with a custom\n`.joboptions` profile. This two-call PDF refry workflow is\nintentionally flattening and lossy. PDF structure, tagging,\ninteractivity, editability, annotations, transparency, and\nother document features may be changed or discarded. Do not\nuse it when preserving the original PDF's full fidelity or\neditability is required.\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToPostScript",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PostscriptRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PostscriptRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdfx": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF to PDF/X"
        ],
        "summary": "Convert PDF to PDF/X",
        "description": "Convert a PDF to one of the following PDF/X standards:\n\n- **PDF/X-1a** — Requires embedded fonts and CMYK or spot colors.\n- **PDF/X-3** — Supports color-managed RGB and ICC data.\n- **PDF/X-4** — Supports transparency, layers, and color-managed data.\n- **PDF/X-6** — Supports modern print workflows, including variable data and enhanced color management.\n\n[Learn More](https://pdfrest.com/apitools/convert-to-pdfx/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdfx&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfToPdfX",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PdfXRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PdfXRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "PDF/X-5 is not within the acceptable range for output_type."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file is password protected and cannot be processed."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/compressed-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Compress PDF"
        ],
        "summary": "Compress PDF",
        "description": "Compress a PDF to reduce its file size. Choose a compression level based on the desired balance between fidelity and size reduction:\n\n- **`low`** — Lighter compression with higher output fidelity.\n- **`medium`** — Balanced compression and quality.\n- **`high`** — Stronger compression for a smaller output file.\n- **`custom`** — Use a custom JSON profile supplied through `profile` or `profile_id`.\n\n[Learn More](https://pdfrest.com/apitools/compress-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=compressed-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "compressPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompressedPdfJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CompressedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                },
                "profile": {
                  "contentType": "application/json"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/signed-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Sign PDF"
        ],
        "summary": "Digitally sign PDF",
        "description": "Digitally sign PDF documents programmatically, ensuring authenticity and integrity. Apply digital signatures with various configurations, including visual representations.\n\n[Learn More](https://pdfrest.com/apitools/sign-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=signed-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "signPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignedPdfJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SignedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                },
                "pfx_credential_file": {
                  "contentType": "application/x-pkcs12"
                },
                "pfx_passphrase_file": {
                  "contentType": "text/plain"
                },
                "certificate_file": {
                  "contentType": "application/octet-stream"
                },
                "private_key_file": {
                  "contentType": "application/octet-stream"
                },
                "logo_file": {
                  "contentType": "image/jpeg, image/png, image/tiff, image/bmp"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SignedPdfResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Uploaded file is not valid input for this route. See documentation for valid file format(s)."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "An Api-Key header is required to send this request."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-redacted-text-preview": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Redact PDF"
        ],
        "summary": "Generate redaction preview PDF",
        "description": "PDF text redaction is a two-step process:\n\n1. **Preview redactions (this endpoint)** — Generate a PDF that highlights proposed redaction areas with red rectangles based on the supplied JSON parameters.\n2. **Apply redactions** — After reviewing the preview for accuracy and completeness, send its output to `/pdf-with-redacted-text-applied`.\n\n[Learn More](https://pdfrest.com/apitools/redact-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-redacted-text-preview&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "previewPdfTextRedactions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RedactedTextPreviewJsonOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RedactedTextPreviewRequest"
              },
              "encoding": {
                "redaction_padding": {
                  "contentType": "application/json"
                },
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "This route will only accept a File or an ID, not both."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-redacted-text-applied": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Redact PDF"
        ],
        "summary": "Apply finalized text redactions to PDF",
        "description": "Complete the PDF text-redaction workflow:\n\n1. Generate a preview with `/pdf-with-redacted-text-preview`.\n2. Review the highlighted areas manually, or continue directly for an automated workflow.\n3. Send the preview to this endpoint to permanently remove the identified sensitive information.\n\n> **Important:** Applied redactions are irreversible. The sensitive data is permanently removed to prevent unauthorized access and support compliance with data-protection regulations.\n\n[Learn More](https://pdfrest.com/apitools/redact-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-redacted-text-applied&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "applyPdfTextRedactions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RedactedTextAppliedRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RedactedTextAppliedRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "This route will only accept a File or an ID, not both."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/watermarked-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Watermark PDF"
        ],
        "summary": "Add watermark to PDF",
        "description": "Apply a watermark to selected PDF pages:\n\n- **Text watermark** — Customize the font, text size, and color.\n- **Image watermark** — Customize the image scale.\n\nBoth watermark types support custom opacity, positioning, and rotation.\n\n[Learn More](https://pdfrest.com/apitools/watermark-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=watermarked-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "watermarkPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WatermarkedPdfJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WatermarkedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                },
                "watermark_file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK. `inputId` identifies the input PDF. When a watermark file is used, `inputId` is an array containing the input PDF resource ID first and watermark-file resource ID second.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MultiInputFileProcessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/encrypted-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Encrypt PDF"
        ],
        "summary": "Encrypt PDF with open password",
        "description": "Encrypt a PDF using 256-bit AES encryption with a 32-bit key. The resulting PDF cannot be viewed without its open password.\n\n- **Encrypt a PDF** — Set `new_open_password`.\n- **Change an existing open password** — Set both `current_open_password` and `new_open_password`.\n- **Process a PDF with a permissions password** — Also set `current_permissions_password`.\n\n[Learn More](https://pdfrest.com/apitools/encrypt-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=encrypted-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "encryptPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EncryptedPdfRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EncryptedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/decrypted-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Encrypt PDF"
        ],
        "summary": "Remove encryption from PDF",
        "description": "Remove encryption from a PDF using its current open password. Use `current_permissions_password` when the input document has a permissions password.\n\n[Learn More](https://pdfrest.com/apitools/encrypt-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=decrypted-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "decryptPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecryptedPdfJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DecryptedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/restricted-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Restrict PDF"
        ],
        "summary": "Apply PDF permissions restrictions",
        "description": "Protect a PDF with a permissions password and optionally restrict additional document operations:\n\n- **Set a permissions password** — Set `new_permissions_password`. At minimum, this prevents changes to the document's security settings.\n- **Add restrictions** — Use `restrictions[]` to specify additional operations to restrict.\n- **Change an existing permissions password** — Set both `current_permissions_password` and `new_permissions_password`.\n\n**Note:** Setting a new permissions password normally overwrites existing security data, including the open password. Use `current_open_password` to preserve existing open-password encryption.\n\n[Learn More](https://pdfrest.com/apitools/restrict-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=restricted-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "restrictPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RestrictedPdfRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RestrictedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "This route will only accept a File or an ID, not both."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file was corrupted, password-protected, or not a PDF."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/unrestricted-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Restrict PDF"
        ],
        "summary": "Remove PDF permissions restrictions",
        "description": "Remove all document security restrictions from a PDF using the current permissions password.\n\n**Note:** Removing the permissions password normally removes all existing security data, including the open password. Use `current_open_password` to preserve existing open-password encryption.\n\n[Learn More](https://pdfrest.com/apitools/restrict-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=unrestricted-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "unrestrictPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnrestrictedPdfJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UnrestrictedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "This route will only accept a File or an ID, not both."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Cannot process the given input file without the correct permissions password."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/tdm-reserved-pdf": {
      "post": {
        "tags": [
          "TDM Reserve PDF"
        ],
        "summary": "Apply TDM reservation policy to PDF",
        "description": "Apply Text and Data Mining (TDM) reservation metadata to a PDF. This embeds a machine-readable TDM policy URL in the document structure to opt out of AI scraping in compliance with the W3C TDM Reservation Protocol and EU CDSM Directive Article 4.\n\n[Learn More](https://pdfrest.com/apitools/tdm-reserve-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=tdm-reserved-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "applyTdmReservedPdf",
        "parameters": [
          {
            "$ref": "#/components/parameters/ResponseTypeHeader"
          },
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TdmReservedPdfRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TdmReservedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MultiInputFileProcessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "A TDM policy setting is required to enable TDM reservation."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file is password protected and cannot be processed."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/merged-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Merge PDFs"
        ],
        "summary": "Merge multiple PDFs",
        "description": "Merge any number of PDF `file` and/or existing `id[]` inputs in the order specified. For every input, provide corresponding `pages[]` and `type[]` values (`file` or `id`) to preserve the merge order.\n\n[Learn More](https://pdfrest.com/apitools/merge-pdfs/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=merged-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "mergePdfs",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MergedPdfJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MergedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MergedPdfResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/split-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Split PDF"
        ],
        "summary": "Split PDF into multiple files",
        "description": "Split one PDF into one or more output files. Each repeated `pages[]` expression creates one output in the order supplied. If `pages[]` is omitted, each input page is returned as a separate single-page PDF.\n\nPage expressions support:\n\n- Comma-separated page numbers and ranges\n- `last` to reference the final page\n- Reversed page ranges\n- `even` and `odd` page selectors\n\n[Learn More](https://pdfrest.com/apitools/split-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=split-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "splitPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SplitPdfRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SplitPdfRequest"
              },
              "examples": {
                "remove_single_page": {
                  "summary": "Remove one page by omission",
                  "description": "Keep pages 1-2 and 4-last to remove page 3.",
                  "value": {
                    "file": "(binary pdf)",
                    "pages[]": [
                      "1-2,4-last"
                    ],
                    "output": "without-page-3"
                  }
                },
                "remove_multiple_ranges": {
                  "summary": "Remove multiple sections by omission",
                  "description": "Keep pages 1-2, 6-9, and 12-last to remove pages 3-5 and 10-11.\n",
                  "value": {
                    "file": "(binary pdf)",
                    "pages[]": [
                      "1-2,6-9,12-last"
                    ],
                    "output": "without-sections"
                  }
                },
                "keep_subset_only": {
                  "summary": "Keep only selected pages",
                  "description": "Keep two ranges and drop everything else.",
                  "value": {
                    "file": "(binary pdf)",
                    "pages[]": [
                      "1,5-7"
                    ],
                    "output": "selected-pages-only"
                  }
                },
                "split_into_two_outputs": {
                  "summary": "Create two output documents",
                  "description": "First output contains pages 1-2; second contains 4-last.",
                  "value": {
                    "file": "(binary pdf)",
                    "pages[]": [
                      "1-2",
                      "4-last"
                    ],
                    "output": "split-output"
                  }
                }
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SplitPdfResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/blank-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Create Blank PDF"
        ],
        "summary": "Create blank PDF",
        "description": "Create a new blank PDF with a precisely defined page size, page count, and orientation as a foundation for programmatic PDF generation.\n\n[Learn More](https://pdfrest.com/apitools/create-blank-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=blank-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "createBlankPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlankPdfRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BlankPdfRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BlankPdfResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-added-text": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Add to PDF"
        ],
        "summary": "Add text blocks to PDF",
        "description": "Insert text blocks into a PDF at specified locations with custom font, styling, and optional tagging settings for newly added content.\n\n**Note:** The PDF coordinate system places the origin in the lower-left corner. Coordinates use PDF units, where 72 units equal 1 inch. PDFs with offset origins may offset text placement.\n\n[Learn More](https://pdfrest.com/apitools/add-to-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-added-text&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "addTextToPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AddTextRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AddTextRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The requested font was not found. Please see the documentation for a list of accepted fonts."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-added-image": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Add to PDF"
        ],
        "summary": "Add image to PDF",
        "description": "Insert one or more images into a PDF with optional sizing, page selection, reuse, and tagging controls. The legacy request adds one image to one page. The batch request uses `image_objects` to describe each placement. Multipart batch requests can reuse an uploaded image by repeating its `image_index`; JSON and multipart batch requests can reuse an existing image resource by repeating its `image_id`.\n\nBatch image page selectors support a single page, comma-separated pages, numeric ranges, `last`, and combinations such as `2-4,6-last`. Coordinates and dimensions are supplied per image object, so the same image can be reused at different locations or sizes.\n\nSupported image formats include:\n\n- **JPEG:** `.jpg`, `.jpeg`\n- **TIFF:** `.tif`, `.tiff`\n- **PNG:** `.png`\n- **GIF:** `.gif`\n\n**Note:** The PDF coordinate system places the origin in the lower-left corner. Coordinates use PDF units, where 72 units equal 1 inch. PDFs with offset origins may offset image placement.\n\n[Learn More](https://pdfrest.com/apitools/add-to-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-added-image&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "addImageToPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "title": "Add one image with legacy placement fields",
                    "description": "Add one existing image resource to one page using top-level placement fields.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/AddImageJsonRequest"
                      }
                    ]
                  },
                  {
                    "title": "Add one image with batch placement fields",
                    "description": "Add one existing image resource using an image placement object.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/AddImageBatchSingleJsonRequest"
                      }
                    ]
                  },
                  {
                    "title": "Add multiple images with batch placement fields",
                    "description": "Add one or more existing image resources using an array of image placement objects.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/AddImageBatchArrayJsonRequest"
                      }
                    ]
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AddImageRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                },
                "image_file": {
                  "contentType": "image/jpeg, image/tiff, image/png, image/gif"
                },
                "image_files": {
                  "contentType": "image/jpeg, image/tiff, image/png, image/gif"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "outputUrl": {
                          "type": "string"
                        },
                        "outputId": {
                          "$ref": "#/components/schemas/ResourceId"
                        },
                        "inputId": {
                          "type": "array",
                          "minItems": 1,
                          "items": {
                            "$ref": "#/components/schemas/ResourceId"
                          },
                          "description": "Input PDF resource ID followed by each unique input image resource ID used by the request. The array length varies with the number of distinct image resources."
                        }
                      },
                      "required": [
                        "outputUrl",
                        "outputId",
                        "inputId"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "There was a problem reading the input image. Verify fields and try again."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-added-shapes": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Add to PDF"
        ],
        "summary": "Add shapes to PDF",
        "description": "Draw line and rectangle objects in a PDF. Use this endpoint for separators, boxes, background panels, fills, and borders. Optional tagging applies only to shapes added by the request.\n\n**Note:** The PDF coordinate system places the origin in the lower-left corner. Coordinates and dimensions use PDF units, where 72 units equal 1 inch. PDFs with offset origins may offset shape placement.\n\n[Learn More](https://pdfrest.com/apitools/add-to-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-added-shapes&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "addShapesToPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddShapesJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AddShapesRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "At least one shape object is required."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-added-tables": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Add to PDF"
        ],
        "summary": "Add tables to PDF",
        "description": "Insert styled tables into a PDF. Tables support headers and footers, continuation pages, row and column spans, image cells, right-to-left content, and cascading table, column, row, and cell styles. When a table overflows, it continues on following document pages and creates new pages only after it reaches the end of the input PDF. Optional tagging applies only to table content added by the request.\n\n**Note:** The PDF coordinate system places the origin in the lower-left corner. Coordinates and dimensions use PDF units, where 72 units equal 1 inch.\n\nFor image cells, multipart requests either upload each image with a repeated `image_files` field or provide existing image resource IDs in the ordered `image_ids` array. JSON requests use the ordered `image_ids` array. In every format, a cell's zero-based `image_index` selects the corresponding image.\n\n[Learn More](https://pdfrest.com/apitools/add-to-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-added-tables&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "addTablesToPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddTablesJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AddTablesRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                },
                "image_files": {
                  "contentType": "image/jpeg, image/tiff, image/png, image/gif",
                  "style": "form",
                  "explode": true
                },
                "image_ids": {
                  "style": "form",
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Provide exactly one of width or width_percentage."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-added-attachment": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Add to PDF"
        ],
        "summary": "Add file attachment to PDF",
        "description": "Attach a file to a PDF document.\n\n[Learn More](https://pdfrest.com/apitools/add-to-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-added-attachment&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "addAttachmentToPdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddAttachmentJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AddAttachmentRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                },
                "file_to_attach": {
                  "contentType": "application/octet-stream"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "outputUrl": {
                          "type": "string"
                        },
                        "outputId": {
                          "$ref": "#/components/schemas/ResourceId"
                        },
                        "inputId": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "items": {
                            "$ref": "#/components/schemas/ResourceId"
                          },
                          "description": "Input PDF resource ID followed by attached-file resource ID."
                        }
                      },
                      "required": [
                        "outputUrl",
                        "outputId",
                        "inputId"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input PDF file claims conformance to a version of PDF/A that prohibits file attachments."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-page-boxes-set": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Set Page Boxes"
        ],
        "summary": "Set PDF page boxes",
        "description": "Set one or more PDF page boundary boxes:\n\n| Page box | Purpose |\n| --- | --- |\n| **MediaBox** | Defines the page size. |\n| **CropBox** | Defines the visible crop area. |\n| **BleedBox** | Defines the printing bleed margin. |\n| **TrimBox** | Defines the final printed dimensions. |\n| **ArtBox** | Defines the artwork or content boundary. |\n\n[Learn More](https://pdfrest.com/apitools/set-page-boxes/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-page-boxes-set&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "setPdfPageBoxes",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SetPageBoxesRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SetPageBoxesRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "This route will only accept a File or an ID, not both."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file is password protected and cannot be processed."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-converted-colors": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Convert PDF Colors"
        ],
        "summary": "Convert PDF colors",
        "description": "Convert PDF colors with precise document color control through custom ICC profiles and a library of print, screen, web, and grayscale presets.\n\n[Learn More](https://pdfrest.com/apitools/convert-pdf-colors/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-converted-colors&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertPdfColors",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConvertedColorsJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ConvertedColorsRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                },
                "profile": {
                  "contentType": "application/octet-stream"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/rasterized-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Rasterize PDF"
        ],
        "summary": "Rasterize PDF",
        "description": "Rasterize each PDF page to a flattened image, removing dependencies on fonts and vector elements for consistent rendering and printing. Return all rasterized pages in a single PDF.\n\n[Learn More](https://pdfrest.com/apitools/rasterize-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=rasterized-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "rasterizePdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RasterizedPdfRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RasterizedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/linearized-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Linearize PDF"
        ],
        "summary": "Linearize PDF",
        "description": "Linearize and restructure a PDF for fast web view so it can be loaded one page at a time from web servers.\n\n[Learn More](https://pdfrest.com/apitools/linearize-pdf/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=linearized-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "linearizePdf",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/LinearizedPdfRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/LinearizedPdfRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/exported-form-data": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Extract Form Data"
        ],
        "summary": "Export PDF form data",
        "description": "Export form-field data from an AcroForm or XFA-based PDF to an external data file.\n\n| PDF form type | Supported export formats |\n| --- | --- |\n| AcroForm | FDF, XFDF, XML |\n| XFA | XDP, XFD, XML |\n\nIf the form type is unknown, use [Query PDF](#/pdf-info) to run the `contains_acroforms` and `contains_xfa` checks.\n\n[Learn More](https://pdfrest.com/apitools/export-form-data/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=exported-form-data&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "exportPdfFormData",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportedFormDataRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ExportedFormDataRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Input PDF contains XFA form fields. Valid options for data_format are: xfd, xdp, xml"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "An Api-Key header is required to send this request."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-imported-form-data": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Import Form Data"
        ],
        "summary": "Import form data into PDF",
        "description": "Import data into matching fields of an AcroForm or XFA-based PDF whose form fields have edit permissions enabled.\n\n| PDF form type | Supported import formats |\n| --- | --- |\n| AcroForm | FDF, XFDF, XML |\n| XFA | XDP, XFD, XML |\n\nIf the form type is unknown, use [Query PDF](#/pdf-info) to run the `contains_acroforms` and `contains_xfa` checks.\n\n[Learn More](https://pdfrest.com/apitools/import-form-data/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-imported-form-data&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "importPdfFormData",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportedFormDataJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ImportedFormDataRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                },
                "data_file": {
                  "contentType": "application/octet-stream"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MultiInputFileProcessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "A data file is required to import data into a form. Use 'data_file' to upload a file."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "An Api-Key header is required to send this request."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/pdf-with-acroforms": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "XFA to AcroForms"
        ],
        "summary": "Convert XFA forms to AcroForms",
        "description": "Convert XFA forms to AcroForms, improving compatibility so forms can be accessed and edited across a wider range of PDF readers and applications.\n\n[Learn More](https://pdfrest.com/apitools/xfa-to-acroforms/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=pdf-with-acroforms&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "convertXfaToAcroforms",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PdfWithAcroformsRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PdfWithAcroformsRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FileProcessResponse"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "warning": {
                          "type": "string",
                          "const": "No XFA forms were detected in the input PDF. No output was produced."
                        }
                      },
                      "required": [
                        "warning"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                },
                "examples": {
                  "noXfaForms": {
                    "value": {
                      "warning": "No XFA forms were detected in the input PDF. No output was produced."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "This route will only accept a File or an ID, not both."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "An Api-Key header is required to send this request."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/flattened-forms-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Flatten Forms"
        ],
        "summary": "Flatten PDF forms",
        "description": "Flatten static and dynamic XFA forms and AcroForms so fields are no longer editable while preserving form data and improving compatibility with standard PDF viewers and processing tools.\n\n[Learn More](https://pdfrest.com/apitools/flatten-forms/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=flattened-forms-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "flattenPdfForms",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FlattenedFormsRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/FlattenedFormsRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/flattened-transparencies-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Flatten Transparencies"
        ],
        "summary": "Flatten PDF transparencies",
        "description": "Flatten transparent PDF objects with configurable quality to improve RIP speed in prepress workflows and support workflows that do not handle transparency.\n\n[Learn More](https://pdfrest.com/apitools/flatten-transparencies/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=flattened-transparencies-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "flattenPdfTransparencies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FlattenedTransparenciesRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/FlattenedTransparenciesRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/flattened-annotations-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Flatten Annotations"
        ],
        "summary": "Flatten PDF annotations",
        "description": "Flatten all annotations in a PDF to collapse their appearances into page content and make them no longer editable.\n\n[Learn More](https://pdfrest.com/apitools/flatten-annotations/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=flattened-annotations-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "flattenPdfAnnotations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FlattenedAnnotationsRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/FlattenedAnnotationsRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/flattened-layers-pdf": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Flatten Layers"
        ],
        "summary": "Flatten PDF layers",
        "description": "Flatten all layers in a PDF to collapse content from multiple layers onto a single layer.\n\n[Learn More](https://pdfrest.com/apitools/flatten-layers/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=flattened-layers-pdf&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "flattenPdfLayers",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FlattenedLayersRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/FlattenedLayersRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/StandardFileProcessSuccess"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "This route will only accept a File or an ID, not both."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The input file is password protected and cannot be processed."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/zip": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Zip Files"
        ],
        "summary": "Compress files into ZIP archive",
        "description": "Compress any number of supported files into a ZIP archive by repeating `file` and/or `id[]` parameters. Each `id[]` value must be a valid resource ID returned by a POST request.\n\n[Learn More](https://pdfrest.com/apitools/zip-files/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=zip&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "zipFiles",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ZipJsonRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ZipRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MultiInputFileProcessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Found more than one output key, only one is allowed."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    },
    "/unzip": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ResponseTypeHeader"
        }
      ],
      "post": {
        "tags": [
          "Zip Files"
        ],
        "summary": "Extract files from ZIP archive",
        "description": "Extract files from an uploaded `.zip` file or ZIP resource ID, returning one resource per extracted file. Optionally provide a password for password-protected ZIP archives.\n\n[Learn More](https://pdfrest.com/apitools/zip-files/) · [Try in API Lab](https://pdfrest.com/apilab/?endpoint=unzip&eu=false)\n\n#### Required Headers\n---\n- `Content-Type: multipart/form-data` **OR** `Content-Type: application/json`\n- `Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n",
        "operationId": "unzipFiles",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "Use an existing resource ID",
                "unevaluatedProperties": false,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/UnzipRequestOptions"
                  },
                  {
                    "$ref": "#/components/schemas/JsonIdInputBranch"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UnzipRequest"
              },
              "encoding": {
                "file": {
                  "contentType": "application/zip"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UnzipResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "The provided key is not valid."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeFileInfoHeader"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Api-Key",
        "description": "API key required in the `Api-Key` request header."
      }
    },
    "schemas": {
      "ApiStatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "const": "OK"
          },
          "product": {
            "type": "string",
            "description": "Product name for the running API variant."
          },
          "releaseDate": {
            "type": "string",
            "format": "date",
            "description": "Release date for the running API version."
          },
          "version": {
            "type": "string",
            "description": "Version of the running API."
          }
        },
        "required": [
          "status",
          "product",
          "releaseDate",
          "version"
        ]
      },
      "ResourceId": {
        "type": "string",
        "format": "uuid",
        "description": "Resource ID. Standard UUIDs."
      },
      "RequestId": {
        "type": "string",
        "format": "uuid",
        "description": "Request ID returned for asynchronous processing when the `Response-Type` header is set to `requestId`; use it to poll the original POST request.\n"
      },
      "OutputFilename": {
        "type": "string",
        "minLength": 1,
        "description": "Desired output filename without an extension."
      },
      "Bcp47LanguageTag": {
        "type": "string",
        "minLength": 1,
        "description": "Valid BCP 47 natural-language tag, such as `en-US` for U.S. English.",
        "example": "en-US"
      },
      "PdfContentStructureType": {
        "type": "string",
        "description": "Semantic PDF structure type for newly added content.",
        "enum": [
          "P",
          "H",
          "H1",
          "H2",
          "H3",
          "H4",
          "H5",
          "H6",
          "Lbl",
          "Span",
          "Quote",
          "Note",
          "Reference",
          "BibEntry",
          "Code",
          "Link",
          "Annot",
          "Ruby",
          "RB",
          "RT",
          "RP",
          "Warichu",
          "WT",
          "WP",
          "Figure",
          "Formula",
          "Form"
        ]
      },
      "DeleteResourcesRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ids": {
            "type": "string",
            "description": "Comma-separated list of alphanumeric resource IDs (UUIDs) to delete. Each ID must be a valid resource ID returned by a POST request.",
            "minLength": 1,
            "examples": [
              "0950b9bd-f046-4d3f-8ea3-d2894f1ae839, 12f7ea0d-0e56-44bc-a3d2-42fdff96d993"
            ],
            "x-order": 10
          }
        },
        "required": [
          "ids"
        ]
      },
      "DeleteResourcesResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "deletionResponses": {
            "type": "object",
            "description": "Per-resource deletion result keyed by submitted ID.",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "deletionResponses"
        ]
      },
      "ErrorIssue": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "path": {
            "type": "string",
            "description": "Parameter path that triggered the error."
          },
          "message": {
            "type": "string",
            "description": "Detailed explanation of why the value was rejected."
          },
          "value": {
            "description": "Submitted value that was rejected."
          },
          "allowedValues": {
            "type": "array",
            "description": "Acceptable values, when applicable.",
            "items": {}
          }
        },
        "required": [
          "path",
          "message",
          "value"
        ]
      },
      "ErrorDetail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorIssue"
            }
          }
        },
        "required": [
          "issues"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string"
          },
          "errorDetail": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        },
        "required": [
          "error"
        ]
      },
      "FileProcessResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "string",
            "description": "URL to retrieve the generated output file"
          },
          "outputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          }
        },
        "required": [
          "outputUrl",
          "outputId",
          "inputId"
        ]
      },
      "CompressionLevel": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high",
          "custom"
        ],
        "x-enum-descriptions": {
          "low": "Lighter compression with higher output fidelity.",
          "medium": "Balanced compression and quality.",
          "high": "Stronger compression for smaller files.",
          "custom": "Use a custom profile via `profile` or `profile_id`."
        }
      },
      "CompressedPdfRequestOptions": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "compression_level": {
                "$ref": "#/components/schemas/CompressionLevel",
                "description": "Degree of compression with a tradeoff between preserving fidelity (`low`) and maximizing file size reduction (`high`). When `custom` is selected, exactly one of `profile` or `profile_id` is required.\n",
                "x-order": 10
              },
              "profile": {
                "type": "string",
                "format": "binary",
                "description": "JSON profile to upload for custom compression settings. [Create a JSON profile with custom settings](https://docs.pdfrest.com/pdfrest-api-toolkit-cloud/custom-compression-profiles/).",
                "x-order": 50
              },
              "profile_id": {
                "$ref": "#/components/schemas/ResourceId",
                "description": "Resource ID of a previously uploaded JSON profile containing custom compression settings; it must be a valid resource ID returned by a POST request. [Create a JSON profile with custom settings](https://docs.pdfrest.com/pdfrest-api-toolkit-cloud/custom-compression-profiles/).",
                "x-order": 51
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_compressed-pdf`.",
                "x-order": 999
              }
            },
            "required": [
              "compression_level"
            ]
          },
          {
            "if": {
              "properties": {
                "compression_level": {
                  "const": "custom"
                }
              },
              "required": [
                "compression_level"
              ]
            },
            "then": {
              "oneOf": [
                {
                  "properties": {
                    "profile": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "required": [
                    "profile"
                  ]
                },
                {
                  "properties": {
                    "profile_id": {
                      "$ref": "#/components/schemas/ResourceId"
                    }
                  },
                  "required": [
                    "profile_id"
                  ]
                }
              ]
            }
          }
        ]
      },
      "CompressedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a PDF file directly for compression.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/CompressedPdfRequestOptions"
              },
              {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Uploaded input PDF file.",
                    "x-order": 1
                  }
                },
                "required": [
                  "file"
                ]
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Compress a PDF that was previously uploaded to pdfRest.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/CompressedPdfRequestOptions"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/components/schemas/ResourceId",
                    "description": "Alphanumeric ID (UUID) of an existing file on the server to process. Must be a valid resource ID returned by a POST request.",
                    "x-order": 1
                  }
                },
                "required": [
                  "id"
                ]
              }
            ]
          }
        ]
      },
      "SignatureConfiguration": {
        "type": "string",
        "description": "JSON string defining the signature properties.\n\n- **`type`** - **Required** | Type of signature, such as `new`.\n- **`name`** - **Required** | Name of the signature, such as `esignature`.\n- **`logo_opacity`** - **Optional** | Opacity of the signature logo from `0.0` through `1.0`.\n- **`location`** - **Optional** | Defines the signature's bounding box and page.\n\n    - **`bottom_left`** - **Required** | Coordinates for the bottom-left corner.\n\n        - **`x`** - **Required** | X-coordinate.\n        - **`y`** - **Required** | Y-coordinate.\n\n    - **`top_right`** - **Required** | Coordinates for the top-right corner.\n\n        - **`x`** - **Required** | X-coordinate.\n        - **`y`** - **Required** | Y-coordinate.\n\n    - **`page`** - **Required** | Page number for the signature.\n\n- **`display`** - **Optional** | Defines what information to display in the signature.\n\n    - **`include_distinguished_name`** - **Optional** | Set to `true` or `false`.\n    - **`include_datetime`** - **Optional** | Set to `true` or `false`.\n    - **`contact`** - **Optional** | Contact information.\n    - **`location`** - **Optional** | Signing location.\n    - **`name`** - **Optional** | Signer's name.\n    - **`reason`** - **Optional** | Reason for signing.\n",
        "contentMediaType": "application/json",
        "contentSchema": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "type": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "logo_opacity": {
              "type": "string",
              "pattern": "^(?:0(?:\\.\\d+)?|1(?:\\.0+)?)$"
            },
            "location": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "bottom_left": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "x": {
                      "type": "string"
                    },
                    "y": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "x",
                    "y"
                  ]
                },
                "top_right": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "x": {
                      "type": "string"
                    },
                    "y": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "x",
                    "y"
                  ]
                },
                "page": {
                  "type": "string"
                }
              },
              "required": [
                "bottom_left",
                "top_right",
                "page"
              ]
            },
            "display": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "include_distinguished_name": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                },
                "include_datetime": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                },
                "contact": {
                  "type": "string"
                },
                "location": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              }
            }
          },
          "required": [
            "type",
            "name"
          ]
        },
        "examples": [
          "{\n  \"type\": \"new\",\n  \"name\": \"esignature\",\n  \"logo_opacity\": \"0.5\",\n  \"location\": {\n    \"bottom_left\": {\n      \"x\": \"0\",\n      \"y\": \"0\"\n    },\n    \"top_right\": {\n      \"x\": \"216\",\n      \"y\": \"72\"\n    },\n    \"page\": \"1\"\n  },\n  \"display\": {\n    \"include_distinguished_name\": \"true\",\n    \"include_datetime\": \"true\",\n    \"contact\": \"My contact information\",\n    \"location\": \"My signing location\",\n    \"name\": \"John Doe\",\n    \"reason\": \"My reason for signing\"\n  }\n}\n"
        ]
      },
      "SignedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload PDF, PFX, and passphrase files",
            "description": "Upload the input PDF, PFX credential, and PFX passphrase files.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfPfxFilePassphraseFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing passphrase file by ID",
            "description": "Upload the input PDF and PFX credential, and use an existing resource ID for the PFX passphrase.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfPfxFilePassphraseIdInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing PFX file by ID",
            "description": "Upload the input PDF and PFX passphrase, and use an existing resource ID for the PFX credential.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfPfxIdPassphraseFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing PFX and passphrase files by ID",
            "description": "Upload the input PDF and use existing resource IDs for the PFX credential and passphrase.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfPfxIdPassphraseIdInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF, certificate, and private key files",
            "description": "Upload the input PDF, certificate, and private key files.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfCertificateFilePrivateKeyFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing private key file by ID",
            "description": "Upload the input PDF and certificate, and use an existing resource ID for the private key.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfCertificateFilePrivateKeyIdInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing certificate file by ID",
            "description": "Upload the input PDF and private key, and use an existing resource ID for the certificate.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfCertificateIdPrivateKeyFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing certificate and private key files by ID",
            "description": "Upload the input PDF and use existing resource IDs for the certificate and private key.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfCertificateIdPrivateKeyIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF by ID and upload PFX and passphrase files",
            "description": "Use an existing PDF resource ID and upload the PFX credential and passphrase files.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfPfxFilePassphraseFileInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF and passphrase files by ID; upload PFX file",
            "description": "Use existing resource IDs for the input PDF and PFX passphrase, and upload the PFX credential.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfPfxFilePassphraseIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF and PFX files by ID; upload passphrase file",
            "description": "Use existing resource IDs for the input PDF and PFX credential, and upload the PFX passphrase.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfPfxIdPassphraseFileInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF, PFX, and passphrase files by ID",
            "description": "Use existing resource IDs for the input PDF, PFX credential, and PFX passphrase.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfPfxIdPassphraseIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF by ID and upload certificate and private key files",
            "description": "Use an existing PDF resource ID and upload the certificate and private key files.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfCertificateFilePrivateKeyFileInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF and private key files by ID; upload certificate file",
            "description": "Use existing resource IDs for the input PDF and private key, and upload the certificate.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfCertificateFilePrivateKeyIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF and certificate files by ID; upload private key file",
            "description": "Use existing resource IDs for the input PDF and certificate, and upload the private key.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfCertificateIdPrivateKeyFileInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF, certificate, and private key files by ID",
            "description": "Use existing resource IDs for the input PDF, certificate, and private key.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/SignedPdfCertificateIdPrivateKeyIdInputBranch"
              }
            ]
          }
        ]
      },
      "SignedPdfResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "string"
          },
          "outputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "inputId": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ResourceId"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResourceId"
                }
              }
            ]
          }
        },
        "required": [
          "outputUrl",
          "outputId",
          "inputId"
        ]
      },
      "OnOff": {
        "type": "string",
        "enum": [
          "off",
          "on"
        ],
        "default": "off"
      },
      "PageRange": {
        "type": "string",
        "description": "Page selection to process, including any mix of individual pages and ranges separated by commas. Use `last` to represent the final page.\n\n**Examples:**\n  - `1-last` (all pages)\n  - `5`\n  - `2-9`\n  - `1,2,5-10,12-last`\n",
        "default": "1-last"
      },
      "PdfInfoBoxCoordinates": {
        "type": "array",
        "description": "Four numeric coordinates defining a PDF page box.",
        "minItems": 4,
        "maxItems": 4,
        "items": {
          "type": "number"
        }
      },
      "PdfInfoComparedPageBox": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "Box": {
            "$ref": "#/components/schemas/PdfInfoBoxCoordinates"
          },
          "MatchesMediaBox": {
            "type": "boolean",
            "description": "Whether these coordinates match the page's media box."
          }
        },
        "required": [
          "Box",
          "MatchesMediaBox"
        ]
      },
      "PdfInfoPageBoxes": {
        "type": "object",
        "description": "Page box information keyed by one-based page number.",
        "propertyNames": {
          "pattern": "^\\d+$"
        },
        "additionalProperties": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "MediaBox": {
              "$ref": "#/components/schemas/PdfInfoBoxCoordinates"
            },
            "CropBox": {
              "$ref": "#/components/schemas/PdfInfoComparedPageBox"
            },
            "BleedBox": {
              "$ref": "#/components/schemas/PdfInfoComparedPageBox"
            },
            "TrimBox": {
              "$ref": "#/components/schemas/PdfInfoComparedPageBox"
            },
            "ArtBox": {
              "$ref": "#/components/schemas/PdfInfoComparedPageBox"
            }
          }
        }
      },
      "PdfInfoResponse": {
        "type": "object",
        "description": "Includes the input resource ID, processing status, and one property for each requested query. The `all` query returns every optional query property. Query values may be `null` when the document cannot be fully processed.\n",
        "additionalProperties": false,
        "properties": {
          "allQueriesProcessed": {
            "type": "string",
            "enum": [
              "true",
              "false"
            ]
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "warning": {
            "type": "string"
          },
          "tagged": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document contains structure tags."
          },
          "image_only": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document consists only of embedded page images and minimal metadata."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title listed in the PDF metadata. May be an empty string."
          },
          "subject": {
            "type": [
              "string",
              "null"
            ],
            "description": "Subject listed in the PDF metadata. May be an empty string."
          },
          "author": {
            "type": [
              "string",
              "null"
            ],
            "description": "Author listed in the PDF metadata. May be an empty string."
          },
          "producer": {
            "type": [
              "string",
              "null"
            ],
            "description": "Producer listed in the PDF metadata. May be an empty string."
          },
          "creator": {
            "type": [
              "string",
              "null"
            ],
            "description": "Creator listed in the PDF metadata. May be an empty string."
          },
          "creation_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Creation date listed in the PDF metadata. May be an empty string."
          },
          "modified_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Most recent modification date listed in the PDF metadata. May be an empty string."
          },
          "keywords": {
            "type": [
              "string",
              "null"
            ],
            "description": "Keywords listed in the PDF metadata. May be an empty string."
          },
          "custom_metadata": {
            "description": "Custom PDF metadata as key-value pairs.",
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "doc_language": {
            "type": [
              "string",
              "null"
            ],
            "description": "Language the file claims to use."
          },
          "page_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of pages in the PDF document."
          },
          "page_boxes": {
            "description": "Page boundary dimensions for each page.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PdfInfoPageBoxes"
              },
              {
                "type": "null"
              }
            ]
          },
          "contains_annotations": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document contains annotations."
          },
          "contains_signature": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document contains digital signatures."
          },
          "pdf_version": {
            "type": [
              "string",
              "null"
            ],
            "description": "PDF standard version in `X.Y.Z` form.",
            "pattern": "^\\d+\\.\\d+\\.\\d+$"
          },
          "file_size": {
            "type": "integer",
            "description": "Input file size in bytes."
          },
          "filename": {
            "type": "string",
            "description": "Input file name."
          },
          "restrict_permissions_set": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether restrictions prevent printing, copying, signing, or related actions."
          },
          "contains_xfa": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document contains XFA forms."
          },
          "contains_acroforms": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document contains Acroforms."
          },
          "contains_javascript": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document contains JavaScript."
          },
          "contains_transparency": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document contains transparent objects."
          },
          "contains_embedded_file": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document contains one or more embedded files."
          },
          "uses_embedded_fonts": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document contains fully embedded fonts."
          },
          "uses_nonembedded_fonts": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document contains non-embedded fonts."
          },
          "pdfa": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document conforms to a PDF/A standard."
          },
          "pdfua_claim": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document claims PDF/UA conformance."
          },
          "pdfe_claim": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document claims PDF/E conformance."
          },
          "pdfx_claim": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document claims PDF/X conformance."
          },
          "pdfvt_claim": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the document claims PDF/VT conformance."
          },
          "requires_password_to_open": {
            "type": "boolean",
            "description": "Whether a password is required to open the document."
          }
        },
        "required": [
          "allQueriesProcessed",
          "inputId"
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "allQueriesProcessed": {
                  "enum": [
                    false,
                    "false"
                  ]
                }
              },
              "required": [
                "allQueriesProcessed"
              ]
            },
            "then": {
              "required": [
                "warning"
              ]
            }
          }
        ],
        "examples": [
          {
            "title": "2015 Form W-4",
            "page_count": 2,
            "doc_language": "English",
            "tagged": true,
            "image_only": false,
            "author": "US IRS",
            "creation_date": "2014-11-20T10:22:59",
            "modified_date": "2014-11-20T10:24:16",
            "producer": "Adobe LiveCycle Designer ES 9.0",
            "page_boxes": {
              "1": {
                "ArtBox": {
                  "Box": [
                    100,
                    683,
                    503,
                    100
                  ],
                  "MatchesMediaBox": false
                },
                "BleedBox": {
                  "Box": [
                    0,
                    783,
                    603,
                    0
                  ],
                  "MatchesMediaBox": true
                },
                "CropBox": {
                  "Box": [
                    0,
                    783,
                    603,
                    0
                  ],
                  "MatchesMediaBox": true
                },
                "MediaBox": [
                  0,
                  783,
                  603,
                  0
                ],
                "TrimBox": {
                  "Box": [
                    0,
                    783,
                    603,
                    0
                  ],
                  "MatchesMediaBox": true
                }
              }
            },
            "inputId": "0950b9bd-f046-4d3f-8ea3-d2894f1ae839",
            "allQueriesProcessed": "true"
          }
        ]
      },
      "ExtractedTextWord": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "text": {
            "type": "string"
          },
          "page": {
            "type": "integer"
          },
          "coordinates": {
            "type": "object",
            "additionalProperties": true
          },
          "style": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "ExtractedTextInlineResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "words": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtractedTextWord"
            }
          },
          "fullText": {
            "type": "string"
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          }
        },
        "required": [
          "inputId"
        ]
      },
      "MarkdownInlineResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "markdown": {
            "type": "string"
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          }
        },
        "required": [
          "markdown",
          "inputId"
        ]
      },
      "OcrPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for ocr pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/OcrPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for ocr pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/OcrPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "ExtractedImagesRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for extracted images.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ExtractedImagesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for extracted images.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ExtractedImagesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "ExtractedImagesResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Resource URLs for each extracted image."
          },
          "outputId": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceId"
            },
            "description": "Resource IDs for each extracted image."
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "warning": {
            "type": "string",
            "description": "Present when no matching images were extracted."
          },
          "message": {
            "type": "string",
            "description": "Optional informational message."
          }
        },
        "required": [
          "outputUrl",
          "outputId",
          "inputId"
        ]
      },
      "PdfToImageSmoothing": {
        "type": "string",
        "pattern": "^(?:none|all|(?:text|line|image)(?:,(?:text|line|image))*)$",
        "description": "Enable anti-aliasing for text, line art, images, or any combination. Select `none` or `all`, or combine `text`, `line`, and `image` with commas.",
        "default": "none"
      },
      "PdfToImageCommonRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for pdf to image common.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfToImageCommonRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for pdf to image common.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfToImageCommonRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "BmpRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for bmp.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/BmpRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for bmp.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/BmpRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "JpgRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a PDF file directly for JPEG conversion.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/JpgRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing PDF resource ID for JPEG conversion.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/JpgRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "PngRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a PDF file directly for PNG conversion.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PngRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing PDF resource ID for PNG conversion.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PngRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "GifRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/GifRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/GifRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "TifRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/TifRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/TifRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "PdfToImageResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Resource URLs for generated image files."
          },
          "outputId": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceId"
            },
            "description": "Resource IDs for generated image files."
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "message": {
            "type": "string",
            "description": "Optional informational message."
          }
        },
        "required": [
          "outputUrl",
          "outputId",
          "inputId"
        ]
      },
      "ProtectionPassword": {
        "type": "string",
        "minLength": 6,
        "maxLength": 128,
        "description": "Password string between 6 and 128 characters."
      },
      "CurrentProtectionPassword": {
        "type": "string",
        "description": "Existing valid PDF open or permissions password."
      },
      "PdfProtectionBaseRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for pdf protection base.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfProtectionBaseRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for pdf protection base.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfProtectionBaseRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "EncryptedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for encrypted pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/EncryptedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for encrypted pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/EncryptedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "DecryptedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a PDF",
            "description": "Upload the encrypted PDF to decrypt.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/DecryptedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing PDF resource ID",
            "description": "Decrypt a previously uploaded PDF using its resource ID.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/DecryptedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "RestrictedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/RestrictedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/RestrictedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "UnrestrictedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a PDF",
            "description": "Upload the restricted PDF from which to remove permissions restrictions.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/UnrestrictedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing PDF resource ID",
            "description": "Remove permissions restrictions from a previously uploaded PDF using its resource ID.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/UnrestrictedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "BlankPdfRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `pdfrest_blank-pdf`.",
            "x-order": 999
          },
          "page_count": {
            "type": "integer",
            "description": "Number of pages in the output document. Accepts an integer from 1 through 1000.",
            "minimum": 1,
            "maximum": 1000,
            "x-order": 10
          },
          "page_size": {
            "type": "string",
            "description": "Standard or custom page size. Accepts `letter`, `legal`, `ledger`, `A3`, `A4`, `A5`, or `custom`.",
            "enum": [
              "letter",
              "legal",
              "ledger",
              "A3",
              "A4",
              "A5",
              "custom"
            ],
            "x-order": 11
          },
          "custom_height": {
            "type": "number",
            "description": "Custom page height as a positive number of PDF units, where 72 units equal 1 inch. Required only when `page_size` is `custom`.",
            "exclusiveMinimum": 0,
            "x-order": 50
          },
          "custom_width": {
            "type": "number",
            "description": "Custom page width as a positive number of PDF units, where 72 units equal 1 inch. Required only when `page_size` is `custom`.",
            "exclusiveMinimum": 0,
            "x-order": 51
          },
          "page_orientation": {
            "type": "string",
            "description": "Page orientation for a standard size. Accepts `portrait` or `landscape`; required only when `page_size` is not `custom`.",
            "enum": [
              "landscape",
              "portrait"
            ],
            "x-order": 52
          }
        },
        "required": [
          "page_count",
          "page_size"
        ],
        "oneOf": [
          {
            "title": "Use a standard page size",
            "description": "Use a standard page size and provide the required `page_orientation` as `portrait` or `landscape`.",
            "properties": {
              "page_size": {
                "description": "Select a standard page size from `letter`, `legal`, `ledger`, `A3`, `A4`, or `A5`.",
                "enum": [
                  "letter",
                  "legal",
                  "ledger",
                  "A3",
                  "A4",
                  "A5"
                ],
                "x-order": 10
              },
              "page_orientation": {
                "type": "string",
                "description": "Required orientation for a standard page size. Accepts `portrait` or `landscape`.",
                "enum": [
                  "landscape",
                  "portrait"
                ],
                "x-order": 11
              }
            },
            "required": [
              "page_size",
              "page_orientation"
            ]
          },
          {
            "title": "Use a custom page size",
            "description": "Use a custom page size defined by required positive `custom_height` and `custom_width` values in PDF units, where 72 units equal 1 inch.",
            "properties": {
              "page_size": {
                "const": "custom",
                "description": "Select `custom` to define the page with `custom_height` and `custom_width`.",
                "x-order": 10
              },
              "custom_height": {
                "type": "number",
                "description": "Custom page height as a positive number of PDF units, where 72 units equal 1 inch.",
                "exclusiveMinimum": 0,
                "x-order": 11
              },
              "custom_width": {
                "type": "number",
                "description": "Custom page width as a positive number of PDF units, where 72 units equal 1 inch.",
                "exclusiveMinimum": 0,
                "x-order": 12
              }
            },
            "required": [
              "page_size",
              "custom_height",
              "custom_width"
            ]
          }
        ]
      },
      "BlankPdfResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "string"
          },
          "outputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "message": {
            "type": "string"
          },
          "warning": {
            "type": "string"
          }
        },
        "required": [
          "outputUrl",
          "outputId"
        ]
      },
      "FlattenedTransparenciesRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for flattened transparencies.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/FlattenedTransparenciesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for flattened transparencies.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/FlattenedTransparenciesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "MergedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload PDF files",
            "description": "Upload one or more PDF files to merge.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/MergedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MergedPdfFilesInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF files by ID",
            "description": "Merge one or more existing PDF resources by ID.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/MergedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MergedPdfIdsInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF files and reference existing PDF files",
            "description": "Merge uploaded PDF files and existing PDF resources in the specified order.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/MergedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MergedPdfFilesInputBranch"
              },
              {
                "$ref": "#/components/schemas/MergedPdfIdsInputBranch"
              }
            ]
          }
        ]
      },
      "MergedPdfRequestOptions": {
        "type": "object",
        "properties": {
          "type[]": {
            "type": "array",
            "minItems": 1,
            "description": "One value for each `file` or `id[]` input, in merge order, identifying that input as `file` or `id`.",
            "items": {
              "type": "string",
              "enum": [
                "file",
                "id"
              ]
            },
            "x-order": 10
          },
          "pages[]": {
            "type": "array",
            "minItems": 1,
            "description": "One page expression for each `file` or `id[]` input. Supports comma-separated pages and ranges, `last`, reversed ranges, `even`, and `odd`.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "x-order": 11
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `pdfrest_merged-pdf`.",
            "x-order": 999
          }
        },
        "required": [
          "type[]",
          "pages[]"
        ]
      },
      "MergedPdfFilesInputBranch": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "PDF file to upload and merge; include this parameter multiple times to merge multiple uploaded files.",
            "x-order": 1
          }
        },
        "required": [
          "file"
        ]
      },
      "MergedPdfIdsInputBranch": {
        "type": "object",
        "properties": {
          "id[]": {
            "type": "array",
            "minItems": 1,
            "description": "Alphanumeric IDs (UUIDs) of existing PDF files to merge, in merge order. Each must be a valid resource ID returned by a POST request.",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "x-order": 2
          }
        },
        "required": [
          "id[]"
        ]
      },
      "MergedPdfResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "string"
          },
          "outputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "inputId": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceId"
            }
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "outputUrl",
          "outputId",
          "inputId"
        ]
      },
      "SplitPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for split pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SplitPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for split pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SplitPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "SplitPdfResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "outputId": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceId"
            }
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "outputUrl",
          "outputId",
          "inputId"
        ]
      },
      "MultiInputFileProcessResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "string"
          },
          "outputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "inputId": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ResourceId"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResourceId"
                }
              }
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "outputUrl",
          "outputId",
          "inputId"
        ]
      },
      "AsyncRequestAcceptedResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "requestId",
          "message"
        ]
      },
      "RequestStatusPendingResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "const": "pending"
          },
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          }
        },
        "required": [
          "status",
          "requestId"
        ]
      },
      "RequestStatusCompletedResponse": {
        "type": "object",
        "description": "Completed asynchronous response containing `status`, `requestId`, and the original successful response payload from the POST request.\n",
        "additionalProperties": true,
        "properties": {
          "status": {
            "type": "string",
            "const": "completed"
          },
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          }
        },
        "required": [
          "status",
          "requestId"
        ]
      },
      "SummarizedPdfTextRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a PDF (.pdf), Markdown (.md), or plain-text (.txt) file directly for summarization.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SummarizedPdfTextRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for summarized pdf text.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SummarizedPdfTextRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "SummarizedPdfTextJsonResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "summary": {
            "type": "string"
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "summary",
          "inputId"
        ]
      },
      "TranslatedPdfTextRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a PDF (.pdf), Markdown (.md), or plain-text (.txt) file directly for translation.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/TranslatedPdfTextRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for translated pdf text.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/TranslatedPdfTextRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "TranslatedPdfTextFileResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "string"
          },
          "outputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "inputId": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ResourceId"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResourceId"
                }
              }
            ]
          },
          "message": {
            "type": "string"
          },
          "source_languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "output_language": {
            "type": "string"
          },
          "translation_note": {
            "type": "string"
          }
        },
        "required": [
          "outputUrl",
          "outputId",
          "inputId",
          "source_languages",
          "output_language"
        ]
      },
      "TranslatedPdfTextJsonResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "translated_text": {
            "type": "string"
          },
          "source_languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "output_language": {
            "type": "string"
          },
          "translation_note": {
            "type": "string"
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "translated_text",
          "source_languages",
          "output_language",
          "inputId"
        ]
      },
      "TdmReservedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for tdm reserved pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/TdmReservedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for tdm reserved pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/TdmReservedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "AddAttachmentRequest": {
        "oneOf": [
          {
            "title": "Upload PDF and attachment file",
            "description": "Upload both the input PDF and the file to attach.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddAttachmentRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddAttachmentFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing attachment file by ID",
            "description": "Upload the input PDF and use an existing attachment resource ID.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddAttachmentRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddAttachmentIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF by ID and upload attachment file",
            "description": "Use an existing PDF resource ID and upload the file to attach.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddAttachmentRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddAttachmentFileInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF and attachment files by ID",
            "description": "Use existing resource IDs for both the input PDF and attachment.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddAttachmentRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddAttachmentIdInputBranch"
              }
            ]
          }
        ]
      },
      "AddImageRequest": {
        "oneOf": [
          {
            "title": "Upload PDF and image file",
            "description": "Upload both the input PDF and the image to add.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddImageRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddImageFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing image file by ID",
            "description": "Upload the input PDF and use an existing image resource ID.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddImageRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddImageIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF by ID and upload image file",
            "description": "Use an existing PDF resource ID and upload the image to add.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddImageRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddImageFileInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF and image files by ID",
            "description": "Use existing resource IDs for both the input PDF and the image.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddImageRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddImageIdInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and image files for batch insertion",
            "description": "Upload the input PDF and one or more images referenced by image_index in image_objects.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddImageBatchRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddImageBatchImageFilesInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing image files by ID for batch insertion",
            "description": "Upload the input PDF and reference existing image resources by image_id in image_objects.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddImageBatchRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF by ID and upload image files for batch insertion",
            "description": "Use an existing PDF resource and upload one or more images referenced by image_index in image_objects.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddImageBatchRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddImageBatchImageFilesInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF and image files by ID for batch insertion",
            "description": "Use existing PDF and image resources referenced by id and image_id in image_objects.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddImageBatchRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "AddTextRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for add text.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddTextRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for add text.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddTextRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "AddShapesRequest": {
        "oneOf": [
          {
            "title": "Upload a PDF file",
            "description": "Upload the PDF that will receive the shapes.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddShapesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing PDF resource ID",
            "description": "Use an existing PDF resource ID for the document that will receive the shapes.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddShapesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "AddTablesRequest": {
        "oneOf": [
          {
            "title": "Upload PDF and image files",
            "description": "Upload the PDF that will receive the tables and upload the images used by image cells.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddTablesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddTablesImageFilesInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing image files by ID",
            "description": "Upload the PDF that will receive the tables and use existing image resource IDs for image cells.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddTablesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddTablesImageIdsInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF by ID and upload image files",
            "description": "Use an existing PDF resource ID for the document that will receive the tables and upload the images used by image cells.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddTablesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddTablesImageFilesInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF and image files by ID",
            "description": "Use an existing PDF resource ID for the document that will receive the tables and existing image resource IDs for image cells.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/AddTablesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/AddTablesImageIdsInputBranch"
              }
            ]
          }
        ]
      },
      "AddShapesJsonRequest": {
        "title": "Use an existing PDF resource ID",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of the existing PDF that will receive the shapes. Must be a valid resource ID returned by a POST request.",
            "x-order": 1
          },
          "shape_objects": {
            "description": "Line or rectangle object, or array of those objects.\n\n- **Line object**\n\n    - **`type`** - **Required** | Set to `line`.\n    - **`page`** - **Required** | A positive page number or `all` to place the same line on every page.\n    - **`x1`** - **Required** | Non-negative horizontal coordinate of the line start, in PDF units.\n    - **`y1`** - **Required** | Non-negative vertical coordinate of the line start, in PDF units.\n    - **`x2`** - **Required** | Non-negative horizontal coordinate of the line end, in PDF units.\n    - **`y2`** - **Required** | Non-negative vertical coordinate of the line end, in PDF units.\n    - **`stroke_color_rgb`** - Optional | Three comma-separated RGB channels from 0 to 255, such as `26,72,112`. Do not provide with `stroke_color_cmyk`.\n    - **`stroke_color_cmyk`** - Optional | Four comma-separated CMYK channels from 0 to 100. Do not provide with `stroke_color_rgb`.\n    - **`stroke_width`** - Optional | Positive line width in PDF units.\n    - **`opacity`** - Optional | Opacity from `0` (transparent) to `1` (opaque).\n\n- **Rectangle object**\n\n    - **`type`** - **Required** | Set to `rectangle`.\n    - **`page`** - **Required** | A positive page number or `all` to place the same rectangle on every page.\n    - **`x`** - **Required** | Non-negative horizontal coordinate of the rectangle's lower-left corner, in PDF units.\n    - **`y`** - **Required** | Non-negative vertical coordinate of the rectangle's lower-left corner, in PDF units.\n    - **`width`** - **Required** | Positive rectangle width in PDF units.\n    - **`height`** - **Required** | Positive rectangle height in PDF units.\n    - **`fill_color_rgb`** - Optional | Three comma-separated RGB channels from 0 to 255. Do not provide with `fill_color_cmyk`.\n    - **`fill_color_cmyk`** - Optional | Four comma-separated CMYK channels from 0 to 100. Do not provide with `fill_color_rgb`.\n    - **`stroke_color_rgb`** - Optional | Three comma-separated RGB channels from 0 to 255. Do not provide with `stroke_color_cmyk`.\n    - **`stroke_color_cmyk`** - Optional | Four comma-separated CMYK channels from 0 to 100. Do not provide with `stroke_color_rgb`.\n    - **`stroke_width`** - Optional | Positive border width in PDF units.\n    - **`opacity`** - Optional | Opacity from `0` (transparent) to `1` (opaque).\n\n- **Tagging properties** - Available for either object type. Each requires `tag_enabled=true`.\n\n    - **`tag_actual_text`** - Optional | Non-empty replacement text for accessibility or text extraction.\n    - **`tag_is_artifact`** - Optional | Set to `true` to mark the shape as an artifact, or `false` to leave it as content. Defaults to `false`.\n    - **`tag_structure_type`** - Optional | PDF structure type. Supported values: `P`, `H`, `H1`-`H6`, `Lbl`, `Span`, `Quote`, `Note`, `Reference`, `BibEntry`, `Code`, `Link`, `Annot`, `Ruby`, `RB`, `RT`, `RP`, `Warichu`, `WT`, `WP`, `Figure`, `Formula`, or `Form`.\n",
            "type": [
              "object",
              "array"
            ],
            "example": [
              {
                "type": "rectangle",
                "page": 1,
                "x": 54,
                "y": 540,
                "width": 504,
                "height": 108,
                "fill_color_rgb": "245,247,250",
                "stroke_color_rgb": "26,72,112",
                "stroke_width": 1
              },
              {
                "type": "line",
                "page": 1,
                "x1": 72,
                "y1": 576,
                "x2": 540,
                "y2": 576,
                "stroke_color_rgb": "26,72,112",
                "stroke_width": 1.5
              }
            ],
            "x-order": 10
          },
          "tag_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Enables tagging for shapes added by this request. Set to `true` whenever a shape includes `tag_actual_text`, `tag_is_artifact`, or `tag_structure_type`.",
            "x-order": 20
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-shapes`.",
            "x-order": 999
          }
        },
        "required": [
          "id",
          "shape_objects"
        ],
        "example": {
          "id": "0950b9bd-f046-4d3f-8ea3-d2894f1ae839",
          "shape_objects": [
            {
              "type": "rectangle",
              "page": 1,
              "x": 54,
              "y": 540,
              "width": 504,
              "height": 108,
              "fill_color_rgb": "245,247,250",
              "stroke_color_rgb": "26,72,112",
              "stroke_width": 1
            },
            {
              "type": "line",
              "page": 1,
              "x1": 72,
              "y1": 576,
              "x2": 540,
              "y2": 576,
              "stroke_color_rgb": "26,72,112",
              "stroke_width": 1.5
            }
          ]
        }
      },
      "AddTablesJsonRequest": {
        "title": "Use an existing PDF resource ID",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of the existing PDF that will receive the tables. Must be a valid resource ID returned by a POST request.",
            "x-order": 1
          },
          "table_objects": {
            "description": "Table object or array of table objects.\n\n- **Table object**\n\n    - **`page`** - **Required** | Positive page number on which the table begins.\n    - **`x`** - **Required unless `horizontal_align` is supplied** | Non-negative horizontal position of the table's left edge, in PDF units.\n    - **`y`** - **Required** | Non-negative vertical position of the table's top edge, in PDF units.\n    - **`width`** - **Required when `width_percentage` is omitted** | Positive table width in PDF units. Do not provide with `width_percentage`.\n    - **`width_percentage`** - **Required when `width` is omitted** | Positive table width from 0 to 100 percent of the available page width. Requires `width_mode` set to `relative`. Do not provide with `width`.\n    - **`width_mode`** - Optional | `fixed` (default) treats column widths as PDF units; their total must equal `width`. `relative` treats column widths as proportional weights distributed across the table width.\n    - **`horizontal_align`** - Optional | `left`, `center`, or `right`. Allows the table to be positioned without `x`.\n    - **`is_rtl`** - Optional | Set to `true` to use right-to-left table content flow, or `false` for left-to-right flow.\n    - **`keep_table_block_together`** - Optional | Set to `true` to move the complete table to the next page when it fits on one empty page but not in the remaining space on its starting page; set to `false` to allow ordinary pagination.\n    - **`spacing_before`** - Optional | Non-negative spacing before the table, in PDF units.\n    - **`spacing_after`** - Optional | Non-negative spacing after the table, in PDF units.\n    - **`continuation_page_top_margin`** - Optional | On continuation pages, reserves space below the MediaBox top before `spacing_before` is applied.\n    - **`page_bottom_margin`** - Optional | Reserves space above the MediaBox bottom on each table page. On the final page, this value is replaced by `final_page_bottom_margin` when supplied.\n    - **`final_page_bottom_margin`** - Optional | Reserves space above the MediaBox bottom on the final table page instead of `page_bottom_margin` when supplied. Must be greater than or equal to `page_bottom_margin`.\n    - **`overflow_behavior`** - Optional | `move-row` moves a row that does not fit to the next document page; `split-row` permits the row to split; `fail` rejects a table that cannot fit. Continuations use following existing pages when present and create pages only after the end of the input PDF.\n    - **`row_split_behavior`** - Optional | `split-when-needed` splits a row only when necessary; `prefer-next-page` moves it to the next page when possible.\n    - **`repeat_header_on_overflow`** - Optional | Set to `true` to repeat `header_rows` visually on continuation pages. Repeated headers do not duplicate the table's logical tagged reading order.\n    - **`repeat_footer_on_overflow`** - Optional | Set to `true` to repeat `footer_rows` visually on continuation pages. Repeated footers do not duplicate the table's logical tagged reading order.\n    - **`show_header_on_first_page`** - Optional | Set to `true` to display `header_rows` on the first table page.\n    - **`show_footer_on_last_page`** - Optional | Set to `true` to display `footer_rows` on the final table page.\n    - **`columns`** - **Required** | Array of column objects. Each column requires `width`.\n    - **`header_rows`** - Optional | Array of row objects displayed as table headers.\n    - **`rows`** - **Required** | Array of body row objects.\n    - **`footer_rows`** - Optional | Array of row objects displayed as table footers.\n    - **`style`** - Optional | Table-level style object. Column, row, and cell styles override it.\n    - **`tag_is_artifact`** - Optional | Set to `true` to mark the table as an artifact. Defaults to `false`. Requires `tag_enabled=true`.\n    - **`tag_structure_type`** - Optional | Set to `Table` to add table structure tagging. Requires `tag_enabled=true`.\n\n- **Column object**\n\n    - **`width`** - **Required** | Positive column width in PDF units for `fixed` mode, or a positive proportional weight for `relative` mode.\n    - **`style`** - Optional | Style object applied to every cell in the column unless overridden by a row or cell style.\n\n- **Row object** - Used in `header_rows`, `rows`, and `footer_rows`.\n\n    - **`cells`** - **Required** | Array of one or more cell objects. After spans are applied, each row must resolve exactly to the declared column count.\n    - **`min_height`** - Optional | Non-negative minimum row height in PDF units.\n    - **`style`** - Optional | Style object applied to every cell in the row unless overridden by a cell style.\n\n- **Cell object**\n\n    - **`text`** - Optional | Text content for the cell. Do not provide with `image`.\n    - **`image`** - Optional | Image object for the cell. Do not provide with `text`. The referenced image must be supplied as an existing resource ID in the same request's `image_ids` array.\n    - **`col_span`** - Optional | Positive number of columns occupied by the cell.\n    - **`row_span`** - Optional | Positive number of rows occupied by the cell. A span cannot overlap another cell or cross its header, body, or footer section.\n    - **`min_height`** - Optional | Non-negative minimum cell height in PDF units.\n    - **`fixed_height`** - Optional | Non-negative fixed cell height in PDF units. When `min_height` is also supplied, this value must be at least the minimum height and large enough for the cell's content.\n    - **`no_wrap`** - Optional | Set to `true` to keep cell text on one line, or `false` to allow wrapping.\n    - **`is_rtl`** - Optional | Set to `true` for right-to-left cell content, or `false` for left-to-right content.\n    - **`style`** - Optional | Style object applied to this cell. It overrides table, column, and row styles.\n    - **`tag_actual_text`** - Optional | Non-empty replacement text for accessibility or extraction. Requires `tag_enabled=true`.\n    - **`tag_structure_type`** - Optional | Set to `TH` for a header cell, or `TD` for a body or footer cell. Requires `tag_enabled=true`.\n\n- **Cell image object** - The value of a cell's `image` property.\n\n    - **`image_index`** - **Required** | Zero-based position of the image in the ordered `image_ids` array. Index `0` selects the first image resource ID, index `1` the second, and so on.\n    - **`width`** - Optional | Positive placed image width in PDF units.\n    - **`height`** - Optional | Positive placed image height in PDF units.\n    - **`tag_alt_text`** - Optional | Non-empty alternate text for the image. Requires `tag_enabled=true`.\n    - **`tag_is_artifact`** - Optional | Set to `true` to mark the image as an artifact, or `false` to leave it as content. Defaults to `false`. Requires `tag_enabled=true`.\n    - **`tag_structure_type`** - Optional | Set to `Figure` to add image structure tagging. Requires `tag_enabled=true`.\n\n- **Style object** - May be supplied at table, column, row, or cell level. More specific styles override less specific styles.\n\n    - **`font`** - Optional | Font name for text in the styled scope. See the [Font List](https://pdfrest.com/documentation/fontlist/) for supported fonts.\n    - **`text_size`** - Optional | Positive text size in PDF units.\n    - **`text_align`** - Optional | `left`, `center`, or `right`.\n    - **`vertical_align`** - Optional | `top`, `middle`, or `bottom`.\n    - **`text_color_rgb`** - Optional | Three RGB values from 0 to 255, supplied as a comma-separated string or an array. Do not provide with `text_color_cmyk`.\n    - **`text_color_cmyk`** - Optional | Four CMYK values from 0 to 100, supplied as a comma-separated string or an array. Do not provide with `text_color_rgb`.\n    - **`background_color_rgb`** - Optional | Three RGB values from 0 to 255, supplied as a comma-separated string or an array. Do not provide with `background_color_cmyk`.\n    - **`background_color_cmyk`** - Optional | Four CMYK values from 0 to 100, supplied as a comma-separated string or an array. Do not provide with `background_color_rgb`.\n    - **`opacity`** - Optional | Opacity from `0` (transparent) to `1` (opaque).\n    - **`padding`** - Optional | Padding object. Each omitted side uses the applicable default.\n    - **`border`** - Optional | Border object with independently configurable sides.\n\n- **Padding object** - The value of a style's `padding` property.\n\n    - **`top`** - Optional | Non-negative top padding in PDF units.\n    - **`right`** - Optional | Non-negative right padding in PDF units.\n    - **`bottom`** - Optional | Non-negative bottom padding in PDF units.\n    - **`left`** - Optional | Non-negative left padding in PDF units.\n\n- **Border object** - The value of a style's `border` property.\n\n    - **`top`** - Optional | Border-side object for the top edge.\n    - **`right`** - Optional | Border-side object for the right edge.\n    - **`bottom`** - Optional | Border-side object for the bottom edge.\n    - **`left`** - Optional | Border-side object for the left edge.\n\n- **Border-side object** - The value of any `border.top`, `border.right`, `border.bottom`, or `border.left` property.\n\n    - **`width`** - Optional | Non-negative border width in PDF units.\n    - **`color_rgb`** - Optional | Three RGB values from 0 to 255, supplied as a comma-separated string or an array. Do not provide with `color_cmyk`.\n    - **`color_cmyk`** - Optional | Four CMYK values from 0 to 100, supplied as a comma-separated string or an array. Do not provide with `color_rgb`.\n    - **`opacity`** - Optional | Opacity from `0` (transparent) to `1` (opaque).\n\nNOTE: The example includes an image cell. To run it, provide a supported existing image resource ID as the first entry in `image_ids` and set `tag_enabled=true`. Its `image_index` value of `0` selects that first resource ID.\n",
            "type": [
              "object",
              "array"
            ],
            "example": [
              {
                "page": 1,
                "x": 54,
                "y": 540,
                "width": 504,
                "columns": [
                  {
                    "width": 252
                  },
                  {
                    "width": 252
                  }
                ],
                "header_rows": [
                  {
                    "cells": [
                      {
                        "text": "Milestone"
                      },
                      {
                        "text": "Status"
                      }
                    ]
                  }
                ],
                "rows": [
                  {
                    "cells": [
                      {
                        "text": "Requirements review"
                      },
                      {
                        "image": {
                          "image_index": 0,
                          "width": 18,
                          "height": 18,
                          "tag_alt_text": "Complete status icon",
                          "tag_structure_type": "Figure"
                        }
                      }
                    ]
                  }
                ]
              }
            ],
            "x-order": 10
          },
          "image_ids": {
            "type": "array",
            "minItems": 1,
            "description": "Existing image resource IDs for table image cells. Required whenever `table_objects` contains an image cell. Array order defines the zero-based indexes used by `image.image_index`; index `0` selects the first ID, index `1` the second, and so on. `image_files` is available only with `multipart/form-data`.",
            "items": {
              "$ref": "#/components/schemas/ResourceId",
              "description": "Resource ID of one existing JPEG, TIFF, PNG, or GIF image. Must be a valid resource ID returned by a POST request."
            },
            "x-order": 15
          },
          "tag_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Enables tagging for table content added by this request. Set to `true` whenever `tag_language` or a table or cell tag property is supplied.",
            "x-order": 20
          },
          "tag_language": {
            "$ref": "#/components/schemas/Bcp47LanguageTag",
            "description": "BCP 47 language tag identifying newly added tagged table content for assistive technology. Requires `tag_enabled=true`.",
            "x-order": 21
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-tables`.",
            "x-order": 999
          }
        },
        "required": [
          "id",
          "table_objects"
        ],
        "example": {
          "id": "0950b9bd-f046-4d3f-8ea3-d2894f1ae839",
          "image_ids": [
            "11e24955-fbbe-4267-aac6-d1c7e531a426"
          ],
          "tag_enabled": true,
          "table_objects": [
            {
              "page": 1,
              "x": 54,
              "y": 540,
              "width": 504,
              "continuation_page_top_margin": 54,
              "page_bottom_margin": 36,
              "final_page_bottom_margin": 120,
              "columns": [
                {
                  "width": 252
                },
                {
                  "width": 252
                }
              ],
              "header_rows": [
                {
                  "cells": [
                    {
                      "text": "Milestone"
                    },
                    {
                      "text": "Status"
                    }
                  ]
                }
              ],
              "rows": [
                {
                  "cells": [
                    {
                      "text": "Requirements review"
                    },
                    {
                      "image": {
                        "image_id_index": 0,
                        "width": 18,
                        "height": 18,
                        "tag_alt_text": "Complete status icon",
                        "tag_structure_type": "Figure"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        }
      },
      "RedactedTextPreviewRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for redacted text preview.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/RedactedTextPreviewMultipartOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for redacted text preview.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/RedactedTextPreviewMultipartOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "RedactedTextAppliedRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for redacted text applied.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/RedactedTextAppliedRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for redacted text applied.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/RedactedTextAppliedRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "UploadRequest": {
        "oneOf": [
          {
            "title": "Upload files",
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "file": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "binary"
                  },
                  {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                ],
                "description": "File to upload. Include this parameter multiple times to upload multiple files, and do not combine it with the `url` parameter. Accepts any supported file type."
              }
            },
            "required": [
              "file"
            ]
          },
          {
            "title": "Upload URLs",
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "url": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uri",
                    "example": "https://example.com/document.pdf"
                  },
                  {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "format": "uri",
                      "example": "https://example.com/document.pdf"
                    }
                  }
                ],
                "description": "Public URL for a file. Include this parameter multiple times to upload files from different URLs, and do not combine it with the `file` parameter. Each URL must identify a valid publicly accessible file."
              }
            },
            "required": [
              "url"
            ]
          }
        ]
      },
      "UploadedFileReference": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/ResourceId"
          }
        },
        "required": [
          "name",
          "id"
        ]
      },
      "UploadResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "files": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/UploadedFileReference"
            }
          }
        },
        "required": [
          "files"
        ]
      },
      "ZipRequest": {
        "oneOf": [
          {
            "title": "Upload files",
            "description": "Upload one or more supported files to include in the ZIP archive.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ZipRequestOptions"
              },
              {
                "$ref": "#/components/schemas/ZipFilesInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing files by ID",
            "description": "Use one or more existing file resource IDs to create the ZIP archive.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ZipRequestOptions"
              },
              {
                "$ref": "#/components/schemas/ZipIdsInputBranch"
              }
            ]
          },
          {
            "title": "Upload files and reference existing files",
            "description": "Combine uploaded files and existing file resource IDs in the ZIP archive.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ZipRequestOptions"
              },
              {
                "$ref": "#/components/schemas/ZipFilesInputBranch"
              },
              {
                "$ref": "#/components/schemas/ZipIdsInputBranch"
              }
            ]
          }
        ]
      },
      "ZipRequestOptions": {
        "type": "object",
        "properties": {
          "output": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OutputFilename"
              }
            ],
            "description": "Generated ZIP filename without extension.",
            "default": "pdfrest_zip",
            "x-order": 999
          }
        }
      },
      "ZipFilesInputBranch": {
        "type": "object",
        "properties": {
          "file": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "format": "binary",
              "description": "One supported file to include in the ZIP archive."
            },
            "description": "One or more supported files to include in the ZIP archive; repeat this parameter to include multiple files.",
            "x-order": 1
          }
        },
        "required": [
          "file"
        ]
      },
      "ZipIdsInputBranch": {
        "type": "object",
        "properties": {
          "id[]": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/ResourceId",
              "description": "Alphanumeric resource ID of one file to include. Must be a valid resource ID returned by a POST request."
            },
            "description": "One or more repeated `id[]` resource IDs to include in the ZIP archive. Each must be a valid resource ID returned by a POST request.\n",
            "x-order": 2
          }
        },
        "required": [
          "id[]"
        ]
      },
      "UnzipRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for unzip.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/UnzipRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for unzip.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/UnzipRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "UnzippedFileReference": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "outputUrl": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "id",
          "outputUrl"
        ]
      },
      "UnzipResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnzippedFileReference"
            }
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "files",
          "inputId"
        ]
      },
      "ConvertedColorProfile": {
        "type": "string",
        "enum": [
          "lab-d50",
          "srgb",
          "apple-rgb",
          "color-match-rgb",
          "gamma-18",
          "gamma-22",
          "dot-gain-10",
          "dot-gain-15",
          "dot-gain-20",
          "dot-gain-25",
          "dot-gain-30",
          "monitor-rgb",
          "acrobat5-cmyk",
          "acrobat9-cmyk",
          "custom"
        ]
      },
      "RenderingIntent": {
        "type": "string",
        "description": "Color-mapping strategy used when source colors are converted to the selected destination ICC profile, especially for colors outside the destination gamut.\n\n- **`profile`** - Use the rendering intent specified by the selected ICC profile. This is the default.\n- **`perceptual`** - Compress the source gamut to preserve visual relationships between colors. This is commonly used for photographs.\n- **`relative_colorimetric`** - Preserve in-gamut colors relative to the destination white point and map out-of-gamut colors to the closest reproducible colors.\n- **`saturation`** - Prioritize vivid color saturation over exact color relationships. This is commonly used for charts and diagrams.\n- **`absolute_colorimetric`** - Preserve the source white point and reproduce in-gamut colors without adapting them to the destination white point. This is commonly used for proofing and exact color matching.\n\nThis setting controls how colors are translated during conversion. It does not control whether an ICC profile is embedded as a PDF output intent, and it does not enable black-point compensation.\n",
        "enum": [
          "profile",
          "perceptual",
          "relative_colorimetric",
          "saturation",
          "absolute_colorimetric"
        ],
        "default": "profile"
      },
      "ConvertedColorsRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for converted colors.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertedColorsRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for converted colors.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertedColorsRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "SetPageBoxesRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for set page boxes.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SetPageBoxesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for set page boxes.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/SetPageBoxesRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "WatermarkedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload PDF and use RGB text",
            "description": "Upload the input PDF and apply an RGB text watermark.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkTextOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkRgbTextInputBranch"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and use CMYK text",
            "description": "Upload the input PDF and apply a CMYK text watermark.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkTextOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkCmykTextInputBranch"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and watermark PDF",
            "description": "Upload both the input PDF and the watermark PDF.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkFileOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing watermark PDF by ID",
            "description": "Upload the input PDF and use a watermark PDF resource ID.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkFileOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkFileIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF by ID and use RGB text",
            "description": "Use an input PDF resource ID and apply an RGB text watermark.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkTextOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkRgbTextInputBranch"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF by ID and use CMYK text",
            "description": "Use an input PDF resource ID and apply a CMYK text watermark.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkTextOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkCmykTextInputBranch"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF by ID and upload watermark PDF",
            "description": "Use an input PDF resource ID and upload the watermark PDF.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkFileOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF and watermark PDFs by ID",
            "description": "Use resource IDs for both the input and watermark PDFs.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkFileOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkFileIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "FlattenedFormsRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for flattened forms.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/FlattenedFormsRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for flattened forms.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/FlattenedFormsRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "ImportedFormDataRequest": {
        "oneOf": [
          {
            "title": "Upload PDF and form data file",
            "description": "Upload both the input PDF and the form-data file to import.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ImportedFormDataRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/ImportedFormDataFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PDF and reference existing form-data file by ID",
            "description": "Upload the input PDF and use an existing form-data resource ID.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ImportedFormDataRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/ImportedFormDataIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF by ID and upload form-data file",
            "description": "Use an existing PDF resource ID and upload the form-data file to import.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ImportedFormDataRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/ImportedFormDataFileInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PDF and form-data files by ID",
            "description": "Use existing resource IDs for both the input PDF and form-data file.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ImportedFormDataRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/ImportedFormDataIdInputBranch"
              }
            ]
          }
        ]
      },
      "ExportedFormDataFormat": {
        "type": "string",
        "enum": [
          "xfd",
          "xdp",
          "xml",
          "xfdf",
          "fdf"
        ]
      },
      "ExportedFormDataRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for exported form data.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ExportedFormDataRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for exported form data.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ExportedFormDataRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "ConvertToPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a supported input file and use the default conversion profile.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertToPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PostScript/EPS and joboptions file",
            "description": "Upload a PostScript or EPS file and a custom `.joboptions` profile.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertToPdfPostScriptRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/ConvertToPdfJobOptionsFileInputBranch"
              }
            ]
          },
          {
            "title": "Upload PostScript/EPS and reference existing joboptions file by ID",
            "description": "Upload a PostScript or EPS file and provide the ID of a previously uploaded `.joboptions` profile.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertToPdfPostScriptRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              },
              {
                "$ref": "#/components/schemas/ConvertToPdfJobOptionsIdInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing input resource ID and the default conversion profile.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertToPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PostScript/EPS by ID and upload joboptions file",
            "description": "Use an existing PostScript or EPS input resource ID and upload a custom `.joboptions` profile.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertToPdfPostScriptRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/ConvertToPdfJobOptionsFileInputBranch"
              }
            ]
          },
          {
            "title": "Reference existing PostScript/EPS and joboptions files by ID",
            "description": "Provide the ID of a previously uploaded PostScript or EPS input and the ID of a previously uploaded `.joboptions` profile.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertToPdfPostScriptRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/ConvertToPdfJobOptionsIdInputBranch"
              }
            ]
          },
          {
            "title": "Provide a URL",
            "description": "Provide a web page URL to convert.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertToPdfUrlRequestOptions"
              },
              {
                "$ref": "#/components/schemas/ConvertToPdfUrlInputBranch"
              }
            ]
          }
        ]
      },
      "ConvertToPdfRequestOptions": {
        "type": "object",
        "properties": {
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf`.",
            "x-order": 999
          },
          "compression": {
            "type": "string",
            "description": "Image compression for PostScript, Microsoft Office, and HTML conversion.",
            "enum": [
              "lossy",
              "lossless"
            ],
            "default": "lossy",
            "x-order": 50
          },
          "downsample": {
            "oneOf": [
              {
                "title": "Set downsampling as text",
                "type": "string",
                "enum": [
                  "off",
                  "75",
                  "150",
                  "300",
                  "600",
                  "1200"
                ]
              },
              {
                "title": "Set downsampling as an integer",
                "type": "integer",
                "enum": [
                  75,
                  150,
                  300,
                  600,
                  1200
                ]
              }
            ],
            "default": "300",
            "description": "Downsample images during PostScript, Microsoft Office, or HTML conversion, or preserve original resolutions with `off`.",
            "x-order": 51
          },
          "tagged_pdf": {
            "$ref": "#/components/schemas/OnOff",
            "description": "Microsoft Office and structured-text conversion. Set to `on` to create a tagged PDF or `off` to disable tagging. For structured-text input, `structured_text_options.enable_tagging` takes precedence when supplied; otherwise the structured-text converter's tagged-output default applies when this field is omitted.",
            "x-order": 52
          },
          "locale": {
            "type": "string",
            "description": "Microsoft Excel conversion only. Controls regional number, monetary, date, and time formatting; `US` uses `en_US` and `Germany` uses `de_DE`.",
            "enum": [
              "US",
              "Germany"
            ],
            "default": "US",
            "x-order": 53
          },
          "page_size": {
            "type": "string",
            "description": "HTML and structured-text conversion. Select a standard paper size for the generated PDF. For structured-text input, `structured_text_options.page_setup.size` takes precedence.",
            "enum": [
              "letter",
              "legal",
              "ledger",
              "A3",
              "A4",
              "A5"
            ],
            "default": "letter",
            "x-order": 54
          },
          "page_margin": {
            "type": "string",
            "description": "HTML and structured-text conversion. Set equal PDF margins as a number followed by `in` or `mm`, for example `8mm` or `2.5in`. For structured-text input, `structured_text_options.page_setup.margin` takes precedence.",
            "pattern": "^[0-9]+(?:\\.[0-9]+)?(?:in|mm)$",
            "default": "1in",
            "x-order": 55
          },
          "page_orientation": {
            "type": "string",
            "description": "HTML and structured-text conversion. Set the page orientation. For structured-text input, `structured_text_options.page_setup.orientation` takes precedence.",
            "enum": [
              "portrait",
              "landscape"
            ],
            "default": "portrait",
            "x-order": 56
          },
          "web_layout": {
            "type": "string",
            "description": "HTML conversion only. Select the intended desktop, tablet, or mobile layout for responsive web pages.",
            "enum": [
              "desktop",
              "tablet",
              "mobile"
            ],
            "default": "desktop",
            "x-order": 57
          },
          "structured_text_options": {
            "$ref": "#/components/schemas/StructuredTextOptions",
            "description": "JSON-formatted conversion options for Markdown, TXT, JSON, XML, or CSV input. The API supplies source and destination paths; request options cannot set them.",
            "x-order": 60
          },
          "image_files": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "format": "binary"
            },
            "description": "Markdown input only. Repeated GIF, JPEG, PNG, or TIFF uploads referenced by zero-based `upload_index` values in `structured_text_options.markdown.image_sources`. Every upload must be referenced by a Markdown image target. Newly uploaded image resource IDs are returned in `inputId` and follow the normal resource retention lifecycle.",
            "x-order": 61
          },
          "image_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/ResourceId"
            },
            "description": "Markdown input only. Existing GIF, JPEG, PNG, or TIFF resource IDs referenced by zero-based `image_id_index` values in `structured_text_options.markdown.image_sources`. Every supplied ID must be referenced by a Markdown image target.",
            "x-order": 62
          }
        }
      },
      "ConvertToPdfPostScriptRequestOptions": {
        "type": "object",
        "properties": {
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf`.",
            "x-order": 999
          },
          "compression": {
            "type": "string",
            "description": "Image compression for PostScript or EPS conversion.",
            "enum": [
              "lossy",
              "lossless"
            ],
            "default": "lossy",
            "x-order": 50
          },
          "downsample": {
            "oneOf": [
              {
                "title": "Set downsampling as text",
                "type": "string",
                "enum": [
                  "off",
                  "75",
                  "150",
                  "300",
                  "600",
                  "1200"
                ]
              },
              {
                "title": "Set downsampling as an integer",
                "type": "integer",
                "enum": [
                  75,
                  150,
                  300,
                  600,
                  1200
                ]
              }
            ],
            "default": "300",
            "description": "Downsample images during PostScript or EPS conversion, or preserve original resolutions with `off`.",
            "x-order": 51
          }
        }
      },
      "ConvertToPdfUrlRequestOptions": {
        "type": "object",
        "properties": {
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `pdfrest_pdf`.",
            "x-order": 999
          },
          "compression": {
            "type": "string",
            "description": "Image compression for HTML conversion.",
            "enum": [
              "lossy",
              "lossless"
            ],
            "default": "lossy",
            "x-order": 50
          },
          "downsample": {
            "oneOf": [
              {
                "title": "Set downsampling as text",
                "type": "string",
                "enum": [
                  "off",
                  "75",
                  "150",
                  "300",
                  "600",
                  "1200"
                ]
              },
              {
                "title": "Set downsampling as an integer",
                "type": "integer",
                "enum": [
                  75,
                  150,
                  300,
                  600,
                  1200
                ]
              }
            ],
            "default": "300",
            "description": "Downsample images during HTML conversion, or preserve original resolutions with `off`.",
            "x-order": 51
          },
          "page_size": {
            "type": "string",
            "description": "Select a standard paper size for the generated PDF.",
            "enum": [
              "letter",
              "legal",
              "ledger",
              "A3",
              "A4",
              "A5"
            ],
            "default": "letter",
            "x-order": 54
          },
          "page_margin": {
            "type": "string",
            "description": "Set equal PDF margins as a number followed by `in` or `mm`, for example `8mm` or `2.5in`.",
            "pattern": "^[0-9]+(?:\\.[0-9]+)?(?:in|mm)$",
            "default": "1in",
            "x-order": 55
          },
          "page_orientation": {
            "type": "string",
            "description": "Set the page orientation.",
            "enum": [
              "portrait",
              "landscape"
            ],
            "default": "portrait",
            "x-order": 56
          },
          "web_layout": {
            "type": "string",
            "description": "Select the intended desktop, tablet, or mobile layout for responsive web pages.",
            "enum": [
              "desktop",
              "tablet",
              "mobile"
            ],
            "default": "desktop",
            "x-order": 57
          }
        }
      },
      "ConvertToPdfUrlInputBranch": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "URL of a web page to process.",
            "x-order": 3
          }
        },
        "required": [
          "url"
        ]
      },
      "ConvertToPdfJobOptionsFileInputBranch": {
        "type": "object",
        "properties": {
          "job_options": {
            "type": "string",
            "format": "binary",
            "description": "PostScript and EPS input only. Upload a `.joboptions` profile to use as the conversion settings. The profile must be readable, non-empty, no larger than 5 MB, and contain valid settings for the conversion. Newly uploaded joboptions resource IDs are returned in `inputId` and follow the normal resource retention lifecycle. Do not send with `job_options_id`.",
            "x-order": 70
          }
        },
        "required": [
          "job_options"
        ]
      },
      "ConvertToPdfJobOptionsIdInputBranch": {
        "type": "object",
        "properties": {
          "job_options_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "PostScript and EPS input only. Resource ID of an existing `.joboptions` profile to use as the conversion settings. The profile must be accessible, readable, non-empty, no larger than 5 MB, and contain valid settings for the conversion. The existing joboptions resource ID is returned in `inputId` with the source input ID. Do not send with `job_options`.",
            "x-order": 71
          }
        },
        "required": [
          "job_options_id"
        ]
      },
      "StructuredTextRgbColor": {
        "type": "array",
        "minItems": 3,
        "maxItems": 3,
        "items": {
          "type": "integer",
          "minimum": 0,
          "maximum": 255
        },
        "description": "RGB color as three integer channel values from 0 to 255."
      },
      "ZugferdRgbColor": {
        "type": "array",
        "minItems": 3,
        "maxItems": 3,
        "items": {
          "type": "integer",
          "minimum": 0,
          "maximum": 255
        },
        "description": "RGB color as three integer channel values from 0 to 255."
      },
      "ZugferdCmykColor": {
        "type": "array",
        "minItems": 4,
        "maxItems": 4,
        "items": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "description": "CMYK color as four integer percentage channels from 0 to 100."
      },
      "ZugferdDecimalPrecision": {
        "type": [
          "integer",
          "string"
        ],
        "minimum": 0,
        "maximum": 4,
        "pattern": "^[0-4]$",
        "default": 2,
        "description": "Number of decimal places used when rendering invoice amounts."
      },
      "ZugferdPdfRequest": {
        "oneOf": [
          {
            "title": "Upload invoice XML",
            "description": "Upload the ZUGFeRD invoice XML document directly.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ZugferdPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/ZugferdInvoiceXmlFileInputBranch"
              }
            ]
          },
          {
            "title": "Use invoice XML resource ID",
            "description": "Use an existing ZUGFeRD invoice XML resource ID.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ZugferdPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/ZugferdInvoiceXmlIdInputBranch"
              }
            ]
          }
        ]
      },
      "ZugferdPdfRequestOptions": {
        "type": "object",
        "properties": {
          "pdf_file": {
            "type": "string",
            "format": "binary",
            "description": "Optional source PDF. If omitted, a PDF is generated from the XML input. Do not provide with `pdf_id`.",
            "x-order": 10
          },
          "pdf_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Optional existing source PDF resource ID returned by a POST request. If omitted, a PDF is generated from the XML input. Do not provide with `pdf_file`.",
            "x-order": 11
          },
          "logo_file": {
            "type": "string",
            "format": "binary",
            "description": "Optional PNG or JPEG logo image to include in generated or regenerated visual PDFs. Do not provide with `logo_id`.",
            "x-order": 20
          },
          "logo_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Optional resource ID of a PNG or JPEG logo image to include in generated or regenerated visual PDFs. Must be a valid resource ID returned by a POST request. Do not provide with `logo_file`.",
            "x-order": 21
          },
          "render_options": {
            "$ref": "#/components/schemas/ZugferdRenderOptions",
            "description": "JSON appearance and regional-formatting options used when generating or regenerating a PDF. In multipart requests, this object is encoded as an `application/json` part. Logo selection is controlled by `logo_file` or `logo_id`.",
            "x-order": 30
          },
          "regenerate_pdf": {
            "type": "boolean",
            "default": false,
            "description": "Set to `true` only with `pdf_file` or `pdf_id` to allow the ZUGFeRD CLU to regenerate the visual PDF when the supplied PDF and XML do not match or when complete visual confirmation is required. When omitted or `false`, all comparisons actually performed must pass, but partial reverse-validation coverage alone is non-blocking.",
            "x-order": 31
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "x-order": 999
          }
        },
        "dependentSchemas": {
          "pdf_file": {
            "not": {
              "required": [
                "pdf_id"
              ]
            }
          },
          "logo_file": {
            "not": {
              "required": [
                "logo_id"
              ]
            }
          }
        },
        "if": {
          "properties": {
            "regenerate_pdf": {
              "const": true
            }
          },
          "required": [
            "regenerate_pdf"
          ]
        },
        "then": {
          "anyOf": [
            {
              "required": [
                "pdf_file"
              ]
            },
            {
              "required": [
                "pdf_id"
              ]
            }
          ]
        }
      },
      "ZugferdInvoiceXmlFileInputBranch": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "ZUGFeRD invoice XML document.",
            "x-order": 1
          }
        },
        "required": [
          "file"
        ]
      },
      "ZugferdInvoiceXmlIdInputBranch": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Existing ZUGFeRD invoice XML resource ID returned by a POST request.",
            "x-order": 1
          }
        },
        "required": [
          "id"
        ]
      },
      "ZugferdPdfJsonRequest": {
        "title": "Use existing resource IDs",
        "type": "object",
        "additionalProperties": false,
        "description": "Create a ZUGFeRD PDF from an existing XML resource and optional existing PDF and logo resources.",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Existing ZUGFeRD invoice XML resource ID returned by a POST request.",
            "x-order": 1
          },
          "pdf_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Optional existing source PDF resource ID returned by a POST request. If omitted, a PDF is generated from the XML input.",
            "x-order": 10
          },
          "logo_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Optional resource ID of a PNG or JPEG logo image to include in generated or regenerated visual PDFs.",
            "x-order": 20
          },
          "render_options": {
            "$ref": "#/components/schemas/ZugferdRenderOptions",
            "description": "Render options passed to the ZUGFeRD CLU when generating or regenerating a PDF. Logo selection is controlled by `logo_id`.",
            "x-order": 30
          },
          "regenerate_pdf": {
            "type": "boolean",
            "default": false,
            "description": "Set to `true` only with `pdf_id` to regenerate the visual PDF when the supplied PDF and XML do not match or when complete visual confirmation is required. When omitted or `false`, all comparisons actually performed must pass, but partial reverse-validation coverage alone is non-blocking.",
            "x-order": 31
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "x-order": 999
          }
        },
        "required": [
          "id"
        ],
        "if": {
          "properties": {
            "regenerate_pdf": {
              "const": true
            }
          },
          "required": [
            "regenerate_pdf"
          ]
        },
        "then": {
          "required": [
            "pdf_id"
          ]
        },
        "example": {
          "id": "0950b9bd-f046-4d3f-8ea3-d2894f1ae839",
          "pdf_id": "12f7ea0d-0e56-44bc-a3d2-42fdff96d993",
          "logo_id": "2ab5c15d-300c-b48a-69bf-512ec770ef07",
          "regenerate_pdf": true,
          "output": "invoice",
          "render_options": {
            "logo_corner": "top-right",
            "font": "Arial",
            "bold_font": "Arial Bold",
            "locale": "de-DE",
            "label_language": "en",
            "currency_display": "symbol",
            "date_format": "dd.MM.yyyy",
            "decimal_precision": 2,
            "text_color_rgb": [
              26,
              31,
              41
            ],
            "muted_text_color_cmyk": [
              10,
              5,
              0,
              55
            ],
            "accent_color_rgb": [
              20,
              64,
              115
            ],
            "border_color_cmyk": [
              12,
              7,
              0,
              20
            ],
            "table_header_color_rgb": [
              20,
              64,
              115
            ],
            "table_alternate_color_cmyk": [
              4,
              2,
              0,
              2
            ],
            "footer_message": "Thank you for your business."
          }
        }
      },
      "ValidatedZugferdJsonRequest": {
        "title": "Use an existing ZUGFeRD PDF resource ID",
        "type": "object",
        "additionalProperties": false,
        "description": "Validate an existing ZUGFeRD PDF resource without uploading it again.",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Existing ZUGFeRD PDF resource ID returned by a POST request.",
            "x-order": 1
          }
        },
        "required": [
          "id"
        ],
        "example": {
          "id": "0950b9bd-f046-4d3f-8ea3-d2894f1ae839"
        }
      },
      "ValidatedZugferdRequest": {
        "oneOf": [
          {
            "title": "Upload ZUGFeRD PDF",
            "description": "Upload the existing ZUGFeRD PDF directly for validation.",
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "file": {
                "type": "string",
                "format": "binary",
                "description": "Existing ZUGFeRD PDF to validate.",
                "x-order": 1
              }
            },
            "required": [
              "file"
            ]
          },
          {
            "title": "Use ZUGFeRD PDF resource ID",
            "description": "Use an existing ZUGFeRD PDF resource ID for validation.",
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "$ref": "#/components/schemas/ResourceId",
                "description": "Existing ZUGFeRD PDF resource ID returned by a POST request.",
                "x-order": 1
              }
            },
            "required": [
              "id"
            ]
          }
        ]
      },
      "ZugferdFinding": {
        "type": "object",
        "additionalProperties": false,
        "description": "Safe ZUGFeRD validation finding metadata. Source XML and PDF field values are omitted from API responses.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable finding code reported by the ZUGFeRD validation tooling."
          },
          "severity": {
            "type": "string",
            "description": "Validation severity reported by the ZUGFeRD validation tooling.",
            "enum": [
              "INFO",
              "WARNING",
              "BLOCKING",
              "ERROR"
            ]
          },
          "message": {
            "type": "string",
            "description": "Human-readable finding summary."
          },
          "field": {
            "type": "string",
            "description": "Optional invoice field associated with the finding."
          },
          "status": {
            "type": "string",
            "description": "Optional status detail associated with the finding."
          },
          "comparisonReason": {
            "type": "string",
            "pattern": "^[A-Z][A-Z0-9_]{0,63}$",
            "description": "Safe machine-readable reason explaining why a visual comparison received its status, such as BLANK_FIELD, AMBIGUOUS_VALUE, UNASSOCIATED_FIELD, UNINTERPRETABLE_VALUE, or PARTIAL_REVERSE_VALIDATION."
          }
        },
        "required": [
          "code",
          "severity",
          "message"
        ]
      },
      "ZugferdValidationResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "description": "Overall validation result. `VALID` requires successful ZUGFeRD package, XML, business-rule, and independent PDF/A-3 checks, but does not by itself claim complete reverse-content matching.",
            "enum": [
              "VALID",
              "INVALID"
            ]
          },
          "pdfa": {
            "type": "boolean",
            "description": "PDF/A-3 result from the independent PDFChecker validation. PDF/A-3a, PDF/A-3b, and PDF/A-3u are accepted."
          },
          "contentMatchStatus": {
            "type": "string",
            "description": "Whether the CLU conclusively matched the relevant PDF content to the embedded XML. `UNVERIFIED` is non-blocking when incomplete arbitrary-layout reverse coverage is the only unresolved condition.",
            "enum": [
              "NOT_APPLICABLE",
              "CONFIRMED",
              "UNVERIFIED",
              "FAILED",
              "ERROR",
              "DEMO_REDACTED"
            ],
            "x-enum-descriptions": {
              "NOT_APPLICABLE": "No PDF/XML visual comparison applied to the validation result.",
              "CONFIRMED": "Complete PDF/XML content matching was established.",
              "UNVERIFIED": "Checks performed did not find a mismatch, but complete reverse coverage was not established.",
              "FAILED": "A concrete content mismatch or reliably identified missing visual value was found.",
              "ERROR": "Content matching could not complete because of a validator error.",
              "DEMO_REDACTED": "The detailed content-match result is available on paid plans."
            }
          },
          "inputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "inputUrl": {
            "type": "string"
          },
          "findings": {
            "type": "array",
            "description": "Safe validation findings, including non-blocking warnings on otherwise valid PDFs. Actionable findings are prioritized and routine MATCH results are omitted.",
            "items": {
              "$ref": "#/components/schemas/ZugferdFinding"
            }
          },
          "message": {
            "type": "string",
            "description": "Free-tier notice when content-match and finding details have been redacted."
          }
        },
        "required": [
          "status",
          "pdfa",
          "contentMatchStatus",
          "inputId",
          "inputUrl"
        ]
      },
      "ZugferdErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string"
          },
          "findings": {
            "type": "array",
            "description": "Safe report or conformance findings when detail is available for the failure. Actionable findings are prioritized and routine MATCH results are omitted.",
            "items": {
              "$ref": "#/components/schemas/ZugferdFinding"
            }
          },
          "message": {
            "type": "string",
            "description": "Free-tier notice when finding details have been redacted or omitted."
          }
        },
        "required": [
          "error"
        ]
      },
      "ZugferdRenderOptions": {
        "type": "object",
        "additionalProperties": false,
        "example": {
          "logo_corner": "top-right",
          "font": "Arial",
          "bold_font": "Arial Bold",
          "locale": "de-DE",
          "label_language": "en",
          "currency_display": "symbol",
          "date_format": "dd.MM.yyyy",
          "decimal_precision": 2,
          "text_color_rgb": [
            26,
            31,
            41
          ],
          "muted_text_color_cmyk": [
            10,
            5,
            0,
            55
          ],
          "accent_color_rgb": [
            20,
            64,
            115
          ],
          "border_color_cmyk": [
            12,
            7,
            0,
            20
          ],
          "table_header_color_rgb": [
            20,
            64,
            115
          ],
          "table_alternate_color_cmyk": [
            4,
            2,
            0,
            2
          ],
          "footer_message": "Thank you for your business."
        },
        "properties": {
          "logo_corner": {
            "type": "string",
            "enum": [
              "top-left",
              "top-right",
              "bottom-left",
              "bottom-right"
            ],
            "default": "top-left",
            "description": "Corner where the logo is placed when `logo_file` or `logo_id` supplies a logo. Logo selection is controlled by the request fields, not by this JSON object."
          },
          "font": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Body-text font face used when rendering a generated invoice. Supply a text-capable installed font from the [pdfRest Font List](https://docs.pdfrest.com/additional-guides/font-list/) or another installed font. The value is used exactly as supplied; it does not select or infer a font family. Symbol fonts such as Webdings are not valid for readable invoice text. When omitted, pdfRest uses DejaVu Sans."
          },
          "bold_font": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Emphasized-text and heading font face. This is independent of `font`: supplying one does not change the other. Supply a text-capable installed font from the [pdfRest Font List](https://docs.pdfrest.com/additional-guides/font-list/) or another installed font. When omitted, pdfRest uses DejaVu Sans Bold."
          },
          "text_color_rgb": {
            "$ref": "#/components/schemas/ZugferdRgbColor",
            "description": "Primary text color. Defaults to `[26,31,41]` when both text color fields are omitted. Do not provide with `text_color_cmyk`."
          },
          "text_color_cmyk": {
            "$ref": "#/components/schemas/ZugferdCmykColor",
            "description": "Primary text color. Do not provide with `text_color_rgb`."
          },
          "muted_text_color_rgb": {
            "$ref": "#/components/schemas/ZugferdRgbColor",
            "description": "Muted secondary text color. Defaults to `[89,99,115]` when both muted text color fields are omitted. Do not provide with `muted_text_color_cmyk`."
          },
          "muted_text_color_cmyk": {
            "$ref": "#/components/schemas/ZugferdCmykColor",
            "description": "Muted secondary text color. Do not provide with `muted_text_color_rgb`."
          },
          "accent_color_rgb": {
            "$ref": "#/components/schemas/ZugferdRgbColor",
            "description": "Accent color used for emphasized invoice elements. Defaults to `[20,64,115]` when both accent color fields are omitted. Do not provide with `accent_color_cmyk`."
          },
          "accent_color_cmyk": {
            "$ref": "#/components/schemas/ZugferdCmykColor",
            "description": "Accent color used for emphasized invoice elements. Do not provide with `accent_color_rgb`."
          },
          "border_color_rgb": {
            "$ref": "#/components/schemas/ZugferdRgbColor",
            "description": "Table and rule border color. Defaults to `[179,189,204]` when both border color fields are omitted. Do not provide with `border_color_cmyk`."
          },
          "border_color_cmyk": {
            "$ref": "#/components/schemas/ZugferdCmykColor",
            "description": "Table and rule border color. Do not provide with `border_color_rgb`."
          },
          "table_header_color_rgb": {
            "$ref": "#/components/schemas/ZugferdRgbColor",
            "description": "Table header fill color. Defaults to `[20,64,115]` when both table header color fields are omitted. Do not provide with `table_header_color_cmyk`."
          },
          "table_header_color_cmyk": {
            "$ref": "#/components/schemas/ZugferdCmykColor",
            "description": "Table header fill color. Do not provide with `table_header_color_rgb`."
          },
          "table_alternate_color_rgb": {
            "$ref": "#/components/schemas/ZugferdRgbColor",
            "description": "Alternating table row fill color. Defaults to `[240,245,250]` when both table alternate color fields are omitted. Do not provide with `table_alternate_color_cmyk`."
          },
          "table_alternate_color_cmyk": {
            "$ref": "#/components/schemas/ZugferdCmykColor",
            "description": "Alternating table row fill color. Do not provide with `table_alternate_color_rgb`."
          },
          "footer_message": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "Optional footer text. Use `null` or omit the field to leave the footer unset."
          },
          "locale": {
            "type": "string",
            "enum": [
              "de-DE",
              "fr-FR",
              "nl-NL",
              "en-GB"
            ],
            "default": "en-GB",
            "description": "Locale used for formatting invoice values. This does not control invoice label language."
          },
          "label_language": {
            "$ref": "#/components/schemas/Bcp47LanguageTag",
            "default": "en",
            "description": "Invoice label language. Supported primary language codes are `en`, `de`, and `fr`; region subtags such as `en-US` are accepted but normalized to the two-letter primary language passed to the ZUGFeRD CLU."
          },
          "currency_display": {
            "type": "string",
            "enum": [
              "code",
              "symbol",
              "name"
            ],
            "default": "code",
            "description": "Currency display mode. When set to `symbol`, the renderer derives the symbol from the invoice currency code and falls back to the code for unknown currencies."
          },
          "date_format": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional .NET date format string. The format must preserve the complete day, month, and four-digit year so the generated PDF can be validated independently. Use `null` or omit the field to use the renderer default."
          },
          "decimal_precision": {
            "$ref": "#/components/schemas/ZugferdDecimalPrecision"
          }
        },
        "dependentSchemas": {
          "text_color_rgb": {
            "not": {
              "required": [
                "text_color_cmyk"
              ]
            }
          },
          "muted_text_color_rgb": {
            "not": {
              "required": [
                "muted_text_color_cmyk"
              ]
            }
          },
          "accent_color_rgb": {
            "not": {
              "required": [
                "accent_color_cmyk"
              ]
            }
          },
          "border_color_rgb": {
            "not": {
              "required": [
                "border_color_cmyk"
              ]
            }
          },
          "table_header_color_rgb": {
            "not": {
              "required": [
                "table_header_color_cmyk"
              ]
            }
          },
          "table_alternate_color_rgb": {
            "not": {
              "required": [
                "table_alternate_color_cmyk"
              ]
            }
          }
        }
      },
      "StructuredTextMargin": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "top": {
            "type": "number",
            "minimum": 0,
            "description": "Top margin in PDF points."
          },
          "right": {
            "type": "number",
            "minimum": 0,
            "description": "Right margin in PDF points."
          },
          "bottom": {
            "type": "number",
            "minimum": 0,
            "description": "Bottom margin in PDF points."
          },
          "left": {
            "type": "number",
            "minimum": 0,
            "description": "Left margin in PDF points."
          }
        }
      },
      "StructuredTextPageSetup": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "size": {
            "type": "string",
            "minLength": 1,
            "description": "Named page size understood by the structured-text converter, such as `Letter` or `A4`.",
            "x-order": 1
          },
          "width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Custom page width in PDF points. Must be supplied with `height`.",
            "x-order": 2
          },
          "height": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Custom page height in PDF points. Must be supplied with `width`.",
            "x-order": 3
          },
          "orientation": {
            "type": "string",
            "enum": [
              "auto",
              "portrait",
              "landscape"
            ],
            "description": "Page orientation. `auto` lets the converter choose an orientation appropriate for the content.",
            "x-order": 4
          },
          "margin": {
            "$ref": "#/components/schemas/StructuredTextMargin",
            "description": "Per-side page margins in PDF points.",
            "x-order": 5
          }
        },
        "dependentRequired": {
          "width": [
            "height"
          ],
          "height": [
            "width"
          ]
        }
      },
      "StructuredTextTableStyle": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "column_width_weights": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "description": "Sets relative table column-width weights."
          },
          "keep_header_with_first_row": {
            "type": "boolean",
            "description": "Keeps a table header with its first data row when paginating."
          },
          "repeat_headers_on_overflow": {
            "type": "boolean",
            "description": "Repeats table headers on continuation pages."
          },
          "show_borders": {
            "type": "boolean",
            "description": "Draws borders around table cells."
          },
          "border_width": {
            "type": "number",
            "minimum": 0,
            "maximum": 12,
            "description": "Sets the table border width in PDF points."
          },
          "border_color_rgb": {
            "$ref": "#/components/schemas/StructuredTextRgbColor",
            "description": "Sets the table border color."
          },
          "header_fill_color_rgb": {
            "$ref": "#/components/schemas/StructuredTextRgbColor",
            "description": "Sets the header-row background color."
          },
          "header_text_color_rgb": {
            "$ref": "#/components/schemas/StructuredTextRgbColor",
            "description": "Sets the header-row text color."
          },
          "row_fill_color_rgb": {
            "$ref": "#/components/schemas/StructuredTextRgbColor",
            "description": "Sets the data-row background color."
          },
          "alternate_row_fill_color_rgb": {
            "$ref": "#/components/schemas/StructuredTextRgbColor",
            "description": "Sets the alternating data-row background color."
          },
          "cell_padding": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "top": {
                "type": "number",
                "minimum": 0,
                "maximum": 72,
                "description": "Sets top cell padding in PDF points."
              },
              "right": {
                "type": "number",
                "minimum": 0,
                "maximum": 72,
                "description": "Sets right cell padding in PDF points."
              },
              "bottom": {
                "type": "number",
                "minimum": 0,
                "maximum": 72,
                "description": "Sets bottom cell padding in PDF points."
              },
              "left": {
                "type": "number",
                "minimum": 0,
                "maximum": 72,
                "description": "Sets left cell padding in PDF points."
              }
            },
            "description": "Sets per-side table cell padding in PDF points."
          }
        }
      },
      "StructuredTextStyle": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "font": {
            "type": "string",
            "minLength": 1,
            "description": "Body-text font family. See the [Font List](https://pdfrest.com/documentation/fontlist/) for supported fonts."
          },
          "heading_font": {
            "type": "string",
            "minLength": 1,
            "description": "Heading font family. See the [Font List](https://pdfrest.com/documentation/fontlist/) for supported fonts."
          },
          "code_font": {
            "type": "string",
            "minLength": 1,
            "description": "Font family used for code and preformatted text. See the [Font List](https://pdfrest.com/documentation/fontlist/) for supported fonts."
          },
          "cjk_font": {
            "type": "string",
            "minLength": 1,
            "description": "Font family used for Chinese, Japanese, and Korean text."
          },
          "fallback_fonts": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Ordered font families used when a character is unavailable in the primary font."
          },
          "text_size": {
            "type": "number",
            "minimum": 6,
            "maximum": 72,
            "description": "Body-text size in PDF points."
          },
          "text_color_rgb": {
            "$ref": "#/components/schemas/StructuredTextRgbColor",
            "description": "Body-text color."
          },
          "heading_scale": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 4,
            "description": "Scale applied to heading sizes relative to body text."
          },
          "table": {
            "$ref": "#/components/schemas/StructuredTextTableStyle",
            "description": "Controls table formatting. Only applicable when converting a Markdown (`.md` or `.markdown`) or CSV (`.csv`) file."
          }
        }
      },
      "StructuredTextMarkdownOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "image_alt_text": {
            "type": "object",
            "description": "Maps each Markdown image target to non-empty alternate text. Property names are the image targets used in the Markdown source; values are their alternate-text strings.",
            "example": {
              "company-logo": "Datalogics Example Company logo"
            }
          },
          "missing_image_alt_text": {
            "type": "string",
            "enum": [
              "warn",
              "fail",
              "artifact"
            ],
            "x-enum-descriptions": {
              "warn": "Continue conversion and report missing alternate text according to converter behavior.",
              "fail": "Reject conversion when an image lacks alternate text.",
              "artifact": "Treat an image without alternate text as an artifact."
            },
            "description": "Controls handling for images without alternate text."
          },
          "image_sources": {
            "type": "object",
            "description": "Map from each non-HTTPS Markdown image target to exactly one uploaded or existing image source. Property names are the image targets used in the Markdown source. Each value contains exactly one of:\n\n- **`upload_index`** — Zero-based position in the repeated multipart `image_files` uploads.\n- **`image_id_index`** — Zero-based position in the ordered `image_ids` values.\n\nInline, reference-style, and raw HTML `<img>` targets are supported.\n",
            "example": {
              "company-logo": {
                "upload_index": 0
              },
              "quarterly-chart": {
                "image_id_index": 0
              }
            }
          }
        }
      },
      "StructuredTextJsonMarkdownOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "image_alt_text": {
            "type": "object",
            "description": "Maps each Markdown image target to non-empty alternate text. Property names are the image targets used in the Markdown source; values are their alternate-text strings.",
            "example": {
              "company-logo": "Datalogics Example Company logo"
            }
          },
          "missing_image_alt_text": {
            "type": "string",
            "enum": [
              "warn",
              "fail",
              "artifact"
            ],
            "x-enum-descriptions": {
              "warn": "Continue conversion and report missing alternate text according to converter behavior.",
              "fail": "Reject conversion when an image lacks alternate text.",
              "artifact": "Treat an image without alternate text as an artifact."
            },
            "description": "Controls handling for images without alternate text."
          },
          "image_sources": {
            "type": "object",
            "description": "Maps each non-HTTPS Markdown image target to an existing image selected from `image_ids`. Property names are the image targets used in the Markdown source. Each value contains an **`image_id_index`**, the zero-based position in the ordered `image_ids` values. Multipart `image_files` uploads are not available in an `application/json` request.",
            "example": {
              "company-logo": {
                "image_id_index": 0
              }
            }
          }
        }
      },
      "StructuredTextPlainTextOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "line_handling": {
            "type": "string",
            "enum": [
              "reflow",
              "preserve"
            ],
            "default": "reflow",
            "x-enum-descriptions": {
              "reflow": "Reflow plain-text lines to fit the page width.",
              "preserve": "Preserve source line breaks."
            },
            "description": "Controls whether source line breaks are reflowed or preserved."
          }
        }
      },
      "StructuredTextCsvColumn": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "index": {
            "type": "integer",
            "minimum": 0,
            "description": "Selects the column by its zero-based index."
          },
          "text_align": {
            "type": "string",
            "enum": [
              "left",
              "center",
              "right"
            ],
            "description": "Sets text alignment for this column."
          },
          "width_weight": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Sets the relative width weight for this column."
          }
        },
        "required": [
          "index"
        ]
      },
      "StructuredTextCsvOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "first_row_is_header": {
            "type": "boolean",
            "description": "Treats the first row as table headers."
          },
          "delimiter": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1,
            "description": "Sets the one-character field delimiter."
          },
          "columns": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/StructuredTextCsvColumn"
            },
            "description": "Provides per-column alignment and sizing overrides."
          }
        }
      },
      "StructuredTextOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data_presentation": {
            "type": "string",
            "enum": [
              "source",
              "hierarchy"
            ],
            "default": "source",
            "x-enum-descriptions": {
              "source": "Preserve JSON or XML syntax and indentation.",
              "hierarchy": "Render JSON or XML as a readable hierarchy."
            },
            "description": "Controls whether data is presented as source syntax or a readable hierarchy. Only applicable when converting a JSON (`.json`) or XML (`.xml`) file."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "PDF document title."
          },
          "language": {
            "type": "string",
            "minLength": 1,
            "description": "Document language, typically supplied as a BCP 47 language tag such as `en-US`."
          },
          "enable_tagging": {
            "type": "boolean",
            "description": "Enable or disable tagged output. When omitted, `tagged_pdf` applies if supplied; otherwise the structured-text converter's tagged-output default applies."
          },
          "include_unrendered_html": {
            "type": "boolean",
            "description": "Preserves unsupported raw HTML as literal text instead of stripping it. Only applicable when converting a Markdown (`.md` or `.markdown`) file."
          },
          "markdown": {
            "$ref": "#/components/schemas/StructuredTextMarkdownOptions",
            "description": "Configures Markdown image sources and accessibility behavior. Only applicable when converting a Markdown (`.md` or `.markdown`) file."
          },
          "page_setup": {
            "$ref": "#/components/schemas/StructuredTextPageSetup",
            "description": "Advanced page settings in PDF points. Values supplied here take precedence over the corresponding top-level page options."
          },
          "style": {
            "$ref": "#/components/schemas/StructuredTextStyle",
            "description": "Typography, color, and table presentation settings."
          },
          "plain_text": {
            "$ref": "#/components/schemas/StructuredTextPlainTextOptions",
            "description": "Configures plain-text conversion. Only applicable when converting a plain-text (`.txt`) file."
          },
          "csv": {
            "$ref": "#/components/schemas/StructuredTextCsvOptions",
            "description": "Configures CSV conversion. Only applicable when converting a CSV (`.csv`) file."
          }
        },
        "example": {
          "title": "Quarterly service summary",
          "language": "en-US",
          "enable_tagging": true,
          "style": {
            "font": "Arial",
            "table": {
              "show_borders": true,
              "header_fill_color_rgb": [
                34,
                93,
                131
              ],
              "header_text_color_rgb": [
                255,
                255,
                255
              ],
              "row_fill_color_rgb": [
                248,
                250,
                252
              ],
              "alternate_row_fill_color_rgb": [
                232,
                240,
                246
              ],
              "cell_padding": {
                "top": 5,
                "right": 6,
                "bottom": 5,
                "left": 6
              }
            }
          },
          "csv": {
            "first_row_is_header": true
          }
        }
      },
      "StructuredTextJsonOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data_presentation": {
            "type": "string",
            "enum": [
              "source",
              "hierarchy"
            ],
            "default": "source",
            "x-enum-descriptions": {
              "source": "Preserve JSON or XML syntax and indentation.",
              "hierarchy": "Render JSON or XML as a readable hierarchy."
            },
            "description": "Controls whether data is presented as source syntax or a readable hierarchy. Only applicable when converting a JSON (`.json`) or XML (`.xml`) file."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "PDF document title."
          },
          "language": {
            "type": "string",
            "minLength": 1,
            "description": "Document language, typically supplied as a BCP 47 language tag such as `en-US`."
          },
          "enable_tagging": {
            "type": "boolean",
            "description": "Enable or disable tagged output. When omitted, `tagged_pdf` applies if supplied; otherwise the structured-text converter's tagged-output default applies."
          },
          "include_unrendered_html": {
            "type": "boolean",
            "description": "Preserves unsupported raw HTML as literal text instead of stripping it. Only applicable when converting a Markdown (`.md` or `.markdown`) file."
          },
          "markdown": {
            "$ref": "#/components/schemas/StructuredTextJsonMarkdownOptions",
            "description": "Configures Markdown image resources and accessibility behavior for an `application/json` request. Only applicable when converting a Markdown (`.md` or `.markdown`) file."
          },
          "page_setup": {
            "$ref": "#/components/schemas/StructuredTextPageSetup",
            "description": "Advanced page settings in PDF points. Values supplied here take precedence over the corresponding top-level page options."
          },
          "style": {
            "$ref": "#/components/schemas/StructuredTextStyle",
            "description": "Typography, color, and table presentation settings."
          },
          "plain_text": {
            "$ref": "#/components/schemas/StructuredTextPlainTextOptions",
            "description": "Configures plain-text conversion. Only applicable when converting a plain-text (`.txt`) file."
          },
          "csv": {
            "$ref": "#/components/schemas/StructuredTextCsvOptions",
            "description": "Configures CSV conversion. Only applicable when converting a CSV (`.csv`) file."
          }
        },
        "example": {
          "title": "Quarterly service summary",
          "language": "en-US",
          "enable_tagging": true,
          "markdown": {
            "image_sources": {
              "company-logo": {
                "image_id_index": 0
              }
            },
            "image_alt_text": {
              "company-logo": "Datalogics Example Company logo"
            }
          }
        }
      },
      "ConvertToPdfSingleInputResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "string",
            "description": "URL to retrieve the generated PDF."
          },
          "outputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "inputId": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ResourceId"
              },
              {
                "type": "array",
                "minItems": 2,
                "items": {
                  "$ref": "#/components/schemas/ResourceId"
                }
              }
            ],
            "description": "Resource ID of the source input. For PostScript and EPS conversions with custom `job_options` or `job_options_id`, this is an array containing the source input ID followed by the joboptions resource ID."
          },
          "warning": {
            "type": "string",
            "description": "Warning returned when a non-structured conversion completes in a failsafe mode."
          },
          "message": {
            "type": "string",
            "description": "Informational response message, including demo-mode notices when applicable."
          }
        },
        "required": [
          "outputUrl",
          "outputId",
          "inputId"
        ]
      },
      "ConvertToPdfMarkdownResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "outputUrl": {
            "type": "string",
            "description": "URL to retrieve the generated PDF."
          },
          "outputId": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "inputId": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/ResourceId"
            },
            "description": "Source Markdown resource ID, followed by newly uploaded image resource IDs in upload order, then existing `image_ids` in submission order."
          },
          "message": {
            "type": "string",
            "description": "Informational response message, including demo-mode notices when applicable."
          }
        },
        "required": [
          "outputUrl",
          "outputId",
          "inputId"
        ]
      },
      "ResourceUrlResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string",
            "description": "URL to retrieve the resource file"
          }
        },
        "required": [
          "url"
        ]
      },
      "ResourceInfoResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "MIME type of the resource"
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "description": "File size in bytes"
          },
          "modified": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "type",
          "size",
          "modified"
        ]
      },
      "ConvertToPdfJsonRequest": {
        "oneOf": [
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing input resource and the default conversion profile.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertToPdfJsonRequestOptions"
              },
              {
                "$ref": "#/components/schemas/JsonIdInputBranch"
              }
            ],
            "example": {
              "id": "0950b9bd-f046-4d3f-8ea3-d2894f1ae839",
              "image_ids": [
                "11e24955-fbbe-4267-aac6-d1c7e531a426"
              ],
              "structured_text_options": {
                "title": "Quarterly service summary",
                "language": "en-US",
                "enable_tagging": true,
                "markdown": {
                  "image_sources": {
                    "company-logo": {
                      "image_id_index": 0
                    }
                  },
                  "image_alt_text": {
                    "company-logo": "Datalogics Example Company logo"
                  }
                }
              }
            }
          },
          {
            "title": "Reference existing PostScript/EPS and joboptions files by ID",
            "description": "Use existing resource IDs for both the PostScript or EPS input and a custom `.joboptions` profile.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConvertToPdfPostScriptRequestOptions"
              },
              {
                "$ref": "#/components/schemas/JsonIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/ConvertToPdfJobOptionsIdJsonInputBranch"
              }
            ]
          }
        ]
      },
      "ConvertToPdfJsonRequestOptions": {
        "type": "object",
        "properties": {
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf`.",
            "x-order": 999
          },
          "compression": {
            "type": "string",
            "description": "Image compression for PostScript, Microsoft Office, and HTML conversion.",
            "enum": [
              "lossy",
              "lossless"
            ],
            "default": "lossy",
            "x-order": 50
          },
          "downsample": {
            "oneOf": [
              {
                "title": "Set downsampling as text",
                "type": "string",
                "enum": [
                  "off",
                  "75",
                  "150",
                  "300",
                  "600",
                  "1200"
                ]
              },
              {
                "title": "Set downsampling as an integer",
                "type": "integer",
                "enum": [
                  75,
                  150,
                  300,
                  600,
                  1200
                ]
              }
            ],
            "default": "300",
            "description": "Downsample images during PostScript, Microsoft Office, or HTML conversion, or preserve original resolutions with `off`.",
            "x-order": 51
          },
          "tagged_pdf": {
            "$ref": "#/components/schemas/OnOff",
            "description": "Microsoft Office and structured-text conversion. Set to `on` to create a tagged PDF or `off` to disable tagging. For structured-text input, `structured_text_options.enable_tagging` takes precedence when supplied; otherwise the structured-text converter's tagged-output default applies when this field is omitted.",
            "x-order": 52
          },
          "locale": {
            "type": "string",
            "description": "Microsoft Excel conversion only. Controls regional number, monetary, date, and time formatting; `US` uses `en_US` and `Germany` uses `de_DE`.",
            "enum": [
              "US",
              "Germany"
            ],
            "default": "US",
            "x-order": 53
          },
          "page_size": {
            "type": "string",
            "description": "HTML and structured-text conversion. Select a standard paper size for the generated PDF. For structured-text input, `structured_text_options.page_setup.size` takes precedence.",
            "enum": [
              "letter",
              "legal",
              "ledger",
              "A3",
              "A4",
              "A5"
            ],
            "default": "letter",
            "x-order": 54
          },
          "page_margin": {
            "type": "string",
            "description": "HTML and structured-text conversion. Set equal PDF margins as a number followed by `in` or `mm`, for example `8mm` or `2.5in`. For structured-text input, `structured_text_options.page_setup.margin` takes precedence.",
            "pattern": "^[0-9]+(?:\\.[0-9]+)?(?:in|mm)$",
            "default": "1in",
            "x-order": 55
          },
          "page_orientation": {
            "type": "string",
            "description": "HTML and structured-text conversion. Set the page orientation. For structured-text input, `structured_text_options.page_setup.orientation` takes precedence.",
            "enum": [
              "portrait",
              "landscape"
            ],
            "default": "portrait",
            "x-order": 56
          },
          "web_layout": {
            "type": "string",
            "description": "HTML conversion only. Select the intended desktop, tablet, or mobile layout for responsive web pages.",
            "enum": [
              "desktop",
              "tablet",
              "mobile"
            ],
            "default": "desktop",
            "x-order": 57
          },
          "structured_text_options": {
            "$ref": "#/components/schemas/StructuredTextJsonOptions",
            "description": "Conversion options for an existing Markdown, TXT, JSON, XML, or CSV resource. The API supplies source and destination paths; request options cannot set them.",
            "x-order": 60
          },
          "image_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/ResourceId"
            },
            "description": "Markdown input only. Existing GIF, JPEG, PNG, or TIFF resource IDs referenced by zero-based `image_id_index` values in `structured_text_options.markdown.image_sources`. Every supplied ID must be referenced by a Markdown image target.",
            "x-order": 62
          }
        }
      },
      "ConvertToPdfJobOptionsIdJsonInputBranch": {
        "type": "object",
        "properties": {
          "job_options_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of an existing `.joboptions` profile. The profile must be accessible, readable, non-empty, no larger than 5 MB, and contain valid settings for PostScript or EPS conversion.",
            "x-order": 71
          }
        },
        "required": [
          "job_options_id"
        ]
      },
      "CompressedPdfJsonRequest": {
        "unevaluatedProperties": false,
        "allOf": [
          {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "compression_level": {
                    "$ref": "#/components/schemas/CompressionLevel",
                    "description": "Degree of compression with a tradeoff between preserving fidelity (`low`) and maximizing file size reduction (`high`). When `custom` is selected, exactly one of `profile` or `profile_id` is required.\n",
                    "x-order": 10
                  },
                  "profile_id": {
                    "$ref": "#/components/schemas/ResourceId",
                    "description": "Resource ID of a previously uploaded JSON profile containing custom compression settings; it must be a valid resource ID returned by a POST request. [Create a JSON profile with custom settings](https://docs.pdfrest.com/pdfrest-api-toolkit-cloud/custom-compression-profiles/).",
                    "x-order": 51
                  },
                  "output": {
                    "$ref": "#/components/schemas/OutputFilename",
                    "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_compressed-pdf`.",
                    "x-order": 999
                  }
                },
                "required": [
                  "compression_level"
                ]
              },
              {
                "if": {
                  "properties": {
                    "compression_level": {
                      "const": "custom"
                    }
                  },
                  "required": [
                    "compression_level"
                  ]
                },
                "then": {
                  "required": [
                    "profile_id"
                  ]
                }
              }
            ]
          },
          {
            "$ref": "#/components/schemas/JsonIdInputBranch"
          }
        ]
      },
      "SignedPdfJsonRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing PDF file to sign. Must be a valid resource ID returned by a POST request."
          },
          "signature_configuration": {
            "$ref": "#/components/schemas/SignatureConfiguration",
            "x-order": 10
          },
          "pfx_credential_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a `.pfx` or `.p12` file containing the digital certificate and private key. Must be a valid resource ID returned by a POST request.",
            "x-order": 51
          },
          "pfx_passphrase_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a text file containing the PFX credential passphrase. Must be a valid resource ID returned by a POST request.",
            "x-order": 53
          },
          "certificate_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a `.der` or `.pem` certificate file for non-PFX credentials. Must be a valid resource ID returned by a POST request.",
            "x-order": 55
          },
          "private_key_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a `.der` or `.pem` private-key file for non-PFX credentials. Must be a valid resource ID returned by a POST request.",
            "x-order": 57
          },
          "logo_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a JPG, PNG, TIFF, or BMP image to display as the signature logo. Must be a valid resource ID returned by a POST request.",
            "x-order": 59
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_signed_pdf`. Example: `example_signed_doc`.",
            "x-order": 999
          }
        },
        "required": [
          "id",
          "signature_configuration"
        ],
        "oneOf": [
          {
            "title": "Use PFX and passphrase IDs",
            "description": "Sign the PDF using existing resource IDs for a PFX credential and its passphrase.",
            "required": [
              "pfx_credential_id",
              "pfx_passphrase_id"
            ]
          },
          {
            "title": "Use certificate and private key IDs",
            "description": "Sign the PDF using existing resource IDs for a certificate and its private key.",
            "required": [
              "certificate_id",
              "private_key_id"
            ]
          }
        ]
      },
      "WatermarkedPdfJsonRequest": {
        "oneOf": [
          {
            "title": "Use an RGB text watermark",
            "description": "Apply a text watermark using an RGB color.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkTextOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkRgbTextInputBranch"
              },
              {
                "$ref": "#/components/schemas/JsonIdInputBranch"
              }
            ]
          },
          {
            "title": "Use a CMYK text watermark",
            "description": "Apply a text watermark using a CMYK color.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkTextOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkCmykTextInputBranch"
              },
              {
                "$ref": "#/components/schemas/JsonIdInputBranch"
              }
            ]
          },
          {
            "title": "Use a watermark PDF ID",
            "description": "Apply an existing PDF resource as a watermark.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WatermarkCommonOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkFileOptions"
              },
              {
                "$ref": "#/components/schemas/WatermarkFileIdInputBranch"
              },
              {
                "$ref": "#/components/schemas/JsonIdInputBranch"
              }
            ]
          }
        ]
      },
      "DecryptedPdfJsonRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing PDF file to decrypt. Must be a valid resource ID returned by a POST request."
          },
          "current_open_password": {
            "$ref": "#/components/schemas/CurrentProtectionPassword",
            "description": "Existing open password required to decrypt the PDF.",
            "x-order": 50
          },
          "current_permissions_password": {
            "$ref": "#/components/schemas/CurrentProtectionPassword",
            "description": "Existing permissions password, when the input document has one.",
            "x-order": 51
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_decrypted-pdf`.",
            "x-order": 999
          }
        },
        "required": [
          "id",
          "current_open_password"
        ]
      },
      "UnrestrictedPdfJsonRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing PDF file to unrestrict. Must be a valid resource ID returned by a POST request."
          },
          "current_open_password": {
            "$ref": "#/components/schemas/CurrentProtectionPassword",
            "description": "Existing open password, used to preserve existing open-password encryption while restrictions are removed.",
            "x-order": 50
          },
          "current_permissions_password": {
            "$ref": "#/components/schemas/CurrentProtectionPassword",
            "description": "Existing permissions password required to remove the document restrictions.",
            "x-order": 51
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_unrestricted-pdf`.",
            "x-order": 999
          }
        },
        "required": [
          "id",
          "current_permissions_password"
        ]
      },
      "MergedPdfJsonRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id[]": {
            "type": "array",
            "minItems": 1,
            "description": "Alphanumeric IDs (UUIDs) of existing PDF files to merge, in merge order. Each must be a valid resource ID returned by a POST request.",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "x-order": 2
          },
          "type[]": {
            "type": "array",
            "minItems": 1,
            "description": "One `id` value for each submitted `id[]` resource, in the same merge order; values must correspond one-to-one.",
            "items": {
              "type": "string",
              "description": "The value `id`, identifying one corresponding existing-resource input.",
              "const": "id"
            },
            "x-order": 10
          },
          "pages[]": {
            "type": "array",
            "minItems": 1,
            "description": "One page expression for each `file` or `id[]` input. Supports comma-separated pages and ranges, `last`, reversed ranges, `even`, and `odd`.",
            "items": {
              "type": "string",
              "description": "Page expression for one corresponding input; supports comma-separated pages and ranges, `last`, reversed ranges, `even`, and `odd`.",
              "minLength": 1
            },
            "x-order": 11
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `pdfrest_merged-pdf`.",
            "x-order": 999
          }
        },
        "required": [
          "id[]",
          "type[]",
          "pages[]"
        ]
      },
      "AddImageJsonRequest": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing PDF file to modify. Must be a valid resource ID returned by a POST request."
          },
          "image_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing JPEG, TIFF, PNG, or GIF image to add. Must be a valid resource ID returned by a POST request.",
            "x-order": 51
          },
          "page": {
            "type": "integer",
            "description": "Valid page number in the input PDF on which to add the image.",
            "minimum": 1,
            "x-order": 10
          },
          "x": {
            "type": "integer",
            "description": "Horizontal position of the image's lower-left corner in PDF units, where 72 units equal 1 inch. Accepts any integer.",
            "x-order": 11
          },
          "y": {
            "type": "integer",
            "description": "Vertical position of the image's lower-left corner in PDF units, where 72 units equal 1 inch. Accepts any integer.",
            "x-order": 12
          },
          "width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Placed image width in PDF units. When only width or height is supplied, the image scales proportionally; when both are supplied, the requested dimensions are used. Defaults to the original image width.",
            "x-order": 13
          },
          "height": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Placed image height in PDF units. When only height or width is supplied, the image scales proportionally; when both are supplied, the requested dimensions are used. Defaults to the original image height.",
            "x-order": 14
          },
          "tag_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Enables tagging for the image added by this request. Set to `true` whenever `tag_language`, `tag_alt_text`, `tag_is_artifact`, or `tag_structure_type` is supplied. This does not automatically tag existing untagged content in the input PDF.",
            "x-order": 20
          },
          "tag_language": {
            "$ref": "#/components/schemas/Bcp47LanguageTag",
            "description": "BCP 47 language tag identifying the natural language of the image's tag metadata, such as alternate text. Requires `tag_enabled=true`.",
            "x-order": 21
          },
          "tag_alt_text": {
            "type": "string",
            "minLength": 1,
            "description": "Non-empty alternate text describing the added image for assistive technology. Requires `tag_enabled=true`.",
            "example": "Company logo",
            "x-order": 22
          },
          "tag_is_artifact": {
            "type": "boolean",
            "default": false,
            "description": "Set to `true` when the image is decorative or should not be treated as meaningful document content. Requires `tag_enabled=true`.",
            "x-order": 23
          },
          "tag_structure_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfContentStructureType"
              }
            ],
            "description": "Semantic PDF structure type for the added image. `Figure` is normally appropriate. Requires `tag_enabled=true`.",
            "default": "Figure",
            "x-order": 24
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-image`.",
            "x-order": 999
          }
        },
        "required": [
          "id",
          "image_id",
          "page",
          "x",
          "y"
        ],
        "additionalProperties": false
      },
      "AddImageBatchJsonRequest": {
        "type": "object",
        "description": "Common options for batch image insertion using existing PDF and image resource IDs.",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing PDF file to modify. Must be a valid resource ID returned by a POST request.",
            "x-order": 1
          },
          "tag_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Enables tagging for images added by this request. Set to true when tag_language or per-image tag metadata is supplied. This does not automatically tag existing untagged content in the input PDF.",
            "x-order": 20
          },
          "tag_language": {
            "$ref": "#/components/schemas/Bcp47LanguageTag",
            "description": "BCP 47 language tag for the request's image tag metadata. Requires tag_enabled=true.",
            "x-order": 21
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-image`.",
            "x-order": 999
          }
        },
        "required": [
          "id"
        ]
      },
      "AddImageBatchSingleJsonRequest": {
        "unevaluatedProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/AddImageBatchJsonRequest"
          },
          {
            "type": "object",
            "properties": {
              "image_objects": {
                "$ref": "#/components/schemas/ExistingImagePlacement",
                "description": "One image placement using an existing image resource.",
                "x-order": 10
              }
            },
            "required": [
              "image_objects"
            ]
          }
        ]
      },
      "AddImageBatchArrayJsonRequest": {
        "unevaluatedProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/AddImageBatchJsonRequest"
          },
          {
            "type": "object",
            "properties": {
              "image_objects": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "$ref": "#/components/schemas/ExistingImagePlacement"
                },
                "description": "One or more image placements using existing image resources. Repeat the same image_id to reuse an image.",
                "x-order": 10
              }
            },
            "required": [
              "image_objects"
            ]
          }
        ]
      },
      "AddImagePlacementBase": {
        "type": "object",
        "description": "Common placement and tagging properties for one image.",
        "properties": {
          "page": {
            "oneOf": [
              {
                "title": "Select one page by number",
                "type": "integer",
                "minimum": 1,
                "example": 1
              },
              {
                "title": "Select pages with an expression",
                "type": "string",
                "minLength": 1,
                "examples": [
                  "all",
                  "2-4,6-last"
                ]
              }
            ],
            "description": "Page selector. Supports a page number, `all`, comma-separated pages, numeric ranges, `last`, and combinations such as `2-4,6-last`."
          },
          "x": {
            "type": "integer",
            "minimum": 0,
            "description": "Horizontal position of the image's lower-left corner in PDF units, where 72 units equal 1 inch."
          },
          "y": {
            "type": "integer",
            "minimum": 0,
            "description": "Vertical position of the image's lower-left corner in PDF units, where 72 units equal 1 inch."
          },
          "width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Placed image width in PDF units. When only width or height is supplied, the image scales proportionally."
          },
          "height": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Placed image height in PDF units. When only height or width is supplied, the image scales proportionally."
          },
          "tag_alt_text": {
            "type": "string",
            "minLength": 1,
            "description": "Non-empty alternate text for the added image. Requires tag_enabled=true."
          },
          "tag_is_artifact": {
            "type": "boolean",
            "default": false,
            "description": "Set to true when the image is decorative or should not be treated as meaningful content. Requires tag_enabled=true."
          },
          "tag_structure_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfContentStructureType"
              }
            ],
            "description": "Semantic PDF structure type for the added image. Figure is normally appropriate. Requires tag_enabled=true.",
            "default": "Figure"
          }
        },
        "required": [
          "page",
          "x",
          "y"
        ]
      },
      "ExistingImagePlacement": {
        "title": "Use an existing image resource",
        "description": "One image placement using an existing image resource. Repeat image_id to place the same image more than once.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AddImagePlacementBase"
          },
          {
            "type": "object",
            "properties": {
              "image_id": {
                "$ref": "#/components/schemas/ResourceId",
                "description": "Existing image resource ID."
              }
            },
            "required": [
              "image_id"
            ]
          }
        ],
        "unevaluatedProperties": false
      },
      "UploadedImagePlacement": {
        "title": "Use an uploaded image by index",
        "description": "One image placement using an image from the ordered multipart image_files uploads. Repeat image_index to reuse an uploaded image.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AddImagePlacementBase"
          },
          {
            "type": "object",
            "properties": {
              "image_index": {
                "type": "integer",
                "minimum": 0,
                "description": "Zero-based position of the image in the ordered repeated image_files uploads."
              }
            },
            "required": [
              "image_index"
            ]
          }
        ],
        "unevaluatedProperties": false
      },
      "AddImageObject": {
        "description": "One multipart image placement. Use either an existing image resource or an uploaded image file.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/ExistingImagePlacement"
          },
          {
            "$ref": "#/components/schemas/UploadedImagePlacement"
          }
        ]
      },
      "AddAttachmentJsonRequest": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing PDF file to modify. Must be a valid resource ID returned by a POST request."
          },
          "id_to_attach": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing file to attach to the PDF. Must be a valid resource ID returned by a POST request.",
            "x-order": 51
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-attachment`.",
            "x-order": 999
          }
        },
        "required": [
          "id",
          "id_to_attach"
        ],
        "additionalProperties": false
      },
      "ConvertedColorsJsonRequest": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing PDF file to process. Must be a valid resource ID returned by a POST request."
          },
          "color_profile": {
            "$ref": "#/components/schemas/ConvertedColorProfile",
            "description": "Color profile to apply. Supported values:\n\n- **`lab-d50`** - `L*a*b` color specification with a D50 white point. The Lab color space is based on the CIE XYZ color space, with an `L` dimension for lightness and `a` and `b` color coordinates. This is Adobe Systems' standard Lab profile.\n- **`srgb`** - Standard RGB, the default profile for Windows monitors.\n- **`apple-rgb`** - Apple RGB, the default profile for Mac monitors.\n- **`color-match-rgb`** - ColorMatch RGB, a simpler version of the Radius ColorMatch RGB space without the non-zero black point.\n- **`gamma-18`** - Gray Gamma 1.8, a grayscale display profile used for content viewed on a monitor.\n- **`gamma-22`** - Gray Gamma 2.2.\n- **`dot-gain-10`** - Grayscale printer profile with 10% dot gain. Dot gain is commonly used in offset printing to describe the increase in halftone-dot size during printing, which can make a document appear darker than intended.\n- **`dot-gain-15`** - Grayscale printer profile with 15% dot gain.\n- **`dot-gain-20`** - Grayscale printer profile with 20% dot gain.\n- **`dot-gain-25`** - Grayscale printer profile with 25% dot gain.\n- **`dot-gain-30`** - Grayscale printer profile with 30% dot gain.\n- **`monitor-rgb`** - RGB Monitor, referring to a monitor that requires separate signals for the three primary colors.\n- **`acrobat5-cmyk`** - Adobe Reader 5 CMYK.\n- **`acrobat9-cmyk`** - Adobe Reader 9 CMYK.\n- **`custom`** - Supply a custom ICC color profile using the `profile_id` parameter.\n",
            "x-order": 10
          },
          "profile_id": {
            "description": "Resource ID of an ICC color profile already stored on the processing server. Required when `color_profile` is `custom`; it must be a valid resource ID returned by a POST request.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ResourceId"
              },
              {
                "description": "Resource ID of an ICC color profile already stored on the processing server."
              }
            ],
            "x-order": 51
          },
          "preserve_black": {
            "type": "string",
            "description": "Preserve the original CMYK, RGB, or grayscale definition of black elements during conversion, preventing unintended conversion such as RGB black text becoming rich CMYK black.",
            "enum": [
              "false",
              "true"
            ],
            "default": "false",
            "x-order": 52
          },
          "rendering_intent": {
            "$ref": "#/components/schemas/RenderingIntent",
            "x-order": 53
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-converted-colors`.",
            "x-order": 999
          }
        },
        "required": [
          "id",
          "color_profile"
        ],
        "if": {
          "properties": {
            "color_profile": {
              "const": "custom"
            }
          },
          "required": [
            "color_profile"
          ]
        },
        "then": {
          "required": [
            "profile_id"
          ]
        },
        "additionalProperties": false
      },
      "ImportedFormDataJsonRequest": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing editable Acroform or XFA PDF. Must be a valid resource ID returned by a POST request."
          },
          "data_file_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing form-data file. Acroforms accept FDF, XFDF, or XML data; XFA forms accept XDP, XFD, or XML data. Must be a valid resource ID returned by a POST request.",
            "x-order": 51
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-imported-form-data`.",
            "x-order": 999
          }
        },
        "required": [
          "id",
          "data_file_id"
        ],
        "additionalProperties": false
      },
      "ZipJsonRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id[]": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/ResourceId",
              "description": "Alphanumeric resource ID of one file to include. Must be a valid resource ID returned by a POST request."
            },
            "description": "One or more repeated `id[]` resource IDs to include in the ZIP archive. Each must be a valid resource ID returned by a POST request.\n",
            "x-order": 2
          },
          "output": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OutputFilename"
              }
            ],
            "description": "Generated ZIP filename without extension.",
            "default": "pdfrest_zip",
            "x-order": 999
          }
        },
        "required": [
          "id[]"
        ]
      },
      "MultipartFileInputBranch": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "Uploaded input file.",
            "x-order": 1
          }
        },
        "required": [
          "file"
        ]
      },
      "MultipartIdInputBranch": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing file on the server to process. Must be a valid resource ID returned by a POST request.",
            "x-order": 1
          }
        },
        "required": [
          "id"
        ]
      },
      "AddImageFileInputBranch": {
        "type": "object",
        "properties": {
          "image_file": {
            "type": "string",
            "format": "binary",
            "description": "JPEG (`.jpg`, `.jpeg`), TIFF (`.tif`, `.tiff`), PNG (`.png`), or GIF (`.gif`) image file to add to the PDF.",
            "x-order": 50
          }
        },
        "required": [
          "image_file"
        ]
      },
      "AddImageIdInputBranch": {
        "type": "object",
        "properties": {
          "image_id": {
            "type": "string",
            "format": "uuid",
            "description": "Alphanumeric ID (UUID) of an existing JPEG, TIFF, PNG, or GIF image to add. Must be a valid resource ID returned by a POST request.",
            "x-order": 51
          }
        },
        "required": [
          "image_id"
        ]
      },
      "AddImageBatchImageFilesInputBranch": {
        "type": "object",
        "properties": {
          "image_files": {
            "type": "array",
            "minItems": 1,
            "description": "One or more JPEG, TIFF, PNG, or GIF images to use in batch placements. Repeat this multipart field once per image; upload order defines the zero-based indexes used by image_index.",
            "items": {
              "type": "string",
              "format": "binary"
            },
            "x-order": 52
          }
        },
        "required": [
          "image_files"
        ]
      },
      "AddTablesImageFilesInputBranch": {
        "type": "object",
        "properties": {
          "image_files": {
            "type": "array",
            "minItems": 1,
            "description": "Upload one or more JPEG, TIFF, PNG, or GIF images for table image cells. Repeat this multipart field once per image; upload order defines the zero-based indexes used by `image.image_index`.",
            "items": {
              "type": "string",
              "format": "binary"
            },
            "x-order": 15
          }
        },
        "required": [
          "image_files"
        ]
      },
      "AddTablesImageIdsInputBranch": {
        "type": "object",
        "properties": {
          "image_ids": {
            "type": "array",
            "minItems": 1,
            "description": "Existing image resource IDs for table image cells. Repeat this multipart field once per image ID; field order defines the zero-based indexes used by `image.image_index`.",
            "items": {
              "$ref": "#/components/schemas/ResourceId",
              "description": "Resource ID of one existing JPEG, TIFF, PNG, or GIF image. Must be a valid resource ID returned by a POST request."
            },
            "x-order": 15
          }
        },
        "required": [
          "image_ids"
        ]
      },
      "AddAttachmentFileInputBranch": {
        "type": "object",
        "properties": {
          "file_to_attach": {
            "type": "string",
            "format": "binary",
            "description": "File to upload and attach to the PDF. Accepts any file that can be attached to a PDF.",
            "x-order": 50
          }
        },
        "required": [
          "file_to_attach"
        ]
      },
      "AddAttachmentIdInputBranch": {
        "type": "object",
        "properties": {
          "id_to_attach": {
            "type": "string",
            "format": "uuid",
            "description": "Alphanumeric ID (UUID) of an existing file to attach to the PDF. Must be a valid resource ID returned by a POST request.",
            "x-order": 51
          }
        },
        "required": [
          "id_to_attach"
        ]
      },
      "JsonIdInputBranch": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Alphanumeric ID (UUID) of an existing file on the server to process. Must be a valid resource ID returned by a POST request.",
            "x-order": 1
          }
        },
        "required": [
          "id"
        ]
      },
      "OutputOnlyOptions": {
        "type": "object",
        "properties": {
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "x-order": 999
          }
        }
      },
      "PdfInfoRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for pdf info.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfInfoRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for pdf info.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfInfoRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "ExtractedTextRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for extracted text.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ExtractedTextRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for extracted text.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ExtractedTextRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "MarkdownRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for markdown.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/MarkdownRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for markdown.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/MarkdownRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "PdfARequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for pdf a.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfARequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for pdf a.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfARequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "PostscriptRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a PDF file directly for PostScript conversion.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PostscriptRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Convert a previously uploaded PDF to PostScript.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PostscriptRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "PdfXRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for pdf x.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfXRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for pdf x.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfXRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "WordRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for word.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WordRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for word.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/WordRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "ExcelRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for excel.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ExcelRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for excel.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/ExcelRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "PowerpointRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for powerpoint.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PowerpointRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for powerpoint.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PowerpointRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "FlattenedAnnotationsRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for flattened annotations.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/FlattenedAnnotationsRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for flattened annotations.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/FlattenedAnnotationsRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "FlattenedLayersRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for flattened layers.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/FlattenedLayersRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for flattened layers.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/FlattenedLayersRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "LinearizedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for linearized pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/LinearizedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for linearized pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/LinearizedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "PdfWithAcroformsRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for pdf with acroforms.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfWithAcroformsRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for pdf with acroforms.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfWithAcroformsRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "RasterizedPdfRequest": {
        "oneOf": [
          {
            "title": "Upload a file",
            "description": "Upload a file directly for rasterized pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/RasterizedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartFileInputBranch"
              }
            ]
          },
          {
            "title": "Use an existing resource ID",
            "description": "Use an existing pdfRest resource ID for rasterized pdf.",
            "unevaluatedProperties": false,
            "allOf": [
              {
                "$ref": "#/components/schemas/RasterizedPdfRequestOptions"
              },
              {
                "$ref": "#/components/schemas/MultipartIdInputBranch"
              }
            ]
          }
        ]
      },
      "PdfInfoRequestOptions": {
        "type": "object",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "type": "string",
            "description": "Comma-separated list of query keys to run against the input PDF.\n\n<details>\n\n<summary>Accepted `queries` values</summary>\n\n| Query | Description |\n| --- | --- |\n| `all` | Runs every supported query at once. Use this alone to retrieve all available data without listing individual options. |\n| `tagged` | Checks for structure tags in the input document. |\n| `image_only` | Checks whether the document consists only of embedded page images and minimal metadata. |\n| `title` | Retrieves the title listed in the PDF metadata. |\n| `subject` | Retrieves the subject listed in the PDF metadata. |\n| `author` | Retrieves the author listed in the PDF metadata. |\n| `producer` | Retrieves the producer listed in the PDF metadata. |\n| `creator` | Retrieves the creator listed in the PDF metadata. |\n| `creation_date` | Retrieves the creation date listed in the PDF metadata. |\n| `modified_date` | Retrieves the most recent modification date listed in the PDF metadata. |\n| `keywords` | Retrieves the keywords listed in the PDF metadata. |\n| `custom_metadata` | Retrieves custom metadata from the PDF. |\n| `doc_language` | Retrieves the language the file claims to use. |\n| `page_count` | Retrieves the number of pages in the PDF document. |\n| `page_boxes` | Retrieves all page boundary dimensions (`MediaBox`, `CropBox`, `BleedBox`, `TrimBox`, and `ArtBox`). |\n| `contains_annotations` | Checks for annotations such as notes, highlighted text, file attachments, crossed-out text, and text callout boxes. |\n| `contains_signature` | Checks for digital signatures. |\n| `pdf_version` | Retrieves the PDF standard version used to create the document. |\n| `file_size` | Retrieves the input file size in bytes. |\n| `filename` | Retrieves the input file name. |\n| `restrict_permissions_set` | Checks for restrictions that prevent printing, copying, signing, and related actions. |\n| `contains_xfa` | Checks for XFA forms. |\n| `contains_acroforms` | Checks for Acroforms. |\n| `contains_javascript` | Checks for JavaScript. |\n| `contains_transparency` | Checks for transparent objects. |\n| `contains_embedded_file` | Checks for one or more embedded files. |\n| `uses_embedded_fonts` | Checks for fully embedded fonts. |\n| `uses_nonembedded_fonts` | Checks for non-embedded fonts. |\n| `pdfa` | Checks whether the document conforms to a PDF/A standard. |\n| `pdfua_claim` | Checks whether the document claims PDF/UA conformance. |\n| `pdfe_claim` | Checks whether the document claims PDF/E conformance. |\n| `pdfx_claim` | Checks whether the document claims PDF/X conformance. |\n| `pdfvt_claim` | Checks whether the document claims PDF/VT conformance. |\n| `requires_password_to_open` | Checks whether a password is required to open the document. A password-protected document cannot return much other information. |\n\n</details>\n",
            "examples": [
              "tagged,image_only,creation_date,modified_date,doc_language",
              "all"
            ],
            "x-order": 10
          }
        }
      },
      "ExtractedTextRequestOptions": {
        "type": "object",
        "properties": {
          "full_text": {
            "type": "string",
            "description": "Return all document text without metadata. Use `document` for one combined result, `by_page` to split it by page, or `off` to omit full text.",
            "enum": [
              "off",
              "by_page",
              "document"
            ],
            "default": "document"
          },
          "preserve_line_breaks": {
            "$ref": "#/components/schemas/OnOff",
            "description": "When `on`, preserve original line breaks in `full_text` output by inserting a newline character (`\\n`) at each break; `off` does not preserve them."
          },
          "word_style": {
            "$ref": "#/components/schemas/OnOff",
            "description": "When `on`, return a JSON word list with font, size, color, and color-space information. If `word_coordinates` is also `on`, both metadata types appear in the same word list."
          },
          "word_coordinates": {
            "$ref": "#/components/schemas/OnOff",
            "description": "When `on`, return a JSON word list with the page and coordinates of all four corners of each word's bounding box. If `word_style` is also `on`, both metadata types appear in the same word list."
          },
          "pages": {
            "$ref": "#/components/schemas/PageRange"
          },
          "output_type": {
            "type": "string",
            "description": "Use `file` to save the output as a downloadable `.json` file, or `json` to return it directly in the JSON response.",
            "enum": [
              "json",
              "file"
            ],
            "default": "json"
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename when `output_type` is `file`, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_extracted-text`."
          }
        }
      },
      "MarkdownRequestOptions": {
        "type": "object",
        "properties": {
          "pages": {
            "$ref": "#/components/schemas/PageRange"
          },
          "page_break_comments": {
            "$ref": "#/components/schemas/OnOff",
            "description": "Insert page breaks as HTML comments in the format `<!--Page 1-->`. These comments provide useful context for LLMs and other machine processing without appearing in rendered output, but they may conceptually interrupt the document flow in raw Markdown. Accepts `on` or `off`."
          },
          "output_type": {
            "type": "string",
            "description": "Use `file` to save the output as a downloadable `.md` file, or `json` to return it directly in the JSON response.",
            "enum": [
              "json",
              "file"
            ],
            "default": "json"
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension, when `output_type` is `file`. Defaults to `[INPUT_FILE_NAME]_pdfrest_markdown`."
          }
        }
      },
      "PdfARequestOptions": {
        "type": "object",
        "required": [
          "output_type"
        ],
        "properties": {
          "output_type": {
            "type": "string",
            "description": "Desired PDF/A version for the output.",
            "enum": [
              "PDF/A-1b",
              "PDF/A-2b",
              "PDF/A-2u",
              "PDF/A-3b",
              "PDF/A-3u"
            ]
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdfa`."
          },
          "rasterize_if_errors_encountered": {
            "$ref": "#/components/schemas/OnOff",
            "description": "When `on`, pages that encounter conversion errors are rasterized and PDF/A processing continues. When `off`, conversion errors are returned instead."
          }
        }
      },
      "PostscriptRequestOptions": {
        "type": "object",
        "properties": {
          "ps_level": {
            "type": "integer",
            "enum": [
              2,
              3
            ],
            "default": 3,
            "description": "PostScript language level used for the generated file. Choose level 2 for compatibility with older PostScript interpreters or level 3 for newer features."
          },
          "page_range": {
            "type": "string",
            "default": "all",
            "description": "Pages to convert, using 1-based page numbers. Supports `all`, individual pages, comma-separated pages and ranges, and `last`; examples include `1`, `1,3-5`, and `14-last`."
          },
          "binary_output": {
            "type": "boolean",
            "default": true,
            "description": "Controls whether PDFL may emit binary data in the PostScript stream where supported. Set to `false` for systems that require text-safe, 7-bit PostScript."
          },
          "scale": {
            "type": "number",
            "exclusiveMinimum": 0,
            "default": 1,
            "description": "Multiplier applied to the page content size. A value of `1` preserves the original scale; values below `1` reduce it and values above `1` enlarge it. Must be greater than zero."
          },
          "rotate": {
            "type": "boolean",
            "default": false,
            "description": "Whether to enable page rotation in the generated PostScript output."
          },
          "shrink_to_fit": {
            "type": "boolean",
            "default": false,
            "description": "When `true`, scales page content down as needed so it fits within the output page. When `false`, preserves the requested scale even if content extends beyond the page."
          },
          "print_annotations": {
            "type": "boolean",
            "default": true,
            "description": "When `true`, includes printable PDF annotations, such as comments or markup, in the PostScript output. When `false`, exports the document content without annotations."
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated PostScript file, without the `.ps` extension. If omitted, the API uses `[INPUT_FILE_NAME]_pdfrest_postscript`."
          }
        }
      },
      "PdfXRequestOptions": {
        "type": "object",
        "required": [
          "output_type"
        ],
        "properties": {
          "output_type": {
            "type": "string",
            "description": "Desired PDF/X version for the output.",
            "enum": [
              "PDF/X-1a",
              "PDF/X-3",
              "PDF/X-4",
              "PDF/X-6"
            ]
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdfx`."
          }
        }
      },
      "WordRequestOptions": {
        "type": "object",
        "properties": {
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_word`."
          }
        }
      },
      "ExcelRequestOptions": {
        "type": "object",
        "properties": {
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_excel`."
          }
        }
      },
      "PowerpointRequestOptions": {
        "type": "object",
        "properties": {
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_powerpoint`."
          }
        }
      },
      "FlattenedAnnotationsRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_flattened-annotations-pdf`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "FlattenedLayersRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_flattened-layers-pdf`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "LinearizedPdfRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_linearized-pdf`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "PdfWithAcroformsRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-acroforms`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "RasterizedPdfRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "resolution": {
                "type": "integer",
                "minimum": 12,
                "maximum": 2400,
                "description": "Raster resolution from 12 to 2400 dots per inch (DPI).",
                "default": 300,
                "x-order": 50
              },
              "color_model": {
                "type": "string",
                "description": "Color model for each rasterized page.\n\nSupported values:\n\n- `rgb`: RGB color.\n- `cmyk`: CMYK color.\n",
                "enum": [
                  "rgb",
                  "cmyk"
                ],
                "default": "rgb",
                "x-order": 51
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_rasterized-pdf`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "SignedPdfRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "signature_configuration": {
                "$ref": "#/components/schemas/SignatureConfiguration",
                "x-order": 10
              },
              "logo_file": {
                "type": "string",
                "format": "binary",
                "description": "A JPG, PNG, TIFF, or BMP image file to display as the signature logo. Do not provide with `logo_id`.",
                "x-order": 58
              },
              "logo_id": {
                "$ref": "#/components/schemas/ResourceId",
                "description": "Resource ID of a JPG, PNG, TIFF, or BMP image to display as the signature logo. Must be a valid resource ID returned by a POST request. Do not provide with `logo_file`.",
                "x-order": 59
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_signed_pdf`. Example: `example_signed_doc`.",
                "x-order": 999
              }
            },
            "required": [
              "signature_configuration"
            ]
          }
        ]
      },
      "SignedPdfPfxFilePassphraseFileInputBranch": {
        "type": "object",
        "properties": {
          "pfx_credential_file": {
            "type": "string",
            "format": "binary",
            "description": "A PKCS#12 `.pfx` or `.p12` file containing the digital certificate and private key for PFX credentials.",
            "x-order": 50
          },
          "pfx_passphrase_file": {
            "type": "string",
            "format": "binary",
            "description": "A `.txt` file containing the passphrase for the PFX credential.",
            "x-order": 52
          }
        },
        "required": [
          "pfx_credential_file",
          "pfx_passphrase_file"
        ]
      },
      "SignedPdfPfxFilePassphraseIdInputBranch": {
        "type": "object",
        "properties": {
          "pfx_credential_file": {
            "type": "string",
            "format": "binary",
            "description": "A PKCS#12 `.pfx` or `.p12` file containing the digital certificate and private key for PFX credentials.",
            "x-order": 50
          },
          "pfx_passphrase_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a text file containing the PFX credential passphrase. Must be a valid resource ID returned by a POST request.",
            "x-order": 53
          }
        },
        "required": [
          "pfx_credential_file",
          "pfx_passphrase_id"
        ]
      },
      "SignedPdfPfxIdPassphraseFileInputBranch": {
        "type": "object",
        "properties": {
          "pfx_credential_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a `.pfx` or `.p12` file containing the digital certificate and private key. Must be a valid resource ID returned by a POST request.",
            "x-order": 51
          },
          "pfx_passphrase_file": {
            "type": "string",
            "format": "binary",
            "description": "A `.txt` file containing the passphrase for the PFX credential.",
            "x-order": 52
          }
        },
        "required": [
          "pfx_credential_id",
          "pfx_passphrase_file"
        ]
      },
      "SignedPdfPfxIdPassphraseIdInputBranch": {
        "type": "object",
        "properties": {
          "pfx_credential_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a `.pfx` or `.p12` file containing the digital certificate and private key. Must be a valid resource ID returned by a POST request.",
            "x-order": 51
          },
          "pfx_passphrase_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a text file containing the PFX credential passphrase. Must be a valid resource ID returned by a POST request.",
            "x-order": 53
          }
        },
        "required": [
          "pfx_credential_id",
          "pfx_passphrase_id"
        ]
      },
      "SignedPdfCertificateFilePrivateKeyFileInputBranch": {
        "type": "object",
        "properties": {
          "certificate_file": {
            "type": "string",
            "format": "binary",
            "description": "A `.der` or `.pem` certificate file for non-PFX credentials.",
            "x-order": 54
          },
          "private_key_file": {
            "type": "string",
            "format": "binary",
            "description": "A `.der` or `.pem` private-key file for non-PFX credentials.",
            "x-order": 56
          }
        },
        "required": [
          "certificate_file",
          "private_key_file"
        ]
      },
      "SignedPdfCertificateFilePrivateKeyIdInputBranch": {
        "type": "object",
        "properties": {
          "certificate_file": {
            "type": "string",
            "format": "binary",
            "description": "A `.der` or `.pem` certificate file for non-PFX credentials.",
            "x-order": 54
          },
          "private_key_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a `.der` or `.pem` private-key file for non-PFX credentials. Must be a valid resource ID returned by a POST request.",
            "x-order": 57
          }
        },
        "required": [
          "certificate_file",
          "private_key_id"
        ]
      },
      "SignedPdfCertificateIdPrivateKeyFileInputBranch": {
        "type": "object",
        "properties": {
          "certificate_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a `.der` or `.pem` certificate file for non-PFX credentials. Must be a valid resource ID returned by a POST request.",
            "x-order": 55
          },
          "private_key_file": {
            "type": "string",
            "format": "binary",
            "description": "A `.der` or `.pem` private-key file for non-PFX credentials.",
            "x-order": 56
          }
        },
        "required": [
          "certificate_id",
          "private_key_file"
        ]
      },
      "SignedPdfCertificateIdPrivateKeyIdInputBranch": {
        "type": "object",
        "properties": {
          "certificate_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a `.der` or `.pem` certificate file for non-PFX credentials. Must be a valid resource ID returned by a POST request.",
            "x-order": 55
          },
          "private_key_id": {
            "$ref": "#/components/schemas/ResourceId",
            "description": "Resource ID of a `.der` or `.pem` private-key file for non-PFX credentials. Must be a valid resource ID returned by a POST request.",
            "x-order": 57
          }
        },
        "required": [
          "certificate_id",
          "private_key_id"
        ]
      },
      "OcrPdfRequestOptions": {
        "type": "object",
        "properties": {
          "languages": {
            "type": "string",
            "description": "Comma-separated ISO 639-2 three-letter codes or supported language variants (e.g. `chi_sim`).\n\nCloud supports:\n\n- `chi_sim`\n- `chi_tra`\n- `nld`\n- `eng`\n- `fra`\n- `deu`\n- `ita`\n- `jpn`\n- `kor`\n- `por`\n- `spa`\n\nExisting supported language names remain accepted. Requesting many languages may affect performance, particularly Chinese, Japanese, and Korean (CJK).\n",
            "default": "eng",
            "examples": [
              "eng",
              "eng,deu,fra"
            ],
            "x-order": 50
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-ocr-text`.",
            "x-order": 999
          }
        }
      },
      "ExtractedImagesRequestOptions": {
        "type": "object",
        "properties": {
          "pages": {
            "$ref": "#/components/schemas/PageRange",
            "x-order": 50
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Prefix of generated image filenames, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_extracted-images`; `-img###-page###` is always appended to identify the image sequence and first source page.",
            "x-order": 999
          }
        }
      },
      "PdfToImageCommonRequestOptions": {
        "type": "object",
        "properties": {
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "x-order": 999
          },
          "pages": {
            "$ref": "#/components/schemas/PageRange",
            "x-order": 50
          },
          "resolution": {
            "type": "integer",
            "minimum": 12,
            "maximum": 2400,
            "description": "Output image resolution from 12 to 2400 dots per inch (DPI).",
            "default": 300,
            "x-order": 51
          },
          "password": {
            "type": "string",
            "description": "Password for opening encrypted PDFs.",
            "minLength": 1,
            "x-order": 52
          },
          "smoothing": {
            "$ref": "#/components/schemas/PdfToImageSmoothing",
            "x-order": 53
          }
        }
      },
      "BmpRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PdfToImageCommonRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "color_model": {
                "type": "string",
                "description": "Color model of the output file. Accepts `rgb` or `gray`.",
                "enum": [
                  "rgb",
                  "gray"
                ],
                "default": "rgb",
                "x-order": 50
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Prefix for generated filenames, without extension. A sequential number and `.bmp` are appended. Defaults to `[INPUT_FILE_NAME]_pdfrest_bmp`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "JpgRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PdfToImageCommonRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "color_model": {
                "type": "string",
                "description": "Color model of the output file. Accepts `rgb`, `cmyk`, or `gray`.",
                "enum": [
                  "rgb",
                  "cmyk",
                  "gray"
                ],
                "default": "rgb",
                "x-order": 50
              },
              "jpeg_quality": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100,
                "description": "JPEG compression quality from 1 to 100. Higher values produce a higher-quality image but also a larger output file.",
                "default": 75,
                "x-order": 51
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Prefix for generated filenames, without extension. A sequential number and `.jpg` are appended. Defaults to `[INPUT_FILE_NAME]_pdfrest_jpg`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "PngRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PdfToImageCommonRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "color_model": {
                "type": "string",
                "description": "Color model of the output file. Accepts `rgb`, `rgba`, or `gray`.",
                "enum": [
                  "rgb",
                  "rgba",
                  "gray"
                ],
                "default": "rgb",
                "x-order": 50
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Prefix for generated filenames, without extension. A sequential number and `.png` are appended. Defaults to `[INPUT_FILE_NAME]_pdfrest_png`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "GifRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PdfToImageCommonRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "color_model": {
                "type": "string",
                "description": "Color model of the output file. Accepts `rgb` or `gray`.",
                "enum": [
                  "rgb",
                  "gray"
                ],
                "default": "rgb",
                "x-order": 50
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Output filename prefix without extension. A sequential number and `.gif` are appended for each page. Defaults to `[INPUT_FILE_NAME]_pdfrest_gif`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "TifRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PdfToImageCommonRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "color_model": {
                "type": "string",
                "description": "Color model of the output file. Accepts `rgb`, `rgba`, `cmyk`, `lab`, or `gray`.",
                "enum": [
                  "rgb",
                  "rgba",
                  "cmyk",
                  "lab",
                  "gray"
                ],
                "default": "rgb",
                "x-order": 50
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Output filename prefix without extension. A sequential number and `.tif` are appended for each page. Defaults to `[INPUT_FILE_NAME]_pdfrest_tif`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "PdfProtectionBaseRequestOptions": {
        "type": "object",
        "properties": {
          "current_open_password": {
            "$ref": "#/components/schemas/CurrentProtectionPassword",
            "description": "Existing open password for the input PDF, used when the selected protection operation requires or changes existing open-password security.",
            "x-order": 50
          },
          "current_permissions_password": {
            "$ref": "#/components/schemas/CurrentProtectionPassword",
            "description": "Existing permissions password, when the input document has one.",
            "x-order": 51
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "x-order": 999
          }
        }
      },
      "DecryptedPdfRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PdfProtectionBaseRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_decrypted-pdf`.",
                "x-order": 999
              }
            },
            "required": [
              "current_open_password"
            ]
          }
        ]
      },
      "UnrestrictedPdfRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PdfProtectionBaseRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_unrestricted-pdf`.",
                "x-order": 999
              }
            },
            "required": [
              "current_permissions_password"
            ]
          }
        ]
      },
      "RestrictedPdfRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PdfProtectionBaseRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "new_permissions_password": {
                "$ref": "#/components/schemas/ProtectionPassword",
                "description": "New permissions password. Must be a string from 6 through 128 characters long.",
                "x-order": 10
              },
              "restrictions[]": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "print_low",
                    "print_high",
                    "edit_document_assembly",
                    "edit_fill_and_sign_form_fields",
                    "edit_annotations",
                    "edit_content",
                    "copy_content",
                    "accessibility_off"
                  ],
                  "description": "One restriction value, selected from `print_low`, `print_high`, `edit_document_assembly`, `edit_fill_and_sign_form_fields`, `edit_annotations`, `edit_content`, `copy_content`, or `accessibility_off`."
                },
                "description": "Document restrictions to apply. Restricted operations are locked behind the permissions password. Accepts `print_low`, `print_high`, `edit_document_assembly`, `edit_fill_and_sign_form_fields`, `edit_annotations`, `edit_content`, `copy_content`, or `accessibility_off`.",
                "x-order": 50
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_restricted-pdf`.",
                "x-order": 999
              }
            },
            "required": [
              "new_permissions_password"
            ]
          }
        ]
      },
      "EncryptedPdfRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PdfProtectionBaseRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "new_open_password": {
                "$ref": "#/components/schemas/ProtectionPassword",
                "description": "New open password. Must be a string from 6 through 128 characters long.",
                "x-order": 10
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_encrypted-pdf`.",
                "x-order": 999
              }
            },
            "required": [
              "new_open_password"
            ]
          }
        ]
      },
      "FlattenedTransparenciesRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "quality": {
                "type": "string",
                "description": "`low` is intended for black-and-white proofs and web publishing; `medium` for desktop proofs and color-printer output; `high` for final press output and high-quality separation-based proofs. Defaults to `medium`.",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ],
                "default": "medium",
                "x-order": 50
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_flattened-transparencies-pdf`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "SplitPdfRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "pages[]": {
                "type": "array",
                "description": "Array of page-range expressions, one per output document. Supports comma-separated pages and ranges, `last`, reversed ranges, `even`, and `odd`. If omitted, each input page is returned as a separate single-page PDF.\n",
                "examples": [
                  [
                    "1-2,4-last"
                  ],
                  [
                    "1-2",
                    "4-last"
                  ]
                ],
                "items": {
                  "type": "string",
                  "description": "Page expression for one output document; supports comma-separated pages and ranges, `last`, reversed ranges, `even`, and `odd`.",
                  "minLength": 1
                },
                "x-order": 50
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Prefix for generated output filenames, without extension. A sequential number and `.pdf` are appended to each output. Defaults to `[INPUT_FILE_NAME]_pdfrest_split-pdf`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "SummarizedPdfTextRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "target_word_count": {
                "description": "Target summary length in words (minimum 1). Exceeding the model context window may cause a 400 error.",
                "type": "integer",
                "minimum": 1,
                "default": 400,
                "x-order": 50
              },
              "summary_format": {
                "description": "The format in which the summary is structured and presented. See [How to Choose the Right PDF Summary Format Style](https://pdfrest.com/learning/tutorials/how-to-choose-the-right-pdf-summary-format-style/) for examples.\n",
                "type": "string",
                "enum": [
                  "overview",
                  "highlight",
                  "abstract",
                  "bullet_points",
                  "numbered_list",
                  "table_of_contents",
                  "outline",
                  "question_answer",
                  "action_items"
                ],
                "default": "overview",
                "x-enum-descriptions": {
                  "overview": "A concise, high-level paragraph capturing the main ideas and overall theme of the document.",
                  "highlight": "Extracts and emphasizes the most important key points, typically presented in short bullet points.",
                  "abstract": "A brief, formal summary outlining the document's purpose, methods, and key findings.",
                  "bullet_points": "Short, organized statements using bullet points for general clarity and easy reading.",
                  "numbered_list": "Creates ordered items for step-by-step processes, sequential information, or ranked priorities.",
                  "table_of_contents": "A navigational list of document sections with titles and brief summaries of each section.",
                  "outline": "A structured summary that hierarchically organizes the main and supporting points.",
                  "question_answer": "Structures the information as questions and corresponding answers for maximum clarity.",
                  "action_items": "Generates a list of specific tasks or next steps derived from the document's discussion."
                },
                "x-order": 51
              },
              "pages": {
                "$ref": "#/components/schemas/PageRange",
                "x-order": 52
              },
              "output_format": {
                "type": "string",
                "description": "Whether the output text should have markdown syntax or not.",
                "enum": [
                  "plaintext",
                  "markdown"
                ],
                "default": "markdown",
                "x-order": 900
              },
              "output_type": {
                "type": "string",
                "description": "What format the output should be returned in (either in the downloaded file or directly in the JSON response).",
                "enum": [
                  "file",
                  "json"
                ],
                "default": "json",
                "x-order": 901
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension, when `output_type` is `file`. Defaults to `[INPUT_FILE_NAME]_pdfrest_summarized-pdf-text`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "TranslatedPdfTextRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "pages": {
                "$ref": "#/components/schemas/PageRange",
                "description": "Page or range of pages to translate. Ignored for Markdown and plain-text input files.\n\n**Examples:**\n- `1-last` (all pages)\n- `5`\n- `2-9`\n- `1,2,5-10,12-last`\n",
                "x-order": 50
              },
              "output_language": {
                "type": "string",
                "description": "Desired output language of the translation. Can be any valid ISO 639 language code, optionally with script or region subtag. Must be in the format: `{ISO code}-{optional subtag}`.\n\nOptional subtag can be:\n\n - a 4 letter script: `Latn`, `Cyrl`, `Hant`\n - a 2 letter region: `US`, `BR`, `CN`\n - a 3 digit numeric region: `419` (Latin America)\n",
                "example": "en",
                "x-order": 10
              },
              "output_format": {
                "type": "string",
                "description": "Use `plaintext` for text without Markdown syntax or `markdown` for text with Markdown syntax.",
                "enum": [
                  "plaintext",
                  "markdown"
                ],
                "default": "markdown",
                "x-order": 900
              },
              "output_type": {
                "type": "string",
                "description": "Use `file` to return a downloadable file or `json` to include the translated output directly in the JSON response.",
                "enum": [
                  "file",
                  "json"
                ],
                "default": "json",
                "x-order": 901
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension, when `output_type` is `file`. Defaults to `[INPUT_FILE_NAME]_pdfrest_translated-pdf-text`.",
                "x-order": 999
              }
            },
            "required": [
              "output_language"
            ]
          }
        ]
      },
      "TdmReservedPdfRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "policy": {
                "type": "string",
                "minLength": 1,
                "description": "URL pointing to hosted terms of use or a machine-readable TDM policy document. Any non-empty string is accepted, but URL format is recommended for W3C TDMRep compliance.",
                "examples": [
                  "https://example.com/tdm-policy"
                ],
                "x-order": 10
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_tdm_reserved_pdf`.",
                "x-order": 999
              }
            },
            "required": [
              "policy"
            ]
          }
        ]
      },
      "AddAttachmentRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-attachment`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "AddImageRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "description": "Valid page number in the input PDF on which to add the image.",
                "minimum": 1,
                "x-order": 10
              },
              "x": {
                "type": "integer",
                "description": "Horizontal position of the image's lower-left corner in PDF units, where 72 units equal 1 inch. Accepts any integer.",
                "x-order": 11
              },
              "y": {
                "type": "integer",
                "description": "Vertical position of the image's lower-left corner in PDF units, where 72 units equal 1 inch. Accepts any integer.",
                "x-order": 12
              },
              "width": {
                "type": "number",
                "exclusiveMinimum": 0,
                "description": "Placed image width in PDF units. When only width or height is supplied, the image scales proportionally; when both are supplied, the requested dimensions are used. Defaults to the original image width.",
                "x-order": 13
              },
              "height": {
                "type": "number",
                "exclusiveMinimum": 0,
                "description": "Placed image height in PDF units. When only height or width is supplied, the image scales proportionally; when both are supplied, the requested dimensions are used. Defaults to the original image height.",
                "x-order": 14
              },
              "tag_enabled": {
                "type": "boolean",
                "default": false,
                "description": "Enables tagging for the image added by this request. Set to `true` whenever `tag_language`, `tag_alt_text`, `tag_is_artifact`, or `tag_structure_type` is supplied. This does not automatically tag existing untagged content in the input PDF.",
                "x-order": 20
              },
              "tag_language": {
                "$ref": "#/components/schemas/Bcp47LanguageTag",
                "description": "BCP 47 language tag identifying the natural language of the image's tag metadata, such as alternate text. Requires `tag_enabled=true`.",
                "x-order": 21
              },
              "tag_alt_text": {
                "type": "string",
                "minLength": 1,
                "description": "Non-empty alternate text describing the added image for assistive technology. Requires `tag_enabled=true`.",
                "example": "Company logo",
                "x-order": 22
              },
              "tag_is_artifact": {
                "type": "boolean",
                "default": false,
                "description": "Set to `true` when the image is decorative or should not be treated as meaningful document content. Requires `tag_enabled=true`.",
                "x-order": 23
              },
              "tag_structure_type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PdfContentStructureType"
                  }
                ],
                "description": "Semantic PDF structure type for the added image. `Figure` is normally appropriate. Requires `tag_enabled=true`.",
                "default": "Figure",
                "x-order": 24
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-image`.",
                "x-order": 999
              }
            },
            "required": [
              "page",
              "x",
              "y"
            ]
          }
        ]
      },
      "AddImageBatchRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "image_objects": {
                "type": "string",
                "contentMediaType": "application/json",
                "contentSchema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AddImageObject"
                    },
                    {
                      "type": "array",
                      "minItems": 1,
                      "items": {
                        "$ref": "#/components/schemas/AddImageObject"
                      }
                    }
                  ]
                },
                "description": "JSON-formatted image object or array of image objects. Each object supplies either image_index for an ordered image_files upload or image_id for an existing image resource, plus its page selector and coordinates.",
                "example": "[{\"image_index\":0,\"page\":\"1,3-last\",\"x\":72,\"y\":144,\"width\":144}]",
                "x-order": 10
              },
              "tag_enabled": {
                "type": "boolean",
                "default": false,
                "description": "Enables tagging for images added by this request. Set to true when tag_language or per-image tag metadata is supplied. This does not automatically tag existing untagged content in the input PDF.",
                "x-order": 20
              },
              "tag_language": {
                "$ref": "#/components/schemas/Bcp47LanguageTag",
                "description": "BCP 47 language tag for the request's image tag metadata. Requires tag_enabled=true.",
                "x-order": 21
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-image`.",
                "x-order": 999
              }
            },
            "required": [
              "image_objects"
            ]
          }
        ]
      },
      "AddTextRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "text_objects": {
                "type": "string",
                "description": "JSON-formatted array of text objects. Each object accepts the following fields:\n\n- **`font`** - **Required** | Specify the font of the given string. See the [Font List](https://pdfrest.com/documentation/fontlist/) for a complete list.\n- **`max_width`** - **Required** | The maximum width of the text column in PDF units, where 72 PDF units equal 1 inch. The text wraps to conform to this width.\n- **`opacity`** - **Required** | Text opacity from `0.0` through `1.0`.\n- **`page`** - **Required** | Page number on which to add text. Provide a page number or use `all` to add the text to every page at the same `x` and `y` position.\n- **`rotation`** - **Required** | Rotation of the text block in degrees.\n- **`text`** - **Required** | String of text to add.\n- **`text_color_cmyk` or `text_color_rgb`** - **Required** | Comma-delimited string of color values, such as `53,5,102` for RGB or `0,100,100,0` for CMYK. Use one of these fields to set the text color.\n- **`text_size`** - **Required** | Font size of the text from `5` through `100`.\n- **`x`** - **Required** | Horizontal starting position of the text in PDF units, where 72 PDF units equal 1 inch.\n- **`y`** - **Required** | Vertical starting position of the text in PDF units, where 72 PDF units equal 1 inch.\n- **`is_rtl`** - Optional | Set to `true` to insert right-to-left (RTL) language text.\n- **`tag_actual_text`** - Optional | Non-empty replacement text used by assistive technology and text extraction; it does not change the visible text. Requires `tag_enabled=true`.\n- **`tag_is_artifact`** - Optional | Set to `true` when the added text is decorative or should not be treated as meaningful document content; set to `false` to leave it as content. Defaults to `false`. Requires `tag_enabled=true`.\n- **`tag_structure_type`** - Optional | Semantic PDF structure type for the added text. Supported values are `P`, `H`, `H1`-`H6`, `Lbl`, `Span`, `Quote`, `Note`, `Reference`, `BibEntry`, `Code`, `Link`, `Annot`, `Ruby`, `RB`, `RT`, `RP`, `Warichu`, `WT`, `WP`, `Figure`, `Formula`, and `Form`. Requires `tag_enabled=true`.\n",
                "contentMediaType": "application/json",
                "contentSchema": {
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "font": {
                        "type": "string"
                      },
                      "max_width": {
                        "type": "string"
                      },
                      "opacity": {
                        "type": "string",
                        "pattern": "^(?:0(?:\\.\\d+)?|1(?:\\.0+)?)$"
                      },
                      "page": {
                        "type": "string"
                      },
                      "rotation": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      },
                      "text_color_rgb": {
                        "type": "string"
                      },
                      "text_color_cmyk": {
                        "type": "string"
                      },
                      "text_size": {
                        "type": "string",
                        "pattern": "^(?:[5-9]|[1-9]\\d|100)$"
                      },
                      "x": {
                        "type": "string"
                      },
                      "y": {
                        "type": "string"
                      },
                      "is_rtl": {
                        "type": "string"
                      },
                      "tag_actual_text": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Replacement text used by assistive technology and text extraction without changing visible text. Requires `tag_enabled=true`."
                      },
                      "tag_is_artifact": {
                        "type": "boolean",
                        "default": false,
                        "description": "Whether the added text is decorative or should not be treated as meaningful document content. Requires `tag_enabled=true`."
                      },
                      "tag_structure_type": {
                        "$ref": "#/components/schemas/PdfContentStructureType",
                        "description": "Semantic PDF structure type for the added text. Requires `tag_enabled=true`."
                      }
                    },
                    "required": [
                      "font",
                      "max_width",
                      "opacity",
                      "page",
                      "rotation",
                      "text",
                      "text_size",
                      "x",
                      "y"
                    ],
                    "oneOf": [
                      {
                        "required": [
                          "text_color_rgb"
                        ]
                      },
                      {
                        "required": [
                          "text_color_cmyk"
                        ]
                      }
                    ]
                  }
                },
                "examples": [
                  "[{\"font\":\"Arial\",\"max_width\":\"160\",\"opacity\":\"1\",\"page\":\"1\",\"rotation\":\"0\",\"text\":\"Hello, PDF world!\",\"text_color_rgb\":\"0,0,0\",\"text_size\":\"12\",\"x\":\"144\",\"y\":\"144\",\"tag_actual_text\":\"Hello, PDF world!\",\"tag_structure_type\":\"H1\"},{\"font\":\"Times New Roman\",\"max_width\":\"175\",\"opacity\":\"1\",\"page\":\"2\",\"rotation\":\"0\",\"text\":\"مرحبا بالعالم\",\"text_color_rgb\":\"0,0,0\",\"text_size\":\"72\",\"x\":\"144\",\"y\":\"720\",\"is_rtl\":\"true\",\"tag_structure_type\":\"P\"},{\"font\":\"Arial\",\"max_width\":\"160\",\"opacity\":\"0.35\",\"page\":\"1\",\"rotation\":\"0\",\"text\":\"SAMPLE DRAFT\",\"text_color_rgb\":\"128,128,128\",\"text_size\":\"14\",\"x\":\"360\",\"y\":\"36\",\"tag_is_artifact\":true}]"
                ],
                "x-order": 10
              },
              "tag_enabled": {
                "type": "boolean",
                "default": false,
                "description": "Enables tagging for text added by this request. Set to `true` whenever `tag_language` or a text object's tag properties are supplied. This does not automatically tag existing untagged content in the input PDF.",
                "x-order": 20
              },
              "tag_language": {
                "$ref": "#/components/schemas/Bcp47LanguageTag",
                "description": "BCP 47 language tag identifying the natural language of newly added tagged text for assistive technology. Requires `tag_enabled=true`.",
                "x-order": 21
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-text`.",
                "x-order": 999
              }
            },
            "required": [
              "text_objects"
            ]
          }
        ]
      },
      "PdfRgbColorString": {
        "type": "string",
        "description": "Three comma-separated RGB channels from 0 to 255.",
        "pattern": "^\\s*(?:25[0-5]|2[0-4]\\d|1?\\d?\\d)\\s*,\\s*(?:25[0-5]|2[0-4]\\d|1?\\d?\\d)\\s*,\\s*(?:25[0-5]|2[0-4]\\d|1?\\d?\\d)\\s*$"
      },
      "PdfCmykColorString": {
        "type": "string",
        "description": "Four comma-separated CMYK channels from 0 to 100.",
        "pattern": "^\\s*(?:100|\\d?\\d)\\s*,\\s*(?:100|\\d?\\d)\\s*,\\s*(?:100|\\d?\\d)\\s*,\\s*(?:100|\\d?\\d)\\s*$"
      },
      "PdfRgbColor": {
        "oneOf": [
          {
            "title": "Comma-separated RGB string",
            "$ref": "#/components/schemas/PdfRgbColorString"
          },
          {
            "title": "RGB channel array",
            "type": "array",
            "description": "Three RGB channels from 0 to 255.",
            "minItems": 3,
            "maxItems": 3,
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 255
            }
          }
        ]
      },
      "PdfCmykColor": {
        "oneOf": [
          {
            "title": "Comma-separated CMYK string",
            "$ref": "#/components/schemas/PdfCmykColorString"
          },
          {
            "title": "CMYK channel array",
            "type": "array",
            "description": "Four CMYK channels from 0 to 100.",
            "minItems": 4,
            "maxItems": 4,
            "items": {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            }
          }
        ]
      },
      "ShapePage": {
        "oneOf": [
          {
            "title": "One page",
            "type": "integer",
            "minimum": 1
          },
          {
            "title": "All pages",
            "const": "all"
          }
        ],
        "description": "Positive page number, or `all` to place the same shape on every page."
      },
      "AddedLineObject": {
        "title": "Line shape object",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "const": "line"
          },
          "page": {
            "$ref": "#/components/schemas/ShapePage"
          },
          "x1": {
            "type": "number",
            "minimum": 0,
            "description": "Horizontal coordinate of the line start in PDF units."
          },
          "y1": {
            "type": "number",
            "minimum": 0,
            "description": "Vertical coordinate of the line start in PDF units."
          },
          "x2": {
            "type": "number",
            "minimum": 0,
            "description": "Horizontal coordinate of the line end in PDF units."
          },
          "y2": {
            "type": "number",
            "minimum": 0,
            "description": "Vertical coordinate of the line end in PDF units."
          },
          "stroke_color_rgb": {
            "$ref": "#/components/schemas/PdfRgbColorString",
            "description": "RGB stroke color. Do not supply with `stroke_color_cmyk`."
          },
          "stroke_color_cmyk": {
            "$ref": "#/components/schemas/PdfCmykColorString",
            "description": "CMYK stroke color. Do not supply with `stroke_color_rgb`."
          },
          "stroke_width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Line width in PDF units."
          },
          "opacity": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "tag_actual_text": {
            "type": "string",
            "minLength": 1,
            "description": "Replacement text for accessibility or text extraction. Requires `tag_enabled=true`."
          },
          "tag_is_artifact": {
            "type": "boolean",
            "default": false,
            "description": "Whether the line is an artifact rather than meaningful document content. Requires `tag_enabled=true`."
          },
          "tag_structure_type": {
            "$ref": "#/components/schemas/PdfContentStructureType",
            "description": "Semantic PDF structure type for the line. Requires `tag_enabled=true`."
          }
        },
        "required": [
          "type",
          "page",
          "x1",
          "y1",
          "x2",
          "y2"
        ],
        "allOf": [
          {
            "not": {
              "required": [
                "stroke_color_rgb",
                "stroke_color_cmyk"
              ]
            }
          }
        ]
      },
      "AddedRectangleObject": {
        "title": "Rectangle shape object",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "const": "rectangle"
          },
          "page": {
            "$ref": "#/components/schemas/ShapePage"
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "description": "Horizontal coordinate of the rectangle's lower-left corner in PDF units."
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "description": "Vertical coordinate of the rectangle's lower-left corner in PDF units."
          },
          "width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Rectangle width in PDF units."
          },
          "height": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Rectangle height in PDF units."
          },
          "fill_color_rgb": {
            "$ref": "#/components/schemas/PdfRgbColorString",
            "description": "RGB fill color. Do not supply with `fill_color_cmyk`."
          },
          "fill_color_cmyk": {
            "$ref": "#/components/schemas/PdfCmykColorString",
            "description": "CMYK fill color. Do not supply with `fill_color_rgb`."
          },
          "stroke_color_rgb": {
            "$ref": "#/components/schemas/PdfRgbColorString",
            "description": "RGB border color. Do not supply with `stroke_color_cmyk`."
          },
          "stroke_color_cmyk": {
            "$ref": "#/components/schemas/PdfCmykColorString",
            "description": "CMYK border color. Do not supply with `stroke_color_rgb`."
          },
          "stroke_width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Border width in PDF units."
          },
          "opacity": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "tag_actual_text": {
            "type": "string",
            "minLength": 1,
            "description": "Replacement text for accessibility or text extraction. Requires `tag_enabled=true`."
          },
          "tag_is_artifact": {
            "type": "boolean",
            "default": false,
            "description": "Whether the rectangle is an artifact rather than meaningful document content. Requires `tag_enabled=true`."
          },
          "tag_structure_type": {
            "$ref": "#/components/schemas/PdfContentStructureType",
            "description": "Semantic PDF structure type for the rectangle. Requires `tag_enabled=true`."
          }
        },
        "required": [
          "type",
          "page",
          "x",
          "y",
          "width",
          "height"
        ],
        "allOf": [
          {
            "not": {
              "required": [
                "fill_color_rgb",
                "fill_color_cmyk"
              ]
            }
          },
          {
            "not": {
              "required": [
                "stroke_color_rgb",
                "stroke_color_cmyk"
              ]
            }
          }
        ]
      },
      "AddedShapeObject": {
        "oneOf": [
          {
            "title": "Line shape",
            "$ref": "#/components/schemas/AddedLineObject"
          },
          {
            "title": "Rectangle shape",
            "$ref": "#/components/schemas/AddedRectangleObject"
          }
        ]
      },
      "AddShapesRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "shape_objects": {
                "type": "string",
                "description": "JSON-formatted line or rectangle object, or array of those objects.\n\n- **Line object**\n\n    - **`type`** - **Required** | Set to `line`.\n    - **`page`** - **Required** | A positive page number or `all` to place the same line on every page.\n    - **`x1`** - **Required** | Non-negative horizontal coordinate of the line start, in PDF units.\n    - **`y1`** - **Required** | Non-negative vertical coordinate of the line start, in PDF units.\n    - **`x2`** - **Required** | Non-negative horizontal coordinate of the line end, in PDF units.\n    - **`y2`** - **Required** | Non-negative vertical coordinate of the line end, in PDF units.\n    - **`stroke_color_rgb`** - Optional | Three comma-separated RGB channels from 0 to 255, such as `26,72,112`. Do not provide with `stroke_color_cmyk`.\n    - **`stroke_color_cmyk`** - Optional | Four comma-separated CMYK channels from 0 to 100. Do not provide with `stroke_color_rgb`.\n    - **`stroke_width`** - Optional | Positive line width in PDF units.\n    - **`opacity`** - Optional | Opacity from `0` (transparent) to `1` (opaque).\n\n- **Rectangle object**\n\n    - **`type`** - **Required** | Set to `rectangle`.\n    - **`page`** - **Required** | A positive page number or `all` to place the same rectangle on every page.\n    - **`x`** - **Required** | Non-negative horizontal coordinate of the rectangle's lower-left corner, in PDF units.\n    - **`y`** - **Required** | Non-negative vertical coordinate of the rectangle's lower-left corner, in PDF units.\n    - **`width`** - **Required** | Positive rectangle width in PDF units.\n    - **`height`** - **Required** | Positive rectangle height in PDF units.\n    - **`fill_color_rgb`** - Optional | Three comma-separated RGB channels from 0 to 255. Do not provide with `fill_color_cmyk`.\n    - **`fill_color_cmyk`** - Optional | Four comma-separated CMYK channels from 0 to 100. Do not provide with `fill_color_rgb`.\n    - **`stroke_color_rgb`** - Optional | Three comma-separated RGB channels from 0 to 255. Do not provide with `stroke_color_cmyk`.\n    - **`stroke_color_cmyk`** - Optional | Four comma-separated CMYK channels from 0 to 100. Do not provide with `stroke_color_rgb`.\n    - **`stroke_width`** - Optional | Positive border width in PDF units.\n    - **`opacity`** - Optional | Opacity from `0` (transparent) to `1` (opaque).\n\n- **Tagging properties** - Available for either object type. Each requires `tag_enabled=true`.\n\n    - **`tag_actual_text`** - Optional | Non-empty replacement text for accessibility or text extraction.\n    - **`tag_is_artifact`** - Optional | Set to `true` to mark the shape as an artifact, or `false` to leave it as content. Defaults to `false`.\n    - **`tag_structure_type`** - Optional | PDF structure type. Supported values: `P`, `H`, `H1`-`H6`, `Lbl`, `Span`, `Quote`, `Note`, `Reference`, `BibEntry`, `Code`, `Link`, `Annot`, `Ruby`, `RB`, `RT`, `RP`, `Warichu`, `WT`, `WP`, `Figure`, `Formula`, or `Form`.\n",
                "contentMediaType": "application/json",
                "example": "[\n  {\n    \"type\": \"rectangle\",\n    \"page\": 1,\n    \"x\": 54,\n    \"y\": 540,\n    \"width\": 504,\n    \"height\": 108,\n    \"fill_color_rgb\": \"245,247,250\",\n    \"stroke_color_rgb\": \"26,72,112\",\n    \"stroke_width\": 1,\n    \"tag_is_artifact\": true\n  },\n  {\n    \"type\": \"line\",\n    \"page\": 1,\n    \"x1\": 72,\n    \"y1\": 576,\n    \"x2\": 540,\n    \"y2\": 576,\n    \"stroke_color_rgb\": \"26,72,112\",\n    \"stroke_width\": 1.5,\n    \"tag_actual_text\": \"Review section divider\",\n    \"tag_structure_type\": \"Figure\"\n  }\n]\n",
                "x-order": 10
              },
              "tag_enabled": {
                "type": "boolean",
                "default": false,
                "description": "Enables tagging for shapes added by this request. Set to `true` whenever a shape includes `tag_actual_text`, `tag_is_artifact`, or `tag_structure_type`. This does not automatically tag existing untagged content in the input PDF.",
                "x-order": 20
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-shapes`.",
                "x-order": 999
              }
            },
            "required": [
              "shape_objects"
            ]
          }
        ]
      },
      "TablePadding": {
        "type": "object",
        "additionalProperties": false,
        "description": "Cell padding in PDF units. Each omitted side uses the applicable default.",
        "properties": {
          "top": {
            "type": "number",
            "minimum": 0
          },
          "right": {
            "type": "number",
            "minimum": 0
          },
          "bottom": {
            "type": "number",
            "minimum": 0
          },
          "left": {
            "type": "number",
            "minimum": 0
          }
        }
      },
      "TableBorderSide": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "width": {
            "type": "number",
            "minimum": 0,
            "description": "Border width in PDF units."
          },
          "color_rgb": {
            "$ref": "#/components/schemas/PdfRgbColor",
            "description": "RGB border color. Do not supply with `color_cmyk`."
          },
          "color_cmyk": {
            "$ref": "#/components/schemas/PdfCmykColor",
            "description": "CMYK border color. Do not supply with `color_rgb`."
          },
          "opacity": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "not": {
          "required": [
            "color_rgb",
            "color_cmyk"
          ]
        }
      },
      "TableBorder": {
        "type": "object",
        "additionalProperties": false,
        "description": "Independently configurable table-cell border sides.",
        "properties": {
          "top": {
            "$ref": "#/components/schemas/TableBorderSide"
          },
          "right": {
            "$ref": "#/components/schemas/TableBorderSide"
          },
          "bottom": {
            "$ref": "#/components/schemas/TableBorderSide"
          },
          "left": {
            "$ref": "#/components/schemas/TableBorderSide"
          }
        }
      },
      "TableStyle": {
        "type": "object",
        "additionalProperties": false,
        "description": "Styling shared by table cells. More specific column, row, and cell styles override less specific styles.",
        "properties": {
          "font": {
            "type": "string",
            "description": "Font name. See the [supported font list](https://pdfrest.com/documentation/fontlist/)."
          },
          "text_size": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Text size in PDF units."
          },
          "text_align": {
            "type": "string",
            "enum": [
              "left",
              "center",
              "right"
            ]
          },
          "vertical_align": {
            "type": "string",
            "enum": [
              "top",
              "middle",
              "bottom"
            ]
          },
          "text_color_rgb": {
            "$ref": "#/components/schemas/PdfRgbColor",
            "description": "RGB text color. Do not supply with `text_color_cmyk`."
          },
          "text_color_cmyk": {
            "$ref": "#/components/schemas/PdfCmykColor",
            "description": "CMYK text color. Do not supply with `text_color_rgb`."
          },
          "background_color_rgb": {
            "$ref": "#/components/schemas/PdfRgbColor",
            "description": "RGB background color. Do not supply with `background_color_cmyk`."
          },
          "background_color_cmyk": {
            "$ref": "#/components/schemas/PdfCmykColor",
            "description": "CMYK background color. Do not supply with `background_color_rgb`."
          },
          "opacity": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "padding": {
            "$ref": "#/components/schemas/TablePadding"
          },
          "border": {
            "$ref": "#/components/schemas/TableBorder"
          }
        },
        "allOf": [
          {
            "not": {
              "required": [
                "text_color_rgb",
                "text_color_cmyk"
              ]
            }
          },
          {
            "not": {
              "required": [
                "background_color_rgb",
                "background_color_cmyk"
              ]
            }
          }
        ]
      },
      "TableCellImage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "image_index": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based position of the image in the request's ordered image inputs. It indexes the repeated `image_files` fields or the `image_ids` array supplied by the request."
          },
          "width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Placed image width in PDF units."
          },
          "height": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Placed image height in PDF units."
          },
          "tag_alt_text": {
            "type": "string",
            "minLength": 1,
            "description": "Alternate text for the image. Requires `tag_enabled=true`."
          },
          "tag_is_artifact": {
            "type": "boolean",
            "default": false,
            "description": "Whether the image is an artifact rather than meaningful content. Requires `tag_enabled=true`."
          },
          "tag_structure_type": {
            "const": "Figure",
            "description": "Image structure tagging. Requires `tag_enabled=true`."
          }
        },
        "required": [
          "image_index"
        ]
      },
      "TableCell": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "text": {
            "type": "string",
            "description": "Text content. Do not supply with `image`."
          },
          "image": {
            "$ref": "#/components/schemas/TableCellImage",
            "description": "Image content referencing an image from the request. Use `image_index` to select a repeated `image_files` upload or an `image_ids` entry. Do not supply with `text`."
          },
          "col_span": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of columns occupied by this cell."
          },
          "row_span": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of rows occupied by this cell. A span cannot overlap another cell or cross its header, body, or footer section."
          },
          "min_height": {
            "type": "number",
            "minimum": 0,
            "description": "Minimum cell height in PDF units."
          },
          "fixed_height": {
            "type": "number",
            "minimum": 0,
            "description": "Fixed cell height in PDF units. When `min_height` is supplied, this must be at least the minimum and large enough for the content."
          },
          "no_wrap": {
            "type": "boolean",
            "description": "Set to `true` to keep cell text on one line."
          },
          "is_rtl": {
            "type": "boolean",
            "description": "Set to `true` for right-to-left cell content."
          },
          "style": {
            "$ref": "#/components/schemas/TableStyle",
            "description": "Cell-level style overriding table, column, and row styles."
          },
          "tag_actual_text": {
            "type": "string",
            "minLength": 1,
            "description": "Replacement text for accessibility or extraction. Requires `tag_enabled=true`."
          },
          "tag_structure_type": {
            "type": "string",
            "enum": [
              "TH",
              "TD"
            ],
            "description": "Use `TH` for a header cell or `TD` for a body or footer cell. Requires `tag_enabled=true`."
          }
        },
        "not": {
          "required": [
            "text",
            "image"
          ]
        }
      },
      "TableRow": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "cells": {
            "type": "array",
            "minItems": 1,
            "description": "Cells in this row. After spans are applied, the row must resolve exactly to the table's declared column count.",
            "items": {
              "$ref": "#/components/schemas/TableCell"
            }
          },
          "min_height": {
            "type": "number",
            "minimum": 0,
            "description": "Minimum row height in PDF units."
          },
          "style": {
            "$ref": "#/components/schemas/TableStyle",
            "description": "Row-level style applied to each cell unless overridden by a cell style."
          }
        },
        "required": [
          "cells"
        ]
      },
      "TableColumn": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Column width in PDF units in `fixed` mode, or a proportional weight in `relative` mode."
          },
          "style": {
            "$ref": "#/components/schemas/TableStyle",
            "description": "Column-level style applied to each cell unless overridden by a row or cell style."
          }
        },
        "required": [
          "width"
        ]
      },
      "AddedTableObject": {
        "title": "Table object",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page on which the table begins."
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "description": "Horizontal position of the table's left edge in PDF units. Required unless `horizontal_align` is supplied."
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "description": "Vertical position of the table's top edge in PDF units."
          },
          "width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Table width in PDF units. Do not supply with `width_percentage`."
          },
          "width_percentage": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 100,
            "description": "Percentage of available page width. Requires `width_mode=relative`. Do not supply with `width`."
          },
          "width_mode": {
            "type": "string",
            "enum": [
              "fixed",
              "relative"
            ],
            "default": "fixed",
            "description": "In `fixed` mode, column widths are PDF units and their sum must equal `width`; in `relative` mode, column widths are proportional weights distributed across the table width."
          },
          "horizontal_align": {
            "type": "string",
            "enum": [
              "left",
              "center",
              "right"
            ],
            "description": "Positions the table without `x`."
          },
          "is_rtl": {
            "type": "boolean",
            "description": "Set to `true` for right-to-left table content flow."
          },
          "keep_table_block_together": {
            "type": "boolean",
            "description": "When the complete table fits on one empty page but not in the remaining space, move it to the next page instead of paginating it normally."
          },
          "spacing_before": {
            "type": "number",
            "minimum": 0,
            "description": "Spacing before the table in PDF units."
          },
          "spacing_after": {
            "type": "number",
            "minimum": 0,
            "description": "Spacing after the table in PDF units."
          },
          "continuation_page_top_margin": {
            "type": "number",
            "minimum": 0,
            "default": 0,
            "description": "On continuation pages, reserves space below the MediaBox top before `spacing_before` is applied."
          },
          "page_bottom_margin": {
            "type": "number",
            "minimum": 0,
            "default": 0,
            "description": "Reserves space above the MediaBox bottom on each table page. On the final page, this value is replaced by `final_page_bottom_margin` when supplied."
          },
          "final_page_bottom_margin": {
            "type": "number",
            "minimum": 0,
            "default": 0,
            "description": "Reserves space above the MediaBox bottom on the final table page instead of `page_bottom_margin` when supplied. Must be greater than or equal to `page_bottom_margin`."
          },
          "overflow_behavior": {
            "type": "string",
            "enum": [
              "move-row",
              "split-row",
              "fail"
            ],
            "description": "Controls whether a row that does not fit moves, splits, or causes the request to fail. Continuations use following existing pages and create pages only after the end of the input PDF."
          },
          "row_split_behavior": {
            "type": "string",
            "enum": [
              "split-when-needed",
              "prefer-next-page"
            ],
            "description": "Split a row only when necessary, or prefer moving it to the next page when possible."
          },
          "repeat_header_on_overflow": {
            "type": "boolean",
            "description": "Repeat `header_rows` visually on continuation pages without duplicating their logical tagged reading order."
          },
          "repeat_footer_on_overflow": {
            "type": "boolean",
            "description": "Repeat `footer_rows` visually on continuation pages without duplicating their logical tagged reading order."
          },
          "show_header_on_first_page": {
            "type": "boolean",
            "description": "Display `header_rows` on the first table page."
          },
          "show_footer_on_last_page": {
            "type": "boolean",
            "description": "Display `footer_rows` on the final table page."
          },
          "columns": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/TableColumn"
            }
          },
          "header_rows": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/TableRow"
            }
          },
          "rows": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/TableRow"
            }
          },
          "footer_rows": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/TableRow"
            }
          },
          "style": {
            "$ref": "#/components/schemas/TableStyle",
            "description": "Table-level style overridden by column, row, and cell styles."
          },
          "tag_is_artifact": {
            "type": "boolean",
            "default": false,
            "description": "Whether the table is an artifact rather than meaningful content. Requires `tag_enabled=true`."
          },
          "tag_structure_type": {
            "const": "Table",
            "description": "Adds table structure tagging. Requires `tag_enabled=true`."
          }
        },
        "required": [
          "page",
          "y",
          "columns",
          "rows"
        ],
        "allOf": [
          {
            "oneOf": [
              {
                "title": "Use a fixed width",
                "required": [
                  "width"
                ],
                "not": {
                  "required": [
                    "width_percentage"
                  ]
                }
              },
              {
                "title": "Use a percentage width",
                "required": [
                  "width_percentage"
                ],
                "not": {
                  "required": [
                    "width"
                  ]
                }
              }
            ]
          },
          {
            "anyOf": [
              {
                "title": "Position with an x-coordinate",
                "required": [
                  "x"
                ]
              },
              {
                "title": "Position with horizontal alignment",
                "required": [
                  "horizontal_align"
                ]
              }
            ]
          },
          {
            "if": {
              "required": [
                "width_percentage"
              ]
            },
            "then": {
              "properties": {
                "width_mode": {
                  "const": "relative"
                }
              },
              "required": [
                "width_mode"
              ]
            }
          }
        ]
      },
      "AddTablesRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "table_objects": {
                "type": "string",
                "description": "JSON-formatted table object or array of table objects.\n\n- **Table object**\n\n    - **`page`** - **Required** | Positive page number on which the table begins.\n    - **`x`** - **Required unless `horizontal_align` is supplied** | Non-negative horizontal position of the table's left edge, in PDF units.\n    - **`y`** - **Required** | Non-negative vertical position of the table's top edge, in PDF units.\n    - **`width`** - **Required when `width_percentage` is omitted** | Positive table width in PDF units. Do not provide with `width_percentage`.\n    - **`width_percentage`** - **Required when `width` is omitted** | Positive table width from 0 to 100 percent of the available page width. Requires `width_mode` set to `relative`. Do not provide with `width`.\n    - **`width_mode`** - Optional | `fixed` (default) treats column widths as PDF units; their total must equal `width`. `relative` treats column widths as proportional weights distributed across the table width.\n    - **`horizontal_align`** - Optional | `left`, `center`, or `right`. Allows the table to be positioned without `x`.\n    - **`is_rtl`** - Optional | Set to `true` to use right-to-left table content flow, or `false` for left-to-right flow.\n    - **`keep_table_block_together`** - Optional | Set to `true` to move the complete table to the next page when it fits on one empty page but not in the remaining space on its starting page; set to `false` to allow ordinary pagination.\n    - **`spacing_before`** - Optional | Non-negative spacing before the table, in PDF units.\n    - **`spacing_after`** - Optional | Non-negative spacing after the table, in PDF units.\n    - **`continuation_page_top_margin`** - Optional | On continuation pages, reserves space below the MediaBox top before `spacing_before` is applied.\n    - **`page_bottom_margin`** - Optional | Reserves space above the MediaBox bottom on each table page. On the final page, this value is replaced by `final_page_bottom_margin` when supplied.\n    - **`final_page_bottom_margin`** - Optional | Reserves space above the MediaBox bottom on the final table page instead of `page_bottom_margin` when supplied. Must be greater than or equal to `page_bottom_margin`.\n    - **`overflow_behavior`** - Optional | `move-row` moves a row that does not fit to the next document page; `split-row` permits the row to split; `fail` rejects a table that cannot fit. Continuations use following existing pages when present and create pages only after the end of the input PDF.\n    - **`row_split_behavior`** - Optional | `split-when-needed` splits a row only when necessary; `prefer-next-page` moves it to the next page when possible.\n    - **`repeat_header_on_overflow`** - Optional | Set to `true` to repeat `header_rows` visually on continuation pages. Repeated headers do not duplicate the table's logical tagged reading order.\n    - **`repeat_footer_on_overflow`** - Optional | Set to `true` to repeat `footer_rows` visually on continuation pages. Repeated footers do not duplicate the table's logical tagged reading order.\n    - **`show_header_on_first_page`** - Optional | Set to `true` to display `header_rows` on the first table page.\n    - **`show_footer_on_last_page`** - Optional | Set to `true` to display `footer_rows` on the final table page.\n    - **`columns`** - **Required** | Array of column objects. Each column requires `width`.\n    - **`header_rows`** - Optional | Array of row objects displayed as table headers.\n    - **`rows`** - **Required** | Array of body row objects.\n    - **`footer_rows`** - Optional | Array of row objects displayed as table footers.\n    - **`style`** - Optional | Table-level style object. Column, row, and cell styles override it.\n    - **`tag_is_artifact`** - Optional | Set to `true` to mark the table as an artifact. Defaults to `false`. Requires `tag_enabled=true`.\n    - **`tag_structure_type`** - Optional | Set to `Table` to add table structure tagging. Requires `tag_enabled=true`.\n\n- **Column object**\n\n    - **`width`** - **Required** | Positive column width in PDF units for `fixed` mode, or a positive proportional weight for `relative` mode.\n    - **`style`** - Optional | Style object applied to every cell in the column unless overridden by a row or cell style.\n\n- **Row object** - Used in `header_rows`, `rows`, and `footer_rows`.\n\n    - **`cells`** - **Required** | Array of one or more cell objects. After spans are applied, each row must resolve exactly to the declared column count.\n    - **`min_height`** - Optional | Non-negative minimum row height in PDF units.\n    - **`style`** - Optional | Style object applied to every cell in the row unless overridden by a cell style.\n\n- **Cell object**\n\n    - **`text`** - Optional | Text content for the cell. Do not provide with `image`.\n    - **`image`** - Optional | Image object for the cell. Do not provide with `text`. The referenced image must be supplied in the same request using either `image_files` or `image_ids`.\n    - **`col_span`** - Optional | Positive number of columns occupied by the cell.\n    - **`row_span`** - Optional | Positive number of rows occupied by the cell. A span cannot overlap another cell or cross its header, body, or footer section.\n    - **`min_height`** - Optional | Non-negative minimum cell height in PDF units.\n    - **`fixed_height`** - Optional | Non-negative fixed cell height in PDF units. When `min_height` is also supplied, this value must be at least the minimum height and large enough for the cell's content.\n    - **`no_wrap`** - Optional | Set to `true` to keep cell text on one line, or `false` to allow wrapping.\n    - **`is_rtl`** - Optional | Set to `true` for right-to-left cell content, or `false` for left-to-right content.\n    - **`style`** - Optional | Style object applied to this cell. It overrides table, column, and row styles.\n    - **`tag_actual_text`** - Optional | Non-empty replacement text for accessibility or extraction. Requires `tag_enabled=true`.\n    - **`tag_structure_type`** - Optional | Set to `TH` for a header cell, or `TD` for a body or footer cell. Requires `tag_enabled=true`.\n\n- **Cell image object** - The value of a cell's `image` property.\n\n    - **`image_index`** - **Required** | Zero-based position of the image in the ordered `image_files` or `image_ids` fields. Index `0` selects the first supplied image, index `1` the second, and so on.\n    - **`width`** - Optional | Positive placed image width in PDF units.\n    - **`height`** - Optional | Positive placed image height in PDF units.\n    - **`tag_alt_text`** - Optional | Non-empty alternate text for the image. Requires `tag_enabled=true`.\n    - **`tag_is_artifact`** - Optional | Set to `true` to mark the image as an artifact, or `false` to leave it as content. Defaults to `false`. Requires `tag_enabled=true`.\n    - **`tag_structure_type`** - Optional | Set to `Figure` to add image structure tagging. Requires `tag_enabled=true`.\n\n- **Style object** - May be supplied at table, column, row, or cell level. More specific styles override less specific styles.\n\n    - **`font`** - Optional | Font name for text in the styled scope. See the [Font List](https://pdfrest.com/documentation/fontlist/) for supported fonts.\n    - **`text_size`** - Optional | Positive text size in PDF units.\n    - **`text_align`** - Optional | `left`, `center`, or `right`.\n    - **`vertical_align`** - Optional | `top`, `middle`, or `bottom`.\n    - **`text_color_rgb`** - Optional | Three RGB values from 0 to 255, supplied as a comma-separated string or an array. Do not provide with `text_color_cmyk`.\n    - **`text_color_cmyk`** - Optional | Four CMYK values from 0 to 100, supplied as a comma-separated string or an array. Do not provide with `text_color_rgb`.\n    - **`background_color_rgb`** - Optional | Three RGB values from 0 to 255, supplied as a comma-separated string or an array. Do not provide with `background_color_cmyk`.\n    - **`background_color_cmyk`** - Optional | Four CMYK values from 0 to 100, supplied as a comma-separated string or an array. Do not provide with `background_color_rgb`.\n    - **`opacity`** - Optional | Opacity from `0` (transparent) to `1` (opaque).\n    - **`padding`** - Optional | Padding object. Each omitted side uses the applicable default.\n    - **`border`** - Optional | Border object with independently configurable sides.\n\n- **Padding object** - The value of a style's `padding` property.\n\n    - **`top`** - Optional | Non-negative top padding in PDF units.\n    - **`right`** - Optional | Non-negative right padding in PDF units.\n    - **`bottom`** - Optional | Non-negative bottom padding in PDF units.\n    - **`left`** - Optional | Non-negative left padding in PDF units.\n\n- **Border object** - The value of a style's `border` property.\n\n    - **`top`** - Optional | Border-side object for the top edge.\n    - **`right`** - Optional | Border-side object for the right edge.\n    - **`bottom`** - Optional | Border-side object for the bottom edge.\n    - **`left`** - Optional | Border-side object for the left edge.\n\n- **Border-side object** - The value of any `border.top`, `border.right`, `border.bottom`, or `border.left` property.\n\n    - **`width`** - Optional | Non-negative border width in PDF units.\n    - **`color_rgb`** - Optional | Three RGB values from 0 to 255, supplied as a comma-separated string or an array. Do not provide with `color_cmyk`.\n    - **`color_cmyk`** - Optional | Four CMYK values from 0 to 100, supplied as a comma-separated string or an array. Do not provide with `color_rgb`.\n    - **`opacity`** - Optional | Opacity from `0` (transparent) to `1` (opaque).\n\nNOTE: The example includes an image cell. To run it, provide either a supported image as the first `image_files` multipart field or an existing image resource ID as the first `image_ids` field, and set `tag_enabled=true`. Its `image_index` value of `0` selects that first image.\n",
                "contentMediaType": "application/json",
                "example": "[\n  {\n    \"page\": 1,\n    \"x\": 54,\n    \"y\": 540,\n    \"width\": 504,\n    \"columns\": [\n      { \"width\": 210 },\n      { \"width\": 144 },\n      { \"width\": 150 }\n    ],\n    \"tag_structure_type\": \"Table\",\n    \"style\": {\n      \"padding\": { \"top\": 6, \"right\": 8, \"bottom\": 6, \"left\": 8 },\n      \"text_size\": 10\n    },\n    \"header_rows\": [\n      {\n        \"cells\": [\n          {\n            \"text\": \"Milestone\",\n            \"tag_structure_type\": \"TH\",\n            \"style\": {\n              \"background_color_rgb\": [26, 72, 112],\n              \"text_color_rgb\": [255, 255, 255]\n            }\n          },\n          {\n            \"text\": \"Owner\",\n            \"tag_structure_type\": \"TH\",\n            \"style\": {\n              \"background_color_rgb\": [26, 72, 112],\n              \"text_color_rgb\": [255, 255, 255]\n            }\n          },\n          {\n            \"text\": \"Status\",\n            \"tag_structure_type\": \"TH\",\n            \"style\": {\n              \"background_color_rgb\": [26, 72, 112],\n              \"text_color_rgb\": [255, 255, 255]\n            }\n          }\n        ]\n      }\n    ],\n    \"rows\": [\n      {\n        \"cells\": [\n          { \"text\": \"Requirements review\" },\n          { \"text\": \"Maya Chen\" },\n          {\n            \"image\": {\n              \"image_index\": 0,\n              \"width\": 18,\n              \"height\": 18,\n              \"tag_alt_text\": \"Complete status icon\",\n              \"tag_structure_type\": \"Figure\"\n            },\n            \"tag_actual_text\": \"Complete\",\n            \"tag_structure_type\": \"TD\",\n            \"style\": { \"background_color_rgb\": [220, 252, 231] }\n          }\n        ]\n      },\n      {\n        \"cells\": [\n          { \"text\": \"Prototype delivery\" },\n          { \"text\": \"Jordan Lee\" },\n          {\n            \"text\": \"In progress\",\n            \"tag_structure_type\": \"TD\",\n            \"style\": { \"background_color_rgb\": [254, 249, 195] }\n          }\n        ]\n      },\n      {\n        \"cells\": [\n          { \"text\": \"Stakeholder approval\" },\n          { \"text\": \"Avery Patel\" },\n          {\n            \"text\": \"Planned\",\n            \"tag_structure_type\": \"TD\",\n            \"style\": { \"background_color_rgb\": [239, 246, 255] }\n          }\n        ]\n      }\n    ],\n    \"footer_rows\": [\n      {\n        \"cells\": [\n          {\n            \"text\": \"Next review: Friday, 10:00 AM\",\n            \"col_span\": 3,\n            \"tag_structure_type\": \"TD\",\n            \"style\": {\n              \"background_color_rgb\": [245, 247, 250],\n              \"text_color_rgb\": [55, 65, 81]\n            }\n          }\n        ]\n      }\n    ]\n  }\n]\n",
                "x-order": 10
              },
              "tag_enabled": {
                "type": "boolean",
                "default": false,
                "description": "Enables tagging for table content added by this request. Set to `true` whenever `tag_language` or a table, cell, or image-cell tag property is supplied. This does not automatically tag existing untagged content in the input PDF.",
                "x-order": 20
              },
              "tag_language": {
                "$ref": "#/components/schemas/Bcp47LanguageTag",
                "description": "BCP 47 language tag identifying newly added tagged table content for assistive technology. Requires `tag_enabled=true`.",
                "x-order": 21
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-added-tables`.",
                "x-order": 999
              }
            },
            "required": [
              "table_objects"
            ]
          }
        ]
      },
      "RedactionPadding": {
        "type": "object",
        "additionalProperties": false,
        "description": "Extra space added to each detected redaction region, in PDF units, where 72 units equal 1 inch. Top, right, bottom, and left are relative to the detected text region's local axes. Each omitted side defaults to `0`.",
        "properties": {
          "top": {
            "type": "number",
            "description": "Extra space above the text region.",
            "minimum": 0,
            "default": 0
          },
          "right": {
            "type": "number",
            "description": "Extra space to the right of the text region.",
            "minimum": 0,
            "default": 0
          },
          "bottom": {
            "type": "number",
            "description": "Extra space below the text region.",
            "minimum": 0,
            "default": 0
          },
          "left": {
            "type": "number",
            "description": "Extra space to the left of the text region.",
            "minimum": 0,
            "default": 0
          }
        }
      },
      "RedactedTextPreviewRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "redactions": {
                "type": "string",
                "description": "JSON string containing an array of redaction objects. Each object specifies a `type` and `value` using one of the following types:\n\n- **`literal`** - The `value` is the exact string to search for and redact. This type is useful for removing specific names, words, or phrases.\n- **`regex`** - The `value` is a regular expression used to search for pattern matches and redact them. This type is ideal for identifying and removing patterns such as sequences of numbers or specific text formats.\n- **`preset`** - Set `value` to one of the following predefined types to automatically redact common patterns using a predefined regular expression:\n\n    - **`email`** - Email addresses.\n    - **`phone_number`** - Phone numbers.\n    - **`date`** - Dates.\n    - **`us_ssn`** - US Social Security numbers.\n    - **`url`** - URLs.\n    - **`credit_card`** - Credit card numbers.\n    - **`credit_debit_pin`** - Credit or debit card PIN numbers.\n    - **`bank_routing_number`** - Bank routing numbers.\n    - **`international_bank_account_number`** - International bank account numbers.\n    - **`swift_bic_number`** - SWIFT/BIC numbers.\n    - **`ipv4`** - IPv4 addresses.\n    - **`ipv6`** - IPv6 addresses.\n",
                "contentMediaType": "application/json",
                "contentSchema": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "type": {
                            "const": "literal"
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "value"
                        ]
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "type": {
                            "const": "regex"
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "value"
                        ]
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "type": {
                            "const": "preset"
                          },
                          "value": {
                            "type": "string",
                            "enum": [
                              "email",
                              "phone_number",
                              "date",
                              "us_ssn",
                              "url",
                              "credit_card",
                              "credit_debit_pin",
                              "bank_routing_number",
                              "international_bank_account_number",
                              "swift_bic_number",
                              "ipv4",
                              "ipv6"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "value"
                        ]
                      }
                    ]
                  }
                },
                "examples": [
                  "[{\"type\":\"preset\",\"value\":\"email\"},{\"type\":\"regex\",\"value\":\"(\\\\+\\\\d{1,2}\\\\s)?\\\\(?\\\\d{3}\\\\)?[\\\\s.-]\\\\d{3}[\\\\s.-]\\\\d{4}\"},{\"type\":\"literal\",\"value\":\"word\"}]"
                ],
                "x-order": 10
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-redacted-text-preview`.",
                "x-order": 999
              }
            },
            "required": [
              "redactions"
            ]
          }
        ]
      },
      "RedactedTextPreviewJsonOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RedactedTextPreviewRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "redaction_padding": {
                "$ref": "#/components/schemas/RedactionPadding",
                "description": "Add extra space around each detected redaction box, in PDF units, where 72 units equal 1 inch. Set padding in this preview request to see the expanded boxes before applying redactions.\n\nPadding can include nearby content. Review the expanded boxes in the preview before applying redactions.\n",
                "example": {
                  "top": 4,
                  "right": 0,
                  "bottom": 4,
                  "left": 0
                },
                "x-order": 20
              }
            }
          }
        ]
      },
      "RedactedTextPreviewMultipartOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RedactedTextPreviewRequestOptions"
          },
          {
            "type": "object",
            "properties": {
              "redaction_padding": {
                "$ref": "#/components/schemas/RedactionPadding",
                "description": "Add extra space around each detected redaction box, in PDF units, where 72 units equal 1 inch. Set padding in this preview request to see the expanded boxes before applying redactions.\n\nPadding can include nearby content. Review the expanded boxes in the preview before applying redactions.\n",
                "example": {
                  "top": 4,
                  "right": 0,
                  "bottom": 4,
                  "left": 0
                },
                "x-order": 20
              }
            }
          }
        ]
      },
      "RedactedTextAppliedRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "rgb_color": {
                "type": "string",
                "description": "Optional redaction fill color as three comma-separated RGB integers from 0 through 255. Defaults to `0, 0, 0` (black).",
                "pattern": "^\\s*(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)\\s*,\\s*(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)\\s*,\\s*(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)\\s*$",
                "default": "0, 0, 0",
                "x-order": 50
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-redacted-text-applied`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "UnzipRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "password": {
                "type": "string",
                "minLength": 1,
                "description": "Optional password to unlock a protected `.zip` archive.",
                "x-order": 50
              }
            }
          }
        ]
      },
      "ConvertedColorsRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "color_profile": {
                "$ref": "#/components/schemas/ConvertedColorProfile",
                "description": "Color profile to apply. Supported values:\n\n- **`lab-d50`** - `L*a*b` color specification with a D50 white point. The Lab color space is based on the CIE XYZ color space, with an `L` dimension for lightness and `a` and `b` color coordinates. This is Adobe Systems' standard Lab profile.\n- **`srgb`** - Standard RGB, the default profile for Windows monitors.\n- **`apple-rgb`** - Apple RGB, the default profile for Mac monitors.\n- **`color-match-rgb`** - ColorMatch RGB, a simpler version of the Radius ColorMatch RGB space without the non-zero black point.\n- **`gamma-18`** - Gray Gamma 1.8, a grayscale display profile used for content viewed on a monitor.\n- **`gamma-22`** - Gray Gamma 2.2.\n- **`dot-gain-10`** - Grayscale printer profile with 10% dot gain. Dot gain is commonly used in offset printing to describe the increase in halftone-dot size during printing, which can make a document appear darker than intended.\n- **`dot-gain-15`** - Grayscale printer profile with 15% dot gain.\n- **`dot-gain-20`** - Grayscale printer profile with 20% dot gain.\n- **`dot-gain-25`** - Grayscale printer profile with 25% dot gain.\n- **`dot-gain-30`** - Grayscale printer profile with 30% dot gain.\n- **`monitor-rgb`** - RGB Monitor, referring to a monitor that requires separate signals for the three primary colors.\n- **`acrobat5-cmyk`** - Adobe Reader 5 CMYK.\n- **`acrobat9-cmyk`** - Adobe Reader 9 CMYK.\n- **`custom`** - Supply a custom ICC color profile using either the `profile` or `profile_id` parameter.\n",
                "x-order": 10
              },
              "profile": {
                "type": "string",
                "format": "binary",
                "description": "Local ICC color profile file to upload. Required as an alternative to `profile_id` when `color_profile` is `custom`.",
                "x-order": 50
              },
              "profile_id": {
                "$ref": "#/components/schemas/ResourceId",
                "description": "Resource ID of an ICC color profile already stored on the processing server. Required as an alternative to `profile` when `color_profile` is `custom`; it must be a valid resource ID returned by a POST request.",
                "x-order": 51
              },
              "preserve_black": {
                "type": "string",
                "description": "Preserve the original CMYK, RGB, or grayscale definition of black elements during conversion, preventing unintended conversion such as RGB black text becoming rich CMYK black.",
                "enum": [
                  "false",
                  "true"
                ],
                "default": "false",
                "x-order": 52
              },
              "rendering_intent": {
                "$ref": "#/components/schemas/RenderingIntent",
                "x-order": 53
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-converted-colors`.",
                "x-order": 999
              }
            },
            "required": [
              "color_profile"
            ],
            "if": {
              "properties": {
                "color_profile": {
                  "const": "custom"
                }
              },
              "required": [
                "color_profile"
              ]
            },
            "then": {
              "oneOf": [
                {
                  "properties": {
                    "profile": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "required": [
                    "profile"
                  ]
                },
                {
                  "properties": {
                    "profile_id": {
                      "$ref": "#/components/schemas/ResourceId"
                    }
                  },
                  "required": [
                    "profile_id"
                  ]
                }
              ]
            }
          }
        ]
      },
      "PageBoxMediaPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "range": {
            "type": "string",
            "pattern": "^(?:all|even|odd|[1-9][0-9]*|[1-9][0-9]*-(?:[1-9][0-9]*|last))$"
          },
          "top": {
            "type": "number"
          },
          "bottom": {
            "type": "number"
          },
          "left": {
            "type": "number"
          },
          "right": {
            "type": "number"
          }
        },
        "required": [
          "range",
          "top",
          "bottom",
          "left",
          "right"
        ]
      },
      "PageBoxPositiveMarginPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "range": {
            "type": "string",
            "pattern": "^(?:all|even|odd|[1-9][0-9]*|[1-9][0-9]*-(?:[1-9][0-9]*|last))$"
          },
          "top": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "bottom": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "left": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "right": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "range",
          "top",
          "bottom",
          "left",
          "right"
        ]
      },
      "SetPageBoxesRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "boxes": {
                "type": "string",
                "description": "JSON string defining page boundary boxes. It must contain a top-level `boxes` array whose objects identify a box type and the pages and margins to modify.\n\nPage ranges may be a single page, a range, `all`, `even`, `odd`, or a range ending in `last`. Margins use PDF units, where 72 units equal 1 inch, and are relative to the current MediaBox. Margins must be positive except for MediaBox margins, which may be negative to increase the page size.\n\n**Accepts:**\n\n- **boxes** - String | **Required** | A JSON string containing an array of box definition objects. Each object defines a specific page boundary box to modify.\n- **boxes[].box** - String | **Required** | Specifies the type of page boundary box to modify. Accepted values are `media`, `crop`, `bleed`, `trim`, and `art`.\n- **boxes[].pages** - String | **Required** | An array of page specification objects. Each object defines the page range and the corresponding margin adjustments for the specified box type.\n- **boxes[].pages[].range** - String | **Required** | Specifies the page or range of pages to which the margin adjustments will be applied. Accepts a single page number (`1`), a page range (`1-3`), `all` to apply to every page, `even` for even-numbered pages, `odd` for odd-numbered pages, or ranges including `last` (for example, `2-last`).\n- **boxes[].pages[].top** - Number | **Required** | The top margin adjustment to apply, in positive PDF units, where 72 PDF units equal 1 inch, relative to the current MediaBox. For MediaBox only, negative values can be used to increase the page size.\n- **boxes[].pages[].bottom** - Number | **Required** | The bottom margin adjustment to apply, in positive PDF units, where 72 PDF units equal 1 inch, relative to the current MediaBox. For MediaBox only, negative values can be used to increase the page size.\n- **boxes[].pages[].left** - Number | **Required** | The left margin adjustment to apply, in positive PDF units, where 72 PDF units equal 1 inch, relative to the current MediaBox. For MediaBox only, negative values can be used to increase the page size.\n- **boxes[].pages[].right** - Number | **Required** | The right margin adjustment to apply, in positive PDF units, where 72 PDF units equal 1 inch, relative to the current MediaBox. For MediaBox only, negative values can be used to increase the page size.\n",
                "contentMediaType": "application/json",
                "examples": [
                  "{\n  \"boxes\": [\n    {\n      \"box\": \"crop\",\n      \"pages\": [\n        {\n          \"range\": \"1-10\",\n          \"left\": 72,\n          \"top\": 36,\n          \"bottom\": 36,\n          \"right\": 72\n        },\n        {\n          \"range\": \"11-last\",\n          \"left\": 72,\n          \"top\": 72,\n          \"bottom\": 72,\n          \"right\": 72\n        }\n      ]\n    },\n    {\n      \"box\": \"bleed\",\n      \"pages\": [\n        {\n          \"range\": \"1-last\",\n          \"left\": 144,\n          \"top\": 144,\n          \"bottom\": 144,\n          \"right\": 144\n        }\n      ]\n    }\n  ]\n}\n"
                ],
                "contentSchema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "boxes": {
                      "type": "array",
                      "minItems": 1,
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "box": {
                                "const": "media"
                              },
                              "pages": {
                                "type": "array",
                                "minItems": 1,
                                "items": {
                                  "$ref": "#/components/schemas/PageBoxMediaPage"
                                }
                              }
                            },
                            "required": [
                              "box",
                              "pages"
                            ]
                          },
                          {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "box": {
                                "type": "string",
                                "enum": [
                                  "crop",
                                  "bleed",
                                  "trim",
                                  "art"
                                ]
                              },
                              "pages": {
                                "type": "array",
                                "minItems": 1,
                                "items": {
                                  "$ref": "#/components/schemas/PageBoxPositiveMarginPage"
                                }
                              }
                            },
                            "required": [
                              "box",
                              "pages"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "boxes"
                  ]
                },
                "x-order": 10
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-page-boxes-set`.",
                "x-order": 999
              }
            },
            "required": [
              "boxes"
            ]
          }
        ]
      },
      "WatermarkCommonOptions": {
        "type": "object",
        "properties": {
          "opacity": {
            "type": "number",
            "description": "Opacity for text and file watermarks, from 0 (fully transparent) to 1 (fully opaque).",
            "minimum": 0,
            "maximum": 1,
            "default": 0.5,
            "x-order": 56
          },
          "x": {
            "type": "integer",
            "description": "Horizontal offset in PDF units from the selected horizontal alignment; 72 units equal 1 inch. Defaults to `0` (horizontal center of the page).",
            "default": 0,
            "x-order": 58
          },
          "y": {
            "type": "integer",
            "description": "Vertical offset in PDF units from the selected vertical alignment; 72 units equal 1 inch. Defaults to `0` (vertical center of the page).",
            "default": 0,
            "x-order": 59
          },
          "rotation": {
            "type": "integer",
            "description": "Rotation in degrees for text and file watermarks. Accepts any integer.",
            "default": 0,
            "x-order": 60
          },
          "horizontal_alignment": {
            "type": "string",
            "description": "Starting horizontal position relative to the page edges. Select `left`, `right`, or `center`, then optionally offset it with `vertical_alignment`, `x`, and `y`.",
            "enum": [
              "left",
              "right",
              "center"
            ],
            "default": "center",
            "x-order": 62
          },
          "vertical_alignment": {
            "type": "string",
            "description": "Starting vertical position relative to the page edges. Select `top`, `bottom`, or `center`, then optionally offset it with `horizontal_alignment`, `x`, and `y`.",
            "enum": [
              "top",
              "bottom",
              "center"
            ],
            "default": "center",
            "x-order": 63
          },
          "pages": {
            "type": "string",
            "description": "Page or range expression supporting comma-separated pages and ranges and `last`. Defaults to `1-last` (all pages).",
            "minLength": 1,
            "default": "1-last",
            "x-order": 64
          },
          "behind_page": {
            "type": "string",
            "description": "When `true`, place the watermark behind all page content; when `false`, place it on top of the page content.",
            "enum": [
              "true",
              "false"
            ],
            "default": "false",
            "x-order": 65
          },
          "output": {
            "$ref": "#/components/schemas/OutputFilename",
            "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_watermarked-pdf`.",
            "x-order": 999
          }
        }
      },
      "WatermarkTextOptions": {
        "type": "object",
        "properties": {
          "text_size": {
            "type": "number",
            "description": "Size of text for a text watermark, from 5 to 100.",
            "minimum": 5,
            "maximum": 100,
            "default": 72,
            "x-order": 53
          },
          "font": {
            "type": "string",
            "description": "Font for a text watermark. See the [Font List](https://pdfrest.com/documentation/fontlist) for supported values.",
            "minLength": 1,
            "default": "Arial",
            "x-order": 57
          }
        }
      },
      "WatermarkFileOptions": {
        "type": "object",
        "properties": {
          "watermark_file_scale": {
            "type": "number",
            "description": "Non-negative scale applied to resize the content of a PDF watermark file.",
            "minimum": 0,
            "default": 0.5,
            "x-order": 61
          }
        }
      },
      "WatermarkRgbTextInputBranch": {
        "type": "object",
        "properties": {
          "watermark_text": {
            "type": "string",
            "minLength": 1,
            "description": "Text to apply as a watermark.",
            "x-order": 50
          },
          "text_color_rgb": {
            "type": "string",
            "description": "Comma-separated red, green, and blue values for a text watermark, each from 0 to 255. Cannot be used with `text_color_cmyk`. Defaults to `0,0,0`.",
            "default": "0,0,0",
            "x-order": 54
          }
        },
        "required": [
          "watermark_text"
        ]
      },
      "WatermarkCmykTextInputBranch": {
        "type": "object",
        "properties": {
          "watermark_text": {
            "type": "string",
            "minLength": 1,
            "description": "Text to apply as a watermark.",
            "x-order": 50
          },
          "text_color_cmyk": {
            "type": "string",
            "description": "Comma-separated cyan, magenta, yellow, and key (black) values for a text watermark, each from 0 to 100. Cannot be used with `text_color_rgb`.",
            "x-order": 55
          }
        },
        "required": [
          "watermark_text",
          "text_color_cmyk"
        ]
      },
      "WatermarkFileInputBranch": {
        "type": "object",
        "properties": {
          "watermark_file": {
            "type": "string",
            "format": "binary",
            "description": "PDF file to apply as a watermark. Convert another graphic image format to PDF with the `/pdf` endpoint before using it as a watermark.",
            "x-order": 51
          }
        },
        "required": [
          "watermark_file"
        ]
      },
      "WatermarkFileIdInputBranch": {
        "type": "object",
        "properties": {
          "watermark_file_id": {
            "type": "string",
            "format": "uuid",
            "description": "Alphanumeric ID (UUID) of an existing PDF watermark file. Must be a valid resource ID returned by a POST request.",
            "x-order": 52
          }
        },
        "required": [
          "watermark_file_id"
        ]
      },
      "FlattenedFormsRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "as_printed": {
                "type": "string",
                "description": "When `true`, flatten the form using its print-view settings rather than its on-screen display. Accepts `true` or `false`; defaults to `false`.",
                "enum": [
                  "false",
                  "true"
                ],
                "default": "false",
                "x-order": 50
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Name of the generated output file, without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_flattened-forms-pdf`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "ImportedFormDataRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_pdf-with-imported-form-data`.",
                "x-order": 999
              }
            }
          }
        ]
      },
      "ImportedFormDataFileInputBranch": {
        "type": "object",
        "properties": {
          "data_file": {
            "type": "string",
            "format": "binary",
            "description": "Form-data file to upload and import into matching fields of the input PDF. Acroforms accept `.fdf`, `.xfdf`, or `.xml`; XFA forms accept `.xdp`, `.xfd`, or `.xml`.",
            "x-order": 50
          }
        },
        "required": [
          "data_file"
        ]
      },
      "ImportedFormDataIdInputBranch": {
        "type": "object",
        "properties": {
          "data_file_id": {
            "type": "string",
            "format": "uuid",
            "description": "Alphanumeric ID (UUID) of an existing form-data file. Acroforms accept FDF, XFDF, or XML data; XFA forms accept XDP, XFD, or XML data. Must be a valid resource ID returned by a POST request.",
            "x-order": 51
          }
        },
        "required": [
          "data_file_id"
        ]
      },
      "ExportedFormDataRequestOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OutputOnlyOptions"
          },
          {
            "type": "object",
            "properties": {
              "data_format": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportedFormDataFormat"
                  }
                ],
                "description": "Export format. Acroforms support `fdf`, `xfdf`, and `xml`; XFA forms support `xdp`, `xfd`, and `xml`. Example: `xml`.",
                "x-order": 10
              },
              "output": {
                "$ref": "#/components/schemas/OutputFilename",
                "description": "Generated output filename without extension. Defaults to `[INPUT_FILE_NAME]_pdfrest_exported-form-data`.",
                "x-order": 999
              }
            },
            "required": [
              "data_format"
            ]
          }
        ]
      }
    },
    "responses": {
      "InternalServerError": {
        "description": "Internal Server Error, including failure of required demo watermarking or redaction.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": "There was an internal error while processing your file."
            }
          }
        }
      },
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "StandardFileProcessSuccess": {
        "description": "OK",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/FileProcessResponse"
                },
                {
                  "$ref": "#/components/schemas/AsyncRequestAcceptedResponse"
                }
              ]
            }
          }
        }
      }
    },
    "parameters": {
      "OpenApiTypeQuery": {
        "name": "type",
        "in": "query",
        "required": false,
        "description": "Selects which product variant's OpenAPI specification is returned. When omitted, `public` and `enterprise` images return the self-hosted Container specification. All other images return the Cloud specification.\n",
        "schema": {
          "type": "string",
          "enum": [
            "cloud",
            "container"
          ],
          "x-enum-descriptions": {
            "cloud": "Return the Cloud API specification.",
            "container": "Return the self-hosted Container API specification."
          }
        }
      },
      "ResourceIdPath": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/ResourceId"
        },
        "description": "Alphanumeric ID (UUID) of the resource. Accepts any valid resource ID returned by a POST request."
      },
      "RequestIdPath": {
        "name": "requestId",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/RequestId"
        },
        "description": "Alphanumeric ID (UUID) of the request to poll for its status. Accepts any valid `requestId` returned by a POST request."
      },
      "ResponseTypeHeader": {
        "name": "Response-Type",
        "in": "header",
        "required": false,
        "description": "Set to `requestId` on a POST request to receive asynchronous processing metadata instead of waiting for the final result. Poll `GET /request-status/{requestId}` to retrieve the completed response.\n",
        "schema": {
          "type": "string",
          "enum": [
            "requestId"
          ]
        }
      },
      "ContentFilenameHeader": {
        "name": "Content-Filename",
        "in": "header",
        "required": false,
        "description": "Specifies the valid filename, including its extension, for the file being uploaded. Required when uploading one file as a binary payload using `Content-Type: application/octet-stream`.\n",
        "schema": {
          "type": "string"
        },
        "example": "file.pdf"
      },
      "IncludeFileInfoHeader": {
        "name": "Include-File-Info",
        "in": "header",
        "required": false,
        "description": "Set to `true` to include detailed metadata for all detected input and output files in the JSON response, including file name, size, type, and expiration timestamps. Set to `false` to omit this metadata.\n",
        "schema": {
          "type": "boolean",
          "default": false
        }
      }
    }
  }
}
