Skip to content
Fourohtwo

Decode a barcode or QR code from an image

agent402.tools/api/barcode-decode

Decode a barcode or QR code from an image. Send a base64 PNG or JPEG (or a data: URL); returns the decoded text and the symbology. Reads QR, DataMatrix, and 1D barcodes (EAN/UPC/Code39/Code128/ITF/Codabar). Deterministic, no network, no model.

SolanaBaseUnchecked
POSThttps://agent402.tools/api/barcode-decode

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agent402.tools/api/barcode-decode", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"image":"<1052 characters; the full example is in /openapi.json>"}),
});
console.log(await res.json());

Example input

{
  "image": "<1052 characters; the full example is in /openapi.json>"
}