Docs
Quickinvoice API
Invoice parsing for PDFs, scans and photos. The product is in beta and reads English-language invoices and receipts. The API is served from https://quickinvoice-api.msrisktec.co.in.
Quick start
Send one invoice per request as multipart form data, in a field called file, with your key in the Authorization header. No key yet? Request one, or try the demo first.
curl -X POST "https://quickinvoice-api.msrisktec.co.in/v1/invoice" \
-H "Authorization: Bearer inv_..." \
-F "file=@invoice.pdf"import requests
with open("invoice.pdf", "rb") as f:
r = requests.post(
"https://quickinvoice-api.msrisktec.co.in/v1/invoice",
headers={"Authorization": "Bearer inv_..."},
files={"file": f},
)
inv = r.json()
print(inv["fields"]["total"]["value"]) # 207.6
for line in inv["line_items"]:
print(line["description"], line["amount"])
if inv["needs_review"]:
print("check by hand:", inv["needs_review"])const form = new FormData();
form.append("file", fileInput.files[0]); // PDF, JPG, PNG, WEBP or TIFF
const res = await fetch("https://quickinvoice-api.msrisktec.co.in/v1/invoice", {
method: "POST",
headers: { Authorization: "Bearer inv_..." },
body: form,
});
const inv = await res.json();
console.log(inv.fields.invoice_number?.value, inv.fields.total?.value);
console.log(inv.line_items.length, "lines;", inv.needs_review.length, "to review");POST /v1/invoice
| Part | Value |
|---|---|
URL | https://quickinvoice-api.msrisktec.co.in/v1/invoice |
Authorization | Bearer inv_... |
file | PDF, JPG, PNG, WEBP or TIFF, up to 20 MB and 20 pages. |
PDFs with a text layer are read directly and usually take under a second. Scanned PDFs and images go through OCR and take about 1 to 3 seconds a page. Photos are turned upright from their EXIF orientation, and tilted pages are straightened.
Files are read in memory and never written to disk. Only the page count is recorded, for usage.
Response
{
"fields": {
"seller_name": { "value": "Acme Supplies Ltd", "confidence": 1.0, "page": 1,
"box": [84, 47, 214, 61], "check": "none", "status": "ok" },
"invoice_number": { "value": "INV-20931", "confidence": 1.0, "status": "ok", ... },
"invoice_date": { "value": "2026-10-14", ... },
"due_date": { "value": "2026-11-13", ... },
"buyer_name": { "value": "Globex Trading LLP", ... },
"subtotal": { "value": 173.0, "check": "passed", "status": "ok", ... },
"tax": { "value": 34.6, "check": "passed", "status": "ok", ... },
"total": { "value": 207.6, "check": "passed", "status": "ok", ... },
"currency": { "value": "GBP", "confidence": 1.0, "status": "ok" }
},
"line_items": [
{ "item_code": null, "description": "Copper pipe 15mm", "quantity": 10.0,
"unit_price": 12.5, "amount": 125.0, "confidence": 1.0, "page": 1,
"check": "passed", "status": "ok" },
...
],
"checks": { "lines_match_subtotal": true, "subtotal_plus_tax_equals_total": true },
"needs_review": [],
"pages": 1,
"read_from": ["text"],
"ms": 675
}| Key | Meaning |
|---|---|
fields | The invoice header fields that were found. A field that is not on the invoice is left out. |
line_items | One object per row of the item table, top to bottom, across all pages. |
checks | Whether the lines add up to the subtotal, and whether subtotal + tax = total. null when there was nothing to check. |
needs_review | Names of fields and line items (line_items.3) whose status is review. |
pages | Pages read, which is what counts toward your plan. |
read_from | Per page: text (PDF text layer) or ocr. |
ms | Time spent on the server. |
Fields
| Field | Value |
|---|---|
seller_name | Who issued the invoice, as printed. |
buyer_name | Who it is billed to (not the ship-to party). |
invoice_number | As printed, without the label. |
invoice_date | ISO date, 2026-10-14. Day-first unless the invoice is in US dollars without VAT/GST. |
due_date | ISO date. |
subtotal | Number, before tax. |
tax | Number. Split taxes such as CGST + SGST are added up when that makes the total add up. |
total | Number, the amount due on the invoice. |
currency | ISO code such as GBP, EUR, INR, USD, from the symbol or code printed. |
Each field is an object with value, confidence (0 to 1), page, box (where it is on that page, as x0, y0, x1, y1 on a 0 to 1000 scale), check and status.
Line items
Each row has item_code, description, quantity, unit_price, amount, confidence, page, check and status. A column the invoice does not have is null. Descriptions that wrap onto a second line are joined.
Checks and status
| Check | Confirms |
|---|---|
| quantity × unit price = amount | that row's quantity, unit price and amount |
| sum of line amounts = subtotal | subtotal (a mismatch fails the line amounts) |
| subtotal + tax = total | subtotal, tax and total |
check is passed, failed or none (nothing to check it against). status is ok when a check passed, or when nothing contradicts the value and the confidence is at least 0.85. Anything else is review. On our test set 98.7% of ok fields were right, so a common setup is to post ok invoices automatically and send needs_review to a person.
Authentication
Every request except the demo needs Authorization: Bearer inv_.... Keys are issued by hand during the beta. Keep the key on your server: anyone with it can spend your pages.
Usage
curl "https://quickinvoice-api.msrisktec.co.in/v1/usage" -H "Authorization: Bearer inv_..."{
"key": "my-app",
"plan": "starter",
"monthly_pages": 2000,
"this_month": { "pages": 312, "requests": 290 },
"months": { "2026-11": { "pages": 312, "requests": 290 } }
}Errors
Errors come back as JSON with a detail message.
| Status | When |
|---|---|
| 400 | Empty file, or more pages than the limit. |
| 401 | Missing or unknown API key. |
| 413 | File larger than 20 MB. |
| 415 | The file is not a readable PDF or image. |
| 429 | Free plan used up for the month, or the demo limit reached. |
Limits
| Plan | Price | Pages |
|---|---|---|
| Free | $0 | 100 pages/month |
| Starter | $19/month | 2,000 pages |
| Pro | $49/month | 10,000 pages |
A page is one page of a PDF or one image. Free stops at its allowance; paid plans keep working. One request takes up to 20 pages and 20 MB. The demo on the home page needs no key and takes files up to 5 MB and 2 pages, 5 pages a day per visitor.