Ocost API · v1

Invoices in. Structured data out.

Send a PDF, a photo or an e-invoice. Ocost reads it, files it and returns every value with the place on the page it came from.

Hosted in the EU · Documents never train a model · REST, MCP and OAuth

Request

curl https://api.ocost.io/public/v1/files \
  -H "Authorization: Bearer ocost_sk_7Hq2…" \
  -F "file=@RE-2026-0418.pdf"

Response · the document as read

200 OK
A made-up invoice page with five numbered marks: 1, the supplier's name, and 2, its VAT ID, at the top left; 3, the invoice number and date, at the top right; 5, the lines, in the middle; 4, the total, at the bottom right.12354
Supplier
Holzbau Meier GmbH
VAT ID
DE123456789
Invoice
RE-2026-0418 · Nov 12, 2026
Total
€4,820.00 · VAT 19 %
Lines
Spruce beams 6 m · Delivery · Assembly

GET /public/v1/files/{file_id}/document → ocost.document.v1 · made-up example

Start here

For AI agents

Point your agent at these and it uses Ocost correctly.