PDF Intelligence API: document intelligence for your AI pipeline

Image v2.18.1 (also latest) · PDF engine 14.2026.11.1 · linux/amd64

Your AI pipeline is only as good as what it can actually read. Engineering drawings, financial filings, contracts, technical manuals: vision models render these to an image, run OCR, and infer content and coordinates from pixels.

The PDF Intelligence API skips the guessing. It reads the PDF's own content directly and returns everything on the page (every path, glyph, shape, layer, coordinate and color) as structured, schema-stable JSON. Deterministic, lossless, and ready for an LLM, a RAG pipeline or a document agent.

It's built on Visual Integrity's C++ PDF engine: 30 years · 12,000+ customers in 100 countries. The same engine converts to 15 output formats with full vector precision: SVG, DWG, DXF, WMF, EMF, EPS, HPGL, PDF, PostScript, PNG, JPG, TIFF, BMP, GIF and text. CGM is unavailable since v2.17.3.


Extraction vs. recognition

Vision / OCR modelsPDF Intelligence API
InputRendered raster imageThe PDF's own content
OutputInferred text and layoutExact vector geometry and structure
CoordinatesApproximate bounding boxesExact, in millimeters
Shapes and pathsDescribed in textNative lines, curves, polygons, ellipses
LayersLost at renderPreserved
ResultProbabilisticDeterministic: extracted, not guessed

Designed for born-digital PDFs. Scanned pages contain only images; text is not read from images (OCR is not included).


Quick start

1. Get a licence. Self-hosted licences are issued to customers under a licence agreement: contact support@visual-integrity.com. To try the API first, request a free hosted key from the demo at api.visual-integrity.com/demo.

2. Run it.

docker pull visualintegrity/pdf-intelligence-engine:v2.18.1

docker run -d --name vi-pdf \
  -p 127.0.0.1:8000:8000 \
  -v vi-data:/data \
  -e VI_LICENSE_KEY="<your licence key>" \
  -e VI_ENGINE_LICENSE="<your engine licence>" \
  -e VI_API_KEY="<a key you choose, at least 24 characters>" \
  -e FEATURES_PDF_OPS=true \
  visualintegrity/pdf-intelligence-engine:v2.18.1

Keep port 8000 on a private network or behind your own TLS gateway; don't expose it to the internet. If you leave out VI_API_KEY, the container creates a key at first start and writes it to /data/api-key.txt.

3. Check it.

curl -s http://localhost:8000/health

Expect "engine_license": true and "convert": true.

4. Send a PDF.

curl -X POST http://localhost:8000/v1/extract \
  -H "Authorization: Bearer <your VI_API_KEY>" \
  -F "file=@your_document.pdf"

The interactive demo runs at http://localhost:8000/demo.


What /v1/extract returns

A pages array. Each page has its size in millimeters, its layers (name and visibility), a per-type summary and the typed objects: polyline, polygon, path, ellipse, text, image, group.

{
  "total_pages": 1,
  "pages": [
    {
      "page": 1,
      "page_size": { "width_mm": 215.9, "height_mm": 279.4 },
      "layers": [{ "name": "Walls", "visible": true }, { "name": "Text", "visible": true }],
      "summary": { "total": 1284, "polylines": 512, "polygons": 88, "paths": 340, "text": 344 },
      "objects": [
        {
          "id": 1, "type": "text", "layer": "Text",
          "bbox": { "x1": 25.4, "y1": 254.0, "x2": 98.1, "y2": 261.9 },
          "geometry": { "content": "Quarterly Report" }
        }
      ]
    }
  ]
}

All coordinates are in millimeters, with the origin at the bottom-left of the page.


Environment variables

VariableRequiredDescription
VI_LICENSE_KEYYesYour licence key (VI-XXXX-XXXX-XXXX-XXXX), issued by Visual Integrity to contracted customers.
VI_ENGINE_LICENSEYesYour engine licence, issued with your licence key. Needed for every conversion.
VI_API_KEYRecommendedThe key your applications send as Authorization: Bearer <key>.
FEATURES_PDF_OPS=trueRecommendedEnables the PDF operations below.
DATABASE_URLOptionalDefaults to SQLite in /data.
MAX_UPLOAD_MBOptionalThe largest file any endpoint accepts, in MB. Defaults to 100.
AI_MODEL_ANTHROPIC, AI_MODEL_OPENAI, AI_MODEL_GEMINIOptionalThe model AI Summary uses when a request names none.
JOB_TTL_SECONDSOptionalHow long a result is kept for collection (below). Defaults to 3600; at least 60.
KEPT_RESULTS_MAX_MBOptionalThe most disk that kept operation results may use (below). Defaults to 1024.
HEAVY_WORK_BUDGET_MBOptionalThe memory heavy work may use at once, in MB (below). Defaults to automatic.
HEAVY_MAX_WAITINGOptionalHow many calls may wait their turn before new ones answer 503 busy (below). Defaults to 16.
PDF_OPS_PUBLICOptionalThe PDF operations this container offers, comma-separated (below). Defaults to all of them.

Kept results (from v2.18.5)

Every metered call (extract, the PDF operations, AI Summary, conversions) runs as a job, and its result is kept on the container's disk for a while, so a client whose connection drops can still collect what it paid for: every answer carries an X-Job-Id header, and GET /v1/jobs/{id} and GET /v1/jobs/{id}/download return the result. An operation's result (extract, the PDF operations, AI Summary) that was fully delivered is kept 5 minutes more, for a retry with an Idempotency-Key header; one never delivered, and every conversion, is kept for JOB_TTL_SECONDS. DELETE /v1/jobs/{id} removes a result at once.

uses more disk; shorter frees disk sooner. It is a collection window, not storage: download your results and keep them yourself.

Conversions are outside it (MIN_FREE_DISK_MB still refuses new work when the disk runs low). Over it, delivered results are removed first, oldest first; results not yet collected are never removed early, and new metered calls answer 503 results_storage_full with Retry-After (nothing charged) until one expires. Raise it on a large disk.

without a volume there, every kept result is lost. Mount a volume on it if your clients rely on collecting results after a restart.

Heavy work takes turns (from v2.18.6)

Conversions, extraction, the PDF operations and preflight each need a known amount of memory while the engine runs (a large CAD conversion about 2 GB). The container lets them run together only while their total fits HEAVY_WORK_BUDGET_MB, across all its workers; the rest wait their turn, first come first served, so the container does not run out of memory under load.

400 MB). Set it when the container shares the machine with other work. Give the container at least 4 GB for large CAD drawings.

within the call's wait; otherwise it answers 202 with job_id and status_url, and the job's status is queued until it starts. Nothing is charged until the work completes.

503 busy with Retry-After, before any work and with nothing charged.

Switching PDF operations off (from v2.18.7)

The image offers six PDF operations: preflight, page-count, layer-list, split, extract-images and diff. PDF_OPS_PUBLIC lists the ones this container serves; by default all six. Leave one out and its route is not there at all (404). The list can only switch operations off: a name this image doesn't offer is ignored, with a warning in the log. A name that is not a PDF operation at all stops the container at startup, naming it.

Without an engine licence, conversions (/v1/convert) answer 503 license_unavailable. Extraction and the PDF operations still work. Output is never watermarked: without a licence there is no conversion at all.


Endpoints

Conversion options are passed as JSON in the options field. Values are validated: an option that can't be used, or a value with a line break or control character, is refused with 400 invalid_options, and nothing is charged.

CGM is unavailable since v2.17.3: POST /v1/convert with output_format=cgm answers 422 format_unavailable at once, with no job and no credits charged, and GET /v1/formats no longer lists it. Use DXF or SVG.

TXT with ascii_format UNICODE is UTF-8 (no byte-order mark, LF line endings) since v2.17.0; it was UTF-16 before. The default ISO8859 is unchanged.


Credits

OutputCredits per page
CAD (DWG, DXF, HPGL)40
Vector (SVG, EMF, WMF, EPS)20
Document and text (PDF, PostScript, TXT)10
Raster (PNG, JPG, TIFF, BMP, GIF): up to 150 dpi / 151–300 / over 3005 / 10 / 15
JSON extraction (/v1/extract): a drawing page / a text page / an empty page40 / 5 / 0

Split costs 5 credits a call, extract-images 5 a counted image, the text diff 30 a call. Plans (Team, Business, Scale) renew every month; a plan may use 10% more than its credits, free, then the container refuses with 402 plan_limit_reached.

A call that finds nothing to work on is not charged (since v2.17.5): /v1/extract of a scanned or image-only PDF and a diff where neither file has text answer 422 no_extractable_content, and extract-images that finds no images answers 200 with credits_charged: 0.

A scanned (image-only) PDF converted to DWG, DXF, HPGL, SVG, EMF, WMF, EPS or TXT is refused before any charge (since v2.17.6): 422 scanned_input. Set allow_raster_only=true to get the image wrapped in a vector or CAD format, charged at the raster rate. TXT stays refused.

Plans, current prices and the full billing rules: api.visual-integrity.com/docs/billing. Enterprise and volume terms: support@visual-integrity.com.


Built for

Visual Integrity is an Open Design Alliance (ODA) member, for interoperability with CAD formats.


Documentation and support

© Visual Integrity Technologies LLC, Portland, Maine