# QR/Barcode Decoder API

> QR/Barcode Decoder API is a paid API for AI agents from qr-api-production-1836.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Decodes one or more QR codes or barcodes from a base64-encoded image, returning each code's type, decoded text, bounding rectangle, and polygon coordinates.

## Facts

- Endpoint: POST https://qr-api-production-1836.up.railway.app/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/qr-barcode-decoder-api-110473bd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZCsXOc-YKOxUtLiELfQNb

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 qr-barcode-decoder-api-110473bd -d '<json body>'
```

Example prompt: Can you decode this QR code image for me and tell me what text or URL it contains? Here's the base64-encoded PNG: iVBORw0KGgo...

## When to prefer this

Use this endpoint when you need to programmatically read QR codes or barcodes embedded in images, especially when you have the image as a base64 string or data URI. It returns structured spatial data (bounding boxes, polygons) in addition to decoded text, making it suitable for both simple text extraction and layout-aware document processing. Prefer this over manual scanning or OCR-only tools when the input is specifically a QR or barcode image.

## Known failure modes

- No codes detected in image — returns empty array
- Invalid base64 string causes a 400 error
- Unsupported image format returns an error
- Blurry or low-resolution image may result in failed detection
- Truncated or malformed base64 payload causes decode failure
- Payment not provided or insufficient — returns 402 Payment Required

## How this service works

Decode QR/barcodes from a base64-encoded image; returns each detected code's type, decoded text, bounding rect, and polygon.

## Output

An array of detected code objects, each containing the barcode/QR type (e.g. QRCODE, EAN13), the decoded text or URL, a bounding rectangle (x, y, width, height), and a polygon outline of the code's position within the image.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image_base64": {
   "type": "string",
   "description": "Base64-encoded image (PNG/JPEG/GIF) containing one or more QR codes. A data: URI prefix is allowed."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qr-barcode-decoder-api-110473bd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from qr-api-production-1836.up.railway.app](https://www.zero.xyz/host/qr-api-production-1836.up.railway.app/llms.txt)
