Easiest way to capture SKU and price data within retool from a photo?

  1. My goal: To add a feature which automatically extracts the SKU and price from a clothing tag or label and converts it to text which can be stored within the app.
  2. Issue: I am unsure of the best API/ OCR to use and wondered if anyone had similar experience capturing specific data from a photo and what worked best in terms of speed and also low cost options.

Hi - I’ve never done this before!

But… one suggestion would be to use an LLM which is Vision capable such as GPT-4o-mini or Gemini 1.5/2.0 Flash. Via REST API, you could send the image and ask it to extract the information you require from the tag as a JSON response.

You don’t mention whether you require to extract the SKU from the barcode, but presumably you would need to do that also, there are various libraries available to read barcodes, so you could use one of these. There is also a Retool barcode scanner here: New: Scanner V2

Also:
Free: zxing-js

Paid: strich

If you need help with any of this, I am a software contractor and could potentially work on it for you.

Good luck!

Hey @Amy_BLuk Amy, welcome to the Community! :raising_hands:

Thanks for your input, great suggestions from @Jon_Steele! Spot on that a vision-capable LLM and the Scanner component are the right tools for this. Just wanted to add that you actually don't need to wire up a custom REST API call for the vision piece, Retool has this built in natively.

1. Extracting printed text from a label (SKU, price, size, etc.)

Retool has a built-in AI query type with a native "Extract entity from image" action, no custom REST API needed. It supports OpenAI, Anthropic, Google Gemini, and Amazon Bedrock as providers. You can pass an image, prompt the model to return structured JSON, and write it straight to your database.

Docs: AI queries guide and AI integrations

2. Reading a barcode from the label

Retool has a native Scanner component for barcode/QR scanning on mobile, as Jon mentioned. There's also a newer Scanner V2 with improved reliability.

Hope this helps! :folded_hands:

1 Like