Documentation menu

Guides

Sending a document

Upload a file, several files or a link, what you get by default, every option you can switch on, and what the 202 response means.

In short: post a file (or a link) to /documents, with optional settings in options. You get an id back straight away.

How Send it as Options go in
One file multipart/form-data, part file a form part called options, holding a JSON string
Up to 10 files repeated files[] parts (keep the brackets) the same options string, used for every file
A link a JSON body with url; we download it options, as a normal JSON object

File types

PDF, PNG, JPEG, TIFF, BMP, HEIF, Word (DOCX), Excel (XLSX) and PowerPoint (PPTX). We check the file's actual bytes, not its name or header, and count a PDF's pages before anything is spent. A PowerPoint page is a slide, an Excel page is a sheet (each sheet comes back as a table), and a Word page is about 3,000 characters of text.

Size limits

Free trial: 20 pages and 20 MB per document. Pay as you go: 1,000 pages and 200 MB. Over the size is a 413, over the pages a 422. Read your limits from GET /account.

A few checks run before the work starts (your key, the file type, the size, the page count, your credit, the options). If one fails you get the error straight away and nothing is charged. Otherwise you get 202 Accepted:

202 Accepted
{
  "id": "8f1c2d3e-…",
  "object": "document",
  "status": "queued",
  "estimated_cost_micro": 60000,
  "poll_url": "https://northdoc.northcape.tech/api/v1/documents/8f1c2d3e-…"
}
  • id is the document. Keep it; every other call needs it.
  • estimated_cost_micro is how much credit is held while it runs, in millionths of a US dollar (60000 is 6 cents). You are charged the real cost at the end, usually less. For a link it is null until the file has been downloaded and measured.
  • poll_url is where to check on it.

What you get, and what you can add

With no options at all, every page is read (its text, tables, labelled fields and layout) and its pictures are taken. That is all: no AI model runs, you pay only for the pages, and the finished document's result is null. Everything else is switched on in options:

Option Default What it does Costs
analysis "layout" Reads the text, tables, labelled fields, figures and layout of every page. "read" is OCR only. US$0.025 a page (`read`: US$0.004)
images true Crops the figures and keeps scanned and picture-heavy pages, for GET /images. false takes none. Included
embeddings off A vector per page for your own search or model: true, or pick the dimensions. Compass tokens
markdown off The whole document as markdown too. Included
extraction off The model fills result.data: built-in fields like summary and parties, your own schema, or both. Model tokens
queries off The model answers your questions into result.answers. Model tokens
model "auto" Which model reads the document, when one runs. Swift or Summit rates
retention_seconds 86400 How long the result is kept after it completes. Free

The model only runs for an extraction or queries. Every option, with its limits, is on Submit a document.

Just want the text, vectors and pictures? Send {"embeddings": true}. No AI reads the document: you pay for the pages and the vectors, and get the pictures from the images endpoint.