Extract data from a PDF
Structured data, checked in code where it can be:
invoice: numbers, dates, parties, lines and totals; lines, subtotal, tax and total are added up and compared.statement: a bank statement's transactions; totals and balances compared with the statement's own figures.tables: every table, cell by cell, with its page.schema: your own JSON Schema (an object, up to 20 KB).unverifiedlists values that couldn't be found in the document's text. Price: 2 credits per page read.
POST /v1/ai/extract
Request
curl -X POST https://api.fynepdf.com/v1/ai/extract \
-H "Authorization: Bearer $FYNEPDF_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","type":"invoice"}'Body
| Parameter | Type | Required | What it does |
|---|---|---|---|
file_id | string | yes | |
type | "invoice" · "statement" · "tables" · "schema" | yes | |
schema | object | For type schema: a JSON Schema object. | |
instructions | string |
Response
The data and its checks.
| Field | Type | Required | What it does |
|---|---|---|---|
object | "extraction" | yes | |
type | string | yes | |
data | object | ||
checks | array of object | yes | |
unverified | array of string | yes | |
pages_read | array of integer | yes | |
credits | integer | yes | |
test | boolean |
Errors
Errors are problem details (RFC 9457) with a code you can branch on and a request_id for support.