Oligon Receipts is in private beta — request access.
API reference
POST /v1/extract

POST /v1/extract

Uploads a single document and returns the extracted, structured receipt.

POST https://api.receipts.oligontech.com/v1/extract
Content-Type: multipart/form-data
X-API-Key: sk_live_...

Parameters

NameInTypeRequiredDescription
fileform-datafileyesImage (JPG, PNG, HEIC, WEBP, TIFF) or PDF, up to 15 MB.
accuracyform-datastringnostandard (default, Haiku 4.5) or high (Sonnet 4.6). High mode bills 5 credits per receipt instead of 1; pick it for crumpled, low-light, or handwritten documents.
typeform-datastringnoHint: receipt, invoice, nfe, nfce, nfse, cupom_fiscal.
metadataform-dataJSONnoArbitrary tags (≤16 keys, ≤256 chars per value).
webhook_urlform-dataURLnoPer-request callback override. Falls back to org default.
Idempotency-KeyheaderstringnoUUID-like value. Replays return the original receipt for 24 h.

Accuracy modes

ModeModelLatency (typ.)BillingWhen to use
standardClaude Haiku 4.5 Vision~2–4 s1 creditDefault. Clean printed receipts, NF-e/NFC-e PDFs, modern POS prints.
highClaude Sonnet 4.6 Vision~5–8 s5 creditsCrumpled, faded, photographed at angle, handwritten, low-light, or multi-language receipts where standard returns low confidence.

Most production traffic should run on standard. Use high selectively (e.g. after standard returned confidence < 0.85).

Examples

curl https://api.receipts.oligontech.com/v1/extract \
  -H "X-API-Key: $OLIGON_API_KEY" \
  -H "Idempotency-Key: 5ddef0..." \
  -F "file=@receipt.jpg" \
  -F "type=nfe" \
  -F "accuracy=standard" \
  -F 'metadata={"order_id":"ord_42","tenant_id":"tnt_x"}'

Response — 200 OK

{
  "id": "rcp_01HQX...",
  "org_id": "org_01HQX...",
  "status": "completed",
  "type": "nfe",
  "merchant_name": "Padaria Bom Pão Ltda",
  "merchant_tax_id": "12.345.678/0001-90",
  "issued_at": "2026-06-08T14:32:11-03:00",
  "total": "47.50",
  "subtotal": "44.00",
  "tax": "3.50",
  "currency": "BRL",
  "document_number": "000.012.345",
  "document_key": "352606123456780...",
  "line_items": [
    { "name": "Pão francês", "qty": "10", "unit_price": "1.20", "total": "12.00" }
  ],
  "confidence": 0.97,
  "created_at": "2026-06-08T14:32:14Z",
  "updated_at": "2026-06-08T14:32:16Z"
}

Errors

StatusCodeCause
400unsupported_formatFile MIME type not in the allow-list.
400file_too_largeFile >15 MB.
401unauthorizedMissing/invalid/expired API key.
403insufficient_scopeKey lacks write.
422low_confidenceDocument unreadable; consider re-uploading at higher resolution.
429rate_limit_exceededSee Rate limits.
5xxserver_errorTransient — retried automatically by the SDKs.

extract is idempotent on the SHA-256 of the file body within a 24 h window. Resending the same file (with or without Idempotency-Key) returns the cached receipt and is not billed twice.