# agent402.tools Barcode & QR Code Decoder

> agent402.tools Barcode & QR Code Decoder is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Decodes a barcode or QR code from a base64-encoded image, returning the decoded text and symbology type

## Facts

- Endpoint: POST https://agent402.tools/api/barcode-decode
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-barcode-qr-code-decoder-0bdeb643
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xNTvQGi8CGPr4c5WzLbK2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-barcode-qr-code-decoder-0bdeb643 -d '<json body>'
```

Example prompt: Can you decode this barcode image for me? Here it is as a base64 PNG: <base64string> — I need to know what the barcode says and what type it is.

## When to prefer this

Use this endpoint when you need to deterministically decode a barcode or QR code from a base64 image without calling an external model or network service. Ideal for agentic pipelines that need fast, offline-style barcode reading with no AI inference cost. Supports a broad range of symbologies including QR, DataMatrix, EAN, UPC, Code39, Code128, ITF, and Codabar.

## Known failure modes

- No barcode found in image — returns error or empty result
- Unsupported image format — only PNG and JPEG accepted
- Malformed base64 input — decoding fails with parse error
- Image too blurry or low-resolution for reliable decoding
- Multiple barcodes in image — may return only one or ambiguous result

## How this service works

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.

## Output

Returns the decoded text content of the barcode or QR code, along with the symbology (e.g. QR, DataMatrix, EAN-13, UPC-A, Code128, Code39, ITF, Codabar) detected in the image.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image": {
   "type": "string",
   "description": "base64-encoded PNG or JPEG, optionally a data: URL"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "AGENT402",
  "found": true,
  "format": "QR_CODE",
  "decoder": "zxing"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-barcode-qr-code-decoder-0bdeb643/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
