# x402 Web Tools – QR Code Generator

> x402 Web Tools – QR Code Generator is a paid API for AI agents from web.kagurazaka.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-30).

Encodes text or a URL as a QR code image returned as PNG (base64 + data URL) or SVG, with configurable size and error correction level.

## Facts

- Endpoint: GET https://web.kagurazaka.dev/v1/qr?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-web-tools-qr-code-generator-59175709
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4nMGoR5ycS0d-TEq-AV8f

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 x402-web-tools-qr-code-generator-59175709
```

Example prompt: Can you generate a QR code for https://myshop.example.com — make it 512 pixels wide, SVG format, with high error correction so it's still scannable if part of it gets covered?

## When to prefer this

Choose this endpoint when you need a programmatic, pay-per-call QR code generator that returns machine-usable base64 or SVG output (not just a rendered web image), supports configurable size and ISO error correction levels (L/M/Q/H), and fits into an x402 micropayment workflow. Prefer it over browser-based QR generators when the output needs to be embedded inline in HTML, PDF, or other documents.

## Known failure modes

- text parameter missing — returns error requiring the text query param
- text exceeds 2000 characters — returns error or truncation
- size out of range (below 64 or above 1024) — returns validation error
- invalid level enum value — returns bad request
- payment not provided or invalid — returns HTTP 402 requiring x402 payment

## How this service works

Encode text or a URL as a QR code: PNG (base64 and a data URL) or SVG, with the size and error correction level you choose.

## Output

A JSON object containing: the image format used (png or svg), the rendered image as base64-encoded PNG (png_base64) and as a ready-to-use data URL (data_url), the size in pixels, and the byte size of the image. For SVG format, the response contains the SVG markup accordingly.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "size": {
       "type": "integer",
       "description": "width in pixels (64-1024, default 300)"
      },
      "text": {
       "type": "string",
       "description": "what to encode (up to 2000 characters)"
      },
      "level": {
       "enum": [
        "L",
        "M",
        "Q",
        "H"
       ],
       "type": "string",
       "description": "error correction level (default M)"
      },
      "format": {
       "enum": [
        "png",
        "svg"
       ],
       "type": "string",
       "description": "image format (default png)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "size": {},
      "bytes": {},
      "format": {},
      "data_url": {},
      "png_base64": {}
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "size": 300,
  "bytes": 1200,
  "format": "png",
  "data_url": "data:image/png;base64,iVBORw0KGgo...",
  "png_base64": "iVBORw0KGgo..."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-web-tools-qr-code-generator-59175709/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from web.kagurazaka.dev](https://www.zero.xyz/host/web.kagurazaka.dev/llms.txt)
