{
  "info": {
    "name": "NexPDF Cloud API",
    "description": "Convert, build, sign, split, OCR, extract and view documents, on the NexPDF engine. Every request but health sends `Authorization: Bearer <API key>`. Successful answers carry `x-nexpdf-units` (units billed) and `x-request-id`. Errors are JSON: `{\"error\": {\"code\", \"message\"}, \"request_id\"}`.\n\nSet the `apiKey` variable (a test key `nxp_test_…` costs nothing beyond its free units and watermarks its output). Generated from openapi.json.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "version": "1.1.0"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.nexpdf.dev"
    },
    {
      "key": "apiKey",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Documents",
      "description": "Convert, build, OCR, merge, split, extract and edit.",
      "item": [
        {
          "name": "Build a document",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/build",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "build"
              ]
            },
            "description": "Build a document\n\nCombines parts (files and HTML), applies actions in order and writes one output. Every other conversion endpoint is a shortcut for a build. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "doc",
                  "type": "file",
                  "src": [],
                  "description": "The file the instructions call \"doc\" (or send doc_url)."
                },
                {
                  "key": "instructions",
                  "type": "text",
                  "value": "{\"parts\":[{\"file\":\"doc\"}],\"actions\":[{\"type\":\"watermark\",\"text\":\"DRAFT\"}],\"output\":{\"type\":\"pdf\"}}",
                  "disabled": false,
                  "description": "The build instructions, as JSON text (schema `Instructions`)."
                }
              ]
            }
          }
        },
        {
          "name": "Convert to PDF",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/convert/pdf",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "convert",
                "pdf"
              ]
            },
            "description": "Convert to PDF\n\nAny supported file to PDF. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "type": "file",
                  "src": [],
                  "description": "The file (PDF, Word, Excel, PowerPoint, OpenDocument, HTML, image, EPUB…). Or `document_url`."
                },
                {
                  "key": "document_url",
                  "type": "text",
                  "value": "https://example.com/document.pdf",
                  "disabled": true,
                  "description": "Instead of `document`: a public URL to download it from."
                }
              ]
            }
          }
        },
        {
          "name": "OCR",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/ocr",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "ocr"
              ]
            },
            "description": "OCR\n\nAdds a searchable text layer to scanned pages. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "type": "file",
                  "src": [],
                  "description": "The file (PDF, Word, Excel, PowerPoint, OpenDocument, HTML, image, EPUB…). Or `document_url`."
                },
                {
                  "key": "document_url",
                  "type": "text",
                  "value": "https://example.com/document.pdf",
                  "disabled": true,
                  "description": "Instead of `document`: a public URL to download it from."
                },
                {
                  "key": "languages",
                  "type": "text",
                  "value": "eng",
                  "disabled": false,
                  "description": "Tesseract language codes joined with `+`, e.g. `eng+por`."
                }
              ]
            }
          }
        },
        {
          "name": "Merge",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/merge",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "merge"
              ]
            },
            "description": "Merge\n\nJoins `file1`, `file2`, … in that order (2 to 20). Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file1",
                  "type": "file",
                  "src": [],
                  "description": ""
                },
                {
                  "key": "file2",
                  "type": "file",
                  "src": [],
                  "description": ""
                }
              ]
            }
          }
        },
        {
          "name": "Extract Markdown",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/extract/markdown",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "extract",
                "markdown"
              ]
            },
            "description": "Extract Markdown\n\nThe document's text as Markdown, with headings, lists and tables. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "type": "file",
                  "src": [],
                  "description": "The file (PDF, Word, Excel, PowerPoint, OpenDocument, HTML, image, EPUB…). Or `document_url`."
                },
                {
                  "key": "document_url",
                  "type": "text",
                  "value": "https://example.com/document.pdf",
                  "disabled": true,
                  "description": "Instead of `document`: a public URL to download it from."
                }
              ]
            }
          }
        },
        {
          "name": "Edit a spreadsheet",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/xlsx/edit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "xlsx",
                "edit"
              ]
            },
            "description": "Edit a spreadsheet\n\nSets cells and formulas in an .xlsx. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "type": "file",
                  "src": [],
                  "description": "The file (PDF, Word, Excel, PowerPoint, OpenDocument, HTML, image, EPUB…). Or `document_url`."
                },
                {
                  "key": "document_url",
                  "type": "text",
                  "value": "https://example.com/document.pdf",
                  "disabled": true,
                  "description": "Instead of `document`: a public URL to download it from."
                },
                {
                  "key": "edits",
                  "type": "text",
                  "value": "{\"sheet\":\"Sheet1\",\"edits\":[{\"cell\":\"A1\",\"value\":\"Hello\"}]}",
                  "disabled": false,
                  "description": "JSON text: `{\"sheet\": \"Budget\", \"edits\": [{\"cell\": \"C2\", \"value\": 6.5}]}`."
                }
              ]
            }
          }
        },
        {
          "name": "Edit a Word document",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/docx/edit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "docx",
                "edit"
              ]
            },
            "description": "Edit a Word document\n\nApplies operations (replace text, fill fields, …) to a .docx. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "type": "file",
                  "src": [],
                  "description": "The file (PDF, Word, Excel, PowerPoint, OpenDocument, HTML, image, EPUB…). Or `document_url`."
                },
                {
                  "key": "document_url",
                  "type": "text",
                  "value": "https://example.com/document.pdf",
                  "disabled": true,
                  "description": "Instead of `document`: a public URL to download it from."
                },
                {
                  "key": "ops",
                  "type": "text",
                  "value": "[{\"op\":\"replace\",\"find\":\"[[name]]\",\"replace\":\"Ana\"}]",
                  "disabled": false,
                  "description": "JSON text: a list of operations."
                }
              ]
            }
          }
        },
        {
          "name": "Split",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/split",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "split"
              ]
            },
            "description": "Split\n\nSplits a PDF every N pages or by ranges; a ZIP of `part-1.pdf`, `part-2.pdf`, … Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "type": "file",
                  "src": [],
                  "description": "The file (PDF, Word, Excel, PowerPoint, OpenDocument, HTML, image, EPUB…). Or `document_url`."
                },
                {
                  "key": "document_url",
                  "type": "text",
                  "value": "https://example.com/document.pdf",
                  "disabled": true,
                  "description": "Instead of `document`: a public URL to download it from."
                },
                {
                  "key": "every",
                  "type": "text",
                  "value": "2",
                  "disabled": false,
                  "description": "Pages per file."
                },
                {
                  "key": "ranges",
                  "type": "text",
                  "value": "[{\"start\":0,\"end\":0},{\"start\":1,\"end\":-1}]",
                  "disabled": false,
                  "description": "JSON text: a list of `{start, end}` (0-based, inclusive; negative counts from the end)."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Signatures",
      "description": "Sign (in a build) and verify digital signatures.",
      "item": [
        {
          "name": "Verify signatures",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/verify",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "verify"
              ]
            },
            "description": "Verify signatures\n\nChecks every digital signature in a PDF. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "type": "file",
                  "src": [],
                  "description": "The file (PDF, Word, Excel, PowerPoint, OpenDocument, HTML, image, EPUB…). Or `document_url`."
                },
                {
                  "key": "document_url",
                  "type": "text",
                  "value": "https://example.com/document.pdf",
                  "disabled": true,
                  "description": "Instead of `document`: a public URL to download it from."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Jobs",
      "description": "Cost estimates, background jobs and batches.",
      "item": [
        {
          "name": "Estimate the cost",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/estimate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "estimate"
              ]
            },
            "description": "Estimate the cost\n\nTakes exactly what `/v1/build` takes and answers what it would cost, without running it. Free: costs no units. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "doc",
                  "type": "file",
                  "src": [],
                  "description": "The file the instructions call \"doc\" (or send doc_url)."
                },
                {
                  "key": "instructions",
                  "type": "text",
                  "value": "{\"parts\":[{\"file\":\"doc\"}],\"actions\":[{\"type\":\"watermark\",\"text\":\"DRAFT\"}],\"output\":{\"type\":\"pdf\"}}",
                  "disabled": false,
                  "description": "The build instructions, as JSON text (schema `Instructions`)."
                }
              ]
            }
          }
        },
        {
          "name": "Start a background job",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/jobs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "jobs"
              ]
            },
            "description": "Start a background job\n\nTakes exactly what `/v1/build` takes and answers `202` at once; poll `GET /v1/jobs/{id}`. For large files and long builds (up to 15 minutes). Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "doc",
                  "type": "file",
                  "src": [],
                  "description": "The file the instructions call \"doc\" (or send doc_url)."
                },
                {
                  "key": "instructions",
                  "type": "text",
                  "value": "{\"parts\":[{\"file\":\"doc\"}],\"actions\":[{\"type\":\"watermark\",\"text\":\"DRAFT\"}],\"output\":{\"type\":\"pdf\"}}",
                  "disabled": false,
                  "description": "The build instructions, as JSON text (schema `Instructions`)."
                }
              ]
            }
          }
        },
        {
          "name": "Start a batch",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "batch"
              ]
            },
            "description": "Start a batch\n\nThe same instructions over many documents (2 to 50): the instructions take the document from the file `document`; send them as `document1`, `document2`, … (or `document1_url`, …). Other files the instructions name are shared. The result is a ZIP with one file per document that succeeded, named after its field.",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "instructions",
                  "type": "text",
                  "value": "{\"parts\":[{\"file\":\"doc\"}],\"actions\":[{\"type\":\"watermark\",\"text\":\"DRAFT\"}],\"output\":{\"type\":\"pdf\"}}",
                  "disabled": false,
                  "description": "The build instructions, as JSON text (schema `Instructions`)."
                },
                {
                  "key": "document1",
                  "type": "file",
                  "src": [],
                  "description": ""
                },
                {
                  "key": "document2",
                  "type": "file",
                  "src": [],
                  "description": ""
                }
              ]
            }
          }
        },
        {
          "name": "Job status",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/jobs/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "jobs",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "From the create call."
                }
              ]
            },
            "description": "Job status"
          }
        },
        {
          "name": "Cancel a job or delete its result",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/jobs/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "jobs",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "From the create call."
                }
              ]
            },
            "description": "Cancel a job or delete its result"
          }
        },
        {
          "name": "Job result",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/jobs/:id/result",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "jobs",
                ":id",
                "result"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "From the create call."
                }
              ]
            },
            "description": "Job result\n\nThe file once the job has succeeded. `409 not_ready` (with `Retry-After`) before that; `409 job_failed` when it failed."
          }
        }
      ]
    },
    {
      "name": "Viewer",
      "description": "Links that show a document in any browser.",
      "item": [
        {
          "name": "Create a viewer link",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/viewer",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "viewer"
              ]
            },
            "description": "Create a viewer link\n\nA link that shows the document in any browser, with nothing to install and no key in the page. Anyone with the link sees the document until it expires. Can be embedded in an `<iframe>`. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "type": "file",
                  "src": [],
                  "description": "The file (PDF, Word, Excel, PowerPoint, OpenDocument, HTML, image, EPUB…). Or `document_url`."
                },
                {
                  "key": "document_url",
                  "type": "text",
                  "value": "https://example.com/document.pdf",
                  "disabled": true,
                  "description": "Instead of `document`: a public URL to download it from."
                },
                {
                  "key": "expires_in",
                  "type": "text",
                  "value": "86400",
                  "disabled": false,
                  "description": "Seconds, 300 to 604800 (default 86400)."
                },
                {
                  "key": "download",
                  "type": "text",
                  "value": "true",
                  "disabled": false,
                  "description": "`false` hides the download button and the PDF."
                }
              ]
            }
          }
        },
        {
          "name": "End a viewer link",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/viewer/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "viewer",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "From the create call."
                }
              ]
            },
            "description": "End a viewer link"
          }
        }
      ]
    },
    {
      "name": "AI",
      "description": "Extraction and classification with Claude.",
      "item": [
        {
          "name": "Extract data with AI",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/ai/extract",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "ai",
                "extract"
              ]
            },
            "description": "Extract data with AI\n\nReads the document's text and returns the data your JSON Schema describes. The text is sent to Anthropic's Claude API to answer; nothing is kept. At most 300,000 characters of text. Cost: 1 unit per 4,000 characters (2 at least), plus conversion to PDF when needed. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "type": "file",
                  "src": [],
                  "description": "The file (PDF, Word, Excel, PowerPoint, OpenDocument, HTML, image, EPUB…). Or `document_url`."
                },
                {
                  "key": "document_url",
                  "type": "text",
                  "value": "https://example.com/document.pdf",
                  "disabled": true,
                  "description": "Instead of `document`: a public URL to download it from."
                },
                {
                  "key": "schema",
                  "type": "text",
                  "value": "{\"type\":\"object\",\"properties\":{\"invoice_number\":{\"type\":\"string\"},\"total\":{\"type\":\"number\"}},\"required\":[\"invoice_number\",\"total\"]}",
                  "disabled": false,
                  "description": "JSON text: a JSON Schema whose top level is `{\"type\": \"object\"}`. Objects are closed (`additionalProperties: false`); `minimum`, `maximum`, `minLength` and `maxLength` are ignored."
                },
                {
                  "key": "prompt",
                  "type": "text",
                  "value": "",
                  "disabled": true,
                  "description": "Extra instructions (at most 4000 characters)."
                }
              ]
            }
          }
        },
        {
          "name": "Classify with AI",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/ai/classify",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "ai",
                "classify"
              ]
            },
            "description": "Classify with AI\n\nPicks one of your labels for the document, with the reason. The text is sent to Anthropic's Claude API; nothing is kept. Same limits and cost as `/v1/ai/extract`. Any file field may instead be sent as `<field>_url`: a public `http`/`https` URL the server downloads (ports 80 and 443, at most 5 redirects, the key's file size limit).",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "type": "file",
                  "src": [],
                  "description": "The file (PDF, Word, Excel, PowerPoint, OpenDocument, HTML, image, EPUB…). Or `document_url`."
                },
                {
                  "key": "document_url",
                  "type": "text",
                  "value": "https://example.com/document.pdf",
                  "disabled": true,
                  "description": "Instead of `document`: a public URL to download it from."
                },
                {
                  "key": "labels",
                  "type": "text",
                  "value": "[\"invoice\",\"receipt\",\"contract\"]",
                  "disabled": false,
                  "description": "JSON text: 2 to 100 labels, each a name or `{\"name\", \"description\"}`."
                },
                {
                  "key": "prompt",
                  "type": "text",
                  "value": "",
                  "disabled": true,
                  "description": "Extra instructions (at most 4000 characters)."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Service",
      "description": "Health and this specification.",
      "item": [
        {
          "name": "Health",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/health",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "health"
              ]
            },
            "description": "Health",
            "auth": {
              "type": "noauth"
            }
          }
        },
        {
          "name": "This specification",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/openapi.json",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "openapi.json"
              ]
            },
            "description": "This specification",
            "auth": {
              "type": "noauth"
            }
          }
        }
      ]
    }
  ]
}
