# QR Code Decode API

> QR Code Decode API is a paid API for AI agents from qr.payapi.market, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Decodes one or more QR codes from a base64-encoded image, returning the embedded data, position, and type for each detected code

## Facts

- Endpoint: POST https://qr.payapi.market/decode?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/qr-code-decode-api-c6a40c6c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Uas5oyDsd1TJYjNCjNGn_

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-code-decode-api-c6a40c6c -d '<json body>'
```

Example prompt: Can you decode this QR code for me? Here's the image as a base64 string: [base64data] — I need to know what URL or text is stored in it.

## When to prefer this

Choose this endpoint when you need to programmatically decode QR codes from images in any agent workflow, especially when you want pay-per-use microtransaction pricing via x402/USDC rather than maintaining a subscription. It supports multiple QR codes per image and returns precise position data, making it ideal for document processing pipelines or verification tasks.

## Known failure modes

- No QR code detected in image — returns empty results array
- Invalid or corrupt base64 string — returns error
- Image format not supported (non-PNG/JPEG/GIF) — returns error
- QR code too blurry or low resolution to decode — returns empty results
- Payment failure (insufficient USDC balance) — returns 402 Payment Required

## How this service works

Generate and decode QR codes with x402 payments and an MCP server.

## Output

Returns a JSON object with the count of detected QR codes, an array of results each containing the decoded data string, bounding rectangle (top/left/width/height), code type (e.g. QRCODE), and polygon corner coordinates, plus the overall image dimensions.

## 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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "results": [
   {
    "data": "https://payapi.market",
    "rect": {
     "top": 40,
     "left": 40,
     "width": 250,
     "height": 250
    },
    "type": "QRCODE",
    "polygon": [
     {
      "x": 40,
      "y": 40
     },
     {
      "x": 40,
      "y": 290
     },
     {
      "x": 290,
      "y": 290
     },
     {
      "x": 290,
      "y": 40
     }
    ]
   }
  ],
  "image_size": {
   "width": 330,
   "height": 330
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qr-code-decode-api-c6a40c6c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from qr.payapi.market](https://www.zero.xyz/host/qr.payapi.market/llms.txt)
