Overview
UniAI turns a PDF into structured JSON. Upload an invoice and you get back the invoice number, the parties, the line items and the totals as fields you can read in code, without writing a parser or a set of regexes per vendor layout.
It is the one UniDoc product that is not a library. There is nothing to install and no license key to load in code: it is a hosted HTTP endpoint on UniCloud that you call with your API key.
How it works
One request does the whole job.
| Step | What happens |
|---|---|
| You POST a PDF | multipart/form-data to /api/uniai/extract/{type}, with your key in X-API-KEY |
| Text is extracted | UniPDF pulls the text out of each page, preserving layout |
| A model fills the schema | The text is matched against the schema for the type you asked for |
| JSON comes back | The fields the model found, as a JSON object |
Because the first step is real text extraction rather than OCR, a PDF that already contains
text is both fast and accurate. A scanned PDF has no text to extract, which is what the
is_scanned flag is for: it also renders each page to an image so the model has something
to read. See scanned documents.
What it extracts
Two document types today.
| Type | Path | Covers |
|---|---|---|
| Invoice | /extract/invoice | Numbers and dates, seller and customer, line items, subtotal, taxes, total, notes |
| Resume | /extract/resume | Name and contact, summary, education, work history, skills, certifications, languages, projects, references |
The path segment is resume, not cv. /extract/cv returns a 400.
Limits to plan around
These are hard limits in the service, not guidance.
Three pages per request. A PDF with four or more pages is rejected with
only up to 3 pages are supported for extraction. Split longer documents and send the pages
that carry the data.
Five requests per second per API key. Above that you get HTTP 429. Batch work needs throttling on your side.
Credits are counted per page rather than per document, so a three-page invoice costs three.
Every field is optional in practice. The schema marks some of them required, and the response still omits anything the model did not find. Treat the whole object as best-effort and check before you read. See why is a field missing?
Your documents leave your machine
Unavoidably, and this is the honest difference from the rest of UniDoc. UniPDF, UniOffice and the UniHTML client all process documents on hardware you control. UniAI is a hosted service, so the PDF is uploaded to UniCloud, and the text extracted from it is passed to a third-party language model provider under contract to UniDoc.
That rules UniAI out for documents that cannot leave your infrastructure, and it is the first thing to raise in a review. Does UniAI send my documents anywhere? sets out what is sent, what is not, and what to use instead when the answer has to be “nothing leaves”.
Where to look
| Section | Covers |
|---|---|
| Getting started | Get a key and make your first extraction. |
| Guides | The invoice and resume schemas field by field, and scanned documents. |
| FAQ | Supported types, limits, missing fields, privacy, error codes. |