Skip to Content
NexPDF

Cost estimates

Know how many units a build will cost before running it. Estimates are free.

English

POST /v1/estimate takes exactly what /v1/build takes (the same instructions, the same files or links) and answers with what the build would cost, without running it:

{
  "units": 14,
  "pages": 12,
  "operations": [
    { "op": "ocr", "units": 12 },
    { "op": "redact", "units": 1 },
    { "op": "sign", "units": 1 },
    { "op": "timestamp", "units": 1 }
  ]
}

operations lists what each step costs, by the price list; pages is the length of the document the build would produce before any split.

Estimates cost nothing and do not count against the plan's units (they do count toward the request rate). The instructions and files are checked as a build checks them, so an estimate is also a way to validate a request before sending it for real.

curl https://api.nexpdf.dev/v1/estimate \
  -H "Authorization: Bearer $NEXPDF_API_KEY" \
  -F doc=@scanned-contract.pdf \
  -F 'instructions={
    "parts": [
      {
        "file": "doc"
      }
    ],
    "actions": [
      {
        "type": "ocr",
        "languages": "eng"
      },
      {
        "type": "redact",
        "query": "email",
        "mode": "pattern"
      },
      {
        "type": "sign",
        "reason": "Archived",
        "level": "B-T"
      }
    ]
  }'

How exact it is

The estimate opens the files (converting those that are not PDFs) and counts their pages, so per-page operations such as OCR are counted from the real document. The final bill can only be lower, never higher: an action that fails costs nothing.

For AI extraction and the viewer, see their own pages: their cost depends on the document's text and is shown in the response's x-nexpdf-units header.

On this page