invoices

Clean up a camera photo and return enhanced JPEG bytes

Run the document-digitalization pipeline (perspective correction + CLAHE

  • unsharp mask) on a camera photo and return the result as a JPEG so the frontend can show it in the preview tile and feed it into the QR reader.

Stateless — no DB writes, no S3 writes. PDFs are rejected (the save-side flow already handles them). On any CV failure or unsupported input we return the original bytes so the frontend can stay simple — it always gets some bytes back.

post/api/invoices/digitalize-image

Headers

x-api-tokenstring nullable

Response

Successful Response

{"stackTrail":"paths:/api/invoices/digitalize-image:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes