API Reference

The written reference for the Visual Integrity PDF Intelligence API — every endpoint a customer can use, with examples. For interactive exploration, use the live demo at api.visual-integrity.com/demo.


Authentication

Most endpoints require an API key, sent as a Bearer token:

Authorization: Bearer vi_your_api_key

Get a key from the demo page, or programmatically:

curl -X POST https://api.visual-integrity.com/v1/request-key \
  -H "Content-Type: application/json" \
  -d '{"name": "Your Name", "email": "you@example.com"}'

name and email are both required. This endpoint is rate-limited per IP and returns 409 if a key already exists for the email (existing keys are never re-displayed; contact support to have one reissued). New keys start on the free tier (500 credits). The key works on the hosted API only: it carries no Docker engine licence, and the response says so in self_hosting. Self-hosted licences are issued to contracted customers (support@visual-integrity.com). See Billing & Overage.


The async model

/v1/convert returns a job_id immediately (202), not the file. Poll the job, then download when it's completed. /v1/extract is different: it answers in the same request with the objects as JSON (200), so there is no job to poll.

Every metered call keeps its result (from v2.18.5). /v1/extract, /v1/extract/summarize and the metered /v1/ops/* still answer in the same request, exactly as before, and each answer now carries an X-Job-Id header. If your connection drops, the work still finishes, is charged once, and its result waits for you: GET /v1/jobs/{id} (status, kind) and GET /v1/jobs/{id}/download (the same answer: status, headers and body). GET /v1/jobs lists your recent jobs, newest first.

# 1. submit
curl -X POST https://api.visual-integrity.com/v1/convert \
  -H "Authorization: Bearer vi_your_api_key" \
  -F "file=@drawing.pdf" -F "output_format=dwg"
# -> { "job_id": "3f4a...", "status": "queued", "status_url": "/v1/jobs/3f4a..." }

# 2. poll
curl https://api.visual-integrity.com/v1/jobs/3f4a... \
  -H "Authorization: Bearer vi_your_api_key"
# -> { "status": "completed", "download_url": "/v1/jobs/3f4a.../download" }

# 3. download
curl -O https://api.visual-integrity.com/v1/jobs/3f4a.../download \
  -H "Authorization: Bearer vi_your_api_key"

Conversion & Extraction

POST /v1/convert — API key

Convert a PDF to another format. Multipart form: file (required), output_format (required), options (optional JSON blob), zip (optional — see below), allow_raster_only (optional, for scanned PDFs — see below).

curl -X POST https://api.visual-integrity.com/v1/convert \
  -H "Authorization: Bearer vi_your_api_key" \
  -F "file=@drawing.pdf" \
  -F "output_format=dwg" \
  -F 'options={"dxf_appl":"autocad2004","dxf_layers":"DXF_PDFLAYERS"}'

Notes: use output_format (not format); conversion options go inside the options JSON (e.g. {"tiff_dpi":150}, {"chars2paths":"1"}). AutoCAD version accepts only autocad2004 | autocad2000 | cadra. Full option list + per-format applicability: Conversion Options.

Option values (since v2.15.3). A refused option or value is a 400 with error: invalid_options. Each item of option_errors names the option (key), gives a code and says what is wrong (problem). Nothing is kept and nothing is charged.

-F 'options={"map_font":[["Arial,Bold","NORMAL","Arial","BOLD"],["Helvetica","NORMAL","Arial","NORMAL"]]}' A single mapping can still be sent as one string, "\"Arial\", NORMAL, \"Helvetica\", NORMAL".

{"detail": {"error": "invalid_options",
            "option_errors": [{"key": "messages_filename", "code": "option_not_allowed",
                               "problem": "messages_filename is not available: the engine's messages are not written to a file chosen by the caller"}],
            "option_warnings": []}}

zip — delivery packaging (API-layer control, not a conversion option). Default false: the API returns the individual output files. A multi-page raster conversion (e.g. a 10-page PDF → PNG) produces one file per page; fetch each via the per-file download_urls listed in the job status. Set zip=true to package multi-file output as a single .zip for a one-click download (the web UI does this). Single-file output is never zipped either way. zip controls only how VI packages the response — it has no engine/SDK equivalent, so it is documented here and not in Conversion Options (which is exclusively SDK/INI engine options). New parameters that control API behavior rather than the engine (response shape, packaging, download selection) belong in this document, not there.

POST /v1/extract — API key

Extract every vector object on the page as structured JSON — typed, positioned in millimeters, with layer, pen, fill, and geometry.

curl -X POST https://api.visual-integrity.com/v1/extract \
  -H "Authorization: Bearer vi_your_api_key" \
  -F "file=@drawing.pdf"

Form fields: file, page (1-based; 0 = all pages), chars2string (1|2|3, default 2), no_text, no_images, no_paths, and include_crops (default false).

include_crops — Clip-state ("crop") objects, new in engine SDK 14.2026.8.9, are off by default. They mark where the page's clipping region changes; they are not drawn geometry, and on some pages they outnumber real objects 10:1. Set include_crops=true to receive them as type: "crop" objects (geometry: closed, segments, segment_count, clip_enabled) and a crops count in each page summary. Suppressed crops do not consume object ids, so ids are unchanged from earlier versions.

page_classes (additive, from v2.18.0): each extracted page's label and price class, read from the extraction's own objects, over the pages you asked for. Given when no object type is suppressed (no_text, no_images and no_paths all off).

"page_classes": {"document": "LIVE", "pages": [{"page": 1, "label": "LIVE", "price_class": "drawing"}]}

Coordinate system (v2.9.0 — breaking change from v2.8.x)

Every extract response carries a coordinate_system block and an engine block:

"engine": { "sdk_build": "14.2026.8.9", "sdk_date": "22 August 2026" },
"coordinate_system": { "version": 2, "units": "mm", "origin": "lower-left of the page",
                       "x_axis": "right", "y_axis": "up", ... }

From v2.9.0 every y value is y-up, measured from the bottom of the page: bbox.y1 is the bottom edge and bbox.y2 the top edge; position, points, contours and ellipse center use the same frame. position.y always lies inside [bbox.y1, bbox.y2] — measured on 287 pages across 17 page sizes (A4, A3, Letter, 279×432, and others), 100% of text, polyline, polygon, path and ellipse objects satisfy this.

Before v2.9.0 (engine SDK 14.2026.8.5 and earlier) bbox y values were top-down while position, points and contours were bottom-up, and the top-down values were computed against a fixed ~280 mm constant, which was wrong on any non-Letter page. A response with no coordinate_system block is from that older engine — treat its bbox.y* as top-down. Code that read bbox.y1 as "distance from the top" must change; to get the distance from the top of the page, use page_size.height_mm - bbox.y2.

extractor block. Every extract response also names the extraction build that produced it:

"extractor": { "name": "pdf_objects_json", "build": "2026.11.02-utf8" }

geometry.invalid_chars. Appears on a text object only when it is above zero. It counts the characters in that run that were not valid Unicode. Each one appears in geometry.content as U+FFFD (�) rather than as a guess at the intended character, so a run with this field may not read exactly as the page does.

Time limit. /v1/extract stops at 120 seconds and answers 504. Very large sheets can reach this limit: extract them one page at a time with the page field, and expect large answers (one drawing page took 73 seconds and returned 137 MB of JSON).

Scanned or image-only PDFs are not charged (from v2.17.5). When the extracted pages hold no text and no vector geometry (for example a scan: only images), /v1/extract answers 422 {"error": "no_extractable_content", "message": "...", "credits_charged": 0} and charges nothing. It is judged from the extraction itself, over every page asked for: one page with text or drawn geometry is enough to be charged as usual. With no_text or no_paths set, the result is not judged and is charged as before. OCR is not supported.

Text anchor. geometry.position of a text object is the start of its baseline, not a box corner. Measured on 59,252 text objects: at rotation 0, position.x == bbox.x1 exactly, and position.y lies above bbox.y1 by the font descent (0.1–6.9 mm). At rotation 90, position.y == bbox.y1 (853 of 854 objects) and position.x lies inside the box at the baseline. At rotation −90 the mirror rule (position.y == bbox.y2) held for 3 of the 5 objects present in the test corpus, which is too few to state as a guarantee.

POST /v1/extract/summarize — API key + your AI provider key (BYOK)

Turn a /v1/extract result into a plain-language document characterization — what the document is, what its geometry represents, and expert observations — reasoning over the extracted vector objects, not a rendered image.

This is the second step after /v1/extract: send the pages array from an extract response as JSON, plus your AI provider and key. It does not take a PDF file.

curl -X POST https://api.visual-integrity.com/v1/extract/summarize \
  -H "Authorization: Bearer vi_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "anthropic",
    "api_key": "sk-ant-your-own-key",
    "pages": [ /* the "pages" array from a /v1/extract response */ ]
  }'

provider = anthropic | openai | gemini; api_key is your own provider key (required — no server fallback). Optional: model (any model your provider offers, by its API name: letters, digits and . _ : -; when omitted, the server's default for that provider, a setting: AI_MODEL_ANTHROPIC, AI_MODEL_OPENAI, AI_MODEL_GEMINI), system_prompt, user_question, and coordinate_system (echo the extract response's block so text is ordered top-to-bottom correctly; omit it only for output from v2.8.x or earlier). Charges a Visual Integrity orchestration fee in credits (refunded if the provider call fails); your AI provider bills its usage on your key. If the provider doesn't know the model or has retired it, the answer is 422 with error: "model_unavailable", field: "model", the model and whether it came from your request or the server's default (model_source); the fee is refunded and nothing else is tried in its place. A model with other characters is refused with 422 invalid_model before any charge.

GET /v1/formats — public

List supported input/output formats and the full conversion options schema.

curl https://api.visual-integrity.com/v1/formats

Jobs

MethodPathAuthPurpose
GET/v1/jobs/{id}API keyJob status and results
GET/v1/jobs/{id}/downloadAPI key, in the Authorization header only (a key in the URL is not accepted)Download output (see below)
GET/v1/jobsAPI keyList your recent jobs
DELETE/v1/jobs/{id}API keyDelete a job, its upload and its output files. Do this after each download

Downloading output

GET /v1/jobs/{id} lists every output file under output_files[], each with its own download_url; download_zip_url is present only when zip=true produced an archive. GET /v1/jobs/{id}/download then behaves by result shape:

Result/download returns
single filethe file directly — native content-type and extension
zip=true was setone .zip archive (application/zip) containing every page
multiple files, default (no zip)HTTP 300 with a JSON listing of each file + its download_url (never silently just the first page)
?file=<name>that one specific output file by name (from output_files[].name), native content-type — used to fetch individual pages of an unzipped multi-page result

PDF Operations

Available when the server has PDF Operations enabled (FEATURES_PDF_OPS=true — on by default in the hosted API; set the env var for self-hosted). All take an uploaded PDF and require an API key.

Free (informational):

PathPurpose
POST /v1/ops/preflightClassify a PDF, and quote an extraction (quote_credits, quote)
POST /v1/ops/page-countCount pages
POST /v1/ops/layer-listList named PDF layers (OCG)

/v1/ops/preflight quote (from v2.18.0): quote_credits and quote price an extraction of every page before you run it.

Metered: split costs 5 credits per call; extract-images 5 credits per counted image (duplicates and images under 32 × 32 px or 2 KB are not counted; at most 25 a page); diff costs 30 credits per call, whatever the page count. Results with nothing in them are not charged (from v2.17.5): extract-images that finds no images answers 200 "No images found in this PDF. No credits were charged." with "metering": {"credits_charged": 0}, and a diff where neither file has a text run on the compared pages answers 422 no_extractable_content: the diff compares text runs only, so this covers a scanned pair and also a pair of drawings without any text, which before cost 5 credits for "0 changes".

PathPurpose
POST /v1/ops/splitExtract a page range as a new PDF
POST /v1/ops/extract-imagesExtract embedded raster images as a ZIP
POST /v1/ops/diffDiff two PDFs (text-run changes from the vector stream). Run counts can differ from versions before v2.9.0 because text is now joined more completely

/v1/ops/extract-images returns each image as stored in the PDF. A page can place an image flipped (a negative vertical scale in its placement), so an extracted image may look upside down compared with the page. The placement of every image on a page is in /v1/extract: the image object's geometry.matrix (yy below 0 means the page draws it flipped vertically).

What the ZIP holds, and what is counted (from v2.18.4). Every image in the PDF is in the ZIP; an image repeated exactly (a logo on every page) is in it once, under the page where it first appears. The response headers: X-Image-Count (images in the ZIP), X-Images-Duplicate (repeats left out), X-Images-Small (images under 32 × 32 px or 2 KB: in the ZIP, not counted) and X-Images-Billable (the images that count, at most 25 per page; a page with 40 images delivers 40 and counts 25). The charge is still 1 credit per page; X-Images-Billable is the count a future per-image price will use. Nothing is charged when no image counts (only small ones), or when the PDF has no images (200 with "images": []). Preflight's quote_extract_images gives today's charge as a ceiling (credits, per page; 0 for a PDF with no images) and billable_images, a ceiling on X-Images-Billable.

/v1/ops/diff plot warning (from v2.12.0). The response can carry an additive warnings[] array with an entry {"type": "plot_mismatch", ...} when the two PDFs look plotted differently (a different scale, page size, rotation or mirror): the diff compares positions as extracted, so moved, added and removed text is then probably overstated. Nothing else changes and the request is never refused.

/v1/ops/diff coordinates (from v2.9.0). position, from, to (y1/y2) and delta_mm.dy are y-up: measured from the bottom of the page, in millimetres, like /v1/extract. A positive dy means the text moved up the page. Before v2.9.0 these values were top-down (page height - y2 converts a v2.9.0 value to the old one). x values and delta_mm.dx (positive = moved right) are unchanged.


Failed jobs and warnings

POST /v1/convert answers 202 once the upload is accepted, so a file the engine cannot read fails later: GET /v1/jobs/{id} then shows "status": "failed", a stable error_code and a plain error message. A failed job charges no credits.

error_codeMeaning
invalid_fileThe file is empty or is not a PDF, EPS, PS or AI file
damaged_fileThe PDF is damaged or incomplete
password_protectedThe PDF needs a password
no_text_foundTXT only: the pages hold only images or drawings (for example a scan), so there is no text to return. OCR is not supported
output_incompleteTXT from a PDF only: the result was cut short, most likely because the server's disk filled up. It has fewer finished pages than were asked for. No credits are charged and nothing is kept. Free some disk space, then submit the file again
conversion_timeoutThe conversion passed the server's time limit
conversion_out_of_memoryThe conversion needed more memory than the server has and was stopped. No credits are charged. Try fewer pages with page_range, or a smaller output (a lower resolution for images)
job_lostThe server restarted while the job ran, and its result was lost. No credits are charged. Submit the file again. The job shows processing until CONVERSION_TIMEOUT plus JOB_LOST_MARGIN_SECONDS have passed: 15 minutes at a 300-second timeout, 25 minutes at 900 seconds; the server then fails it within JOB_LOST_SWEEP_INTERVAL_SECONDS (5 minutes) even if nobody asks
no_outputThe conversion finished without producing a file
license_unavailableThe server has no conversion engine licence
server_low_diskThe job was queued when the server was short of disk space, so its conversion did not start. No credits are charged. Submit the file again in a few minutes
engine_unavailable, conversion_failed, unsupported_formatAnything else; quote the job id to support

If the server's disk is full when an upload is being saved, POST /v1/convert answers 507 with "error": "insufficient_storage". No job is created, nothing is kept and no credits are charged.

If the server is short of disk space (less than MIN_FREE_DISK_MB, 1024 by default, free for temporary files or for jobs) before the upload is saved, POST /v1/convert answers 503 with "error": "server_low_disk" and a Retry-After: 60 header. No job is created and no credits are charged; try again later.

An output format that is switched off while the engine has a fault (today: cgm, since v2.17.3) is not listed by GET /v1/formats, and POST /v1/convert answers it with 422 {"error": "format_unavailable", "message": "CGM output is temporarily unavailable; use DXF or SVG."}. No job is created and no credits are charged.

A TXT job where only some pages are empty completes, is charged as usual, and carries "warnings": [{"code": "empty_pages", "pages": [2, 5], "message": "..."}].

Self-hosted containers remove files on a timer. A job's result can be downloaded until JOB_TTL_SECONDS have passed since it finished (default 3600). A failed job's files are kept for the same time. The next cleanup round then removes the upload, the output and the stored file names; a round runs every JOB_CLEANUP_INTERVAL_SECONDS (default 900; 0 turns it off). After that, GET /v1/jobs/{id} answers 200 with "status": "expired", and a download answers 410 with a plain message. The job's counts stay, for the usage export, and an expired job still counts under how it ended. DELETE /v1/jobs/{id} removes all of it at once.

A job from a PDF with no %%EOF in its last 1024 bytes still runs, and carries "warnings": [{"code": "file_may_be_truncated", "message": "..."}]. The file may have been cut short, and the engine returns only the pages it can read, so compare the page count with what you expected.

For TXT from a PDF, page_range takes all or one page. A range of several pages, such as 1-3, is refused with 422. With ascii_format UNICODE, only all is accepted: one page is refused with 422 too, because the engine would return every page.

Scanned (image-only) PDFs and vector, CAD or TXT output (from v2.17.6). Before anything is stored as a job or charged, /v1/convert checks a PDF going to DWG, DXF, HPGL, SVG, EMF, WMF, EPS or TXT. When the pages asked for (page_range) hold at least one image and no text and no vector geometry, as a scan does, it answers 422:

{"detail": {"error": "scanned_input", "credits_charged": 0,
            "message": "This PDF is image-only on the pages asked for (a scan): it has no text or vector geometry to convert to AutoCAD DXF. Set allow_raster_only=true to get the image wrapped in AutoCAD DXF, charged at the raster rate (1 credit a page), or convert to PNG, JPG, TIFF or PDF. No job was created and no credits were charged."}}

Billing

MethodPathAuthPurpose
GET/v1/billing/tierspublicSubscription tier ladder (current plans)
GET/v1/billing/balanceAPI keyCurrent credit balance and account info
POST/v1/billing/checkoutAPI keyCreate a Stripe Checkout Session -> returns a payment URL
GET/v1/billing/subscriptionAPI keyCurrent subscription status
POST/v1/billing/subscription/cancelAPI keyCancel an active subscription at period end

Subscribers also have a self-service portal at /portal (masked key, balance; monthly plans for licensed Docker accounts). Credit weighting and overage behavior: Billing & Overage.

Docker credential recovery: GET /v1/license/bundle (API key) re-issues the engine-license bundle of a contracted self-hosting customer's key if you need to recover it. Any other key, including a free trial key, gets 403.


Utility

MethodPathAuthPurpose
GET/healthpublicHealth/status check (component readiness, capabilities)

Known limitations