Server-side fallback for in-browser Tesseract.js OCR. Uploads a single product photo (JPEG/PNG/GIF/WebP) to Bedrock Vision, asks the vision model for barcode digit sequences, then keeps only candidates that pass the GS1 mod-10 check digit. The response is always shaped — on any backend failure it returns an empty candidates list rather than surfacing the error, so the calling UI can fall through to a manual-entry prompt without bespoke error handling.
Documentation Index
Fetch the complete documentation index at: https://docs.closient.com/llms.txt
Use this file to discover all available pages before exploring further.
Product photo to scan for GTINs (JPEG, PNG, GIF, or WebP).
OK
Validated GTIN candidates extracted from a product photo.
Zero or more GTIN candidates that pass the GS1 mod-10 check digit. Strings are zero-padded to 14 digits. Empty when the model returned nothing usable or Bedrock errored — callers should treat empty as 'OCR found no GTIN' rather than a transport failure.
GTIN barcode digits. Accepts 8/12/13/14 digit forms; the resolver and storage layers normalize to GTIN-14 by left-padding with zeros.
^\d{8,14}$Backend that produced the candidates. Currently always bedrock; reserved as an enum for future server-side OCR fallbacks.
bedrock "bedrock"