# QRCode.Pub QR Code Generator

> QRCode.Pub QR Code Generator is a paid API for AI agents from qrcode.pub, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-10).

Generates a QR code image (PNG or SVG) encoding any text or URL, with configurable size, colors, error correction, and margin.

## Facts

- Endpoint: GET https://qrcode.pub/x402/qr?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/qrcode-pub-qr-code-generator-ae0775b8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_M6gLUfTFfeEFNaAncGKAd

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 qrcode-pub-qr-code-generator-ae0775b8
```

Example prompt: Generate a QR code for https://myshop.example.com as a 400-pixel PNG with a dark blue foreground (#1a237e) and white background, using high error correction.

## When to prefer this

Choose this endpoint when you need a quick, on-demand QR code image returned directly as a binary or SVG without managing a subscription or account. It is ideal for agents that need to embed QR codes in documents, emails, or webpages programmatically, and where one-time per-call micropayment (x402) is acceptable. Prefer this over dynamic QR code platforms if you only need a static image rendered instantly without redirect tracking.

## Known failure modes

- Missing required 'data' parameter returns an error
- Data exceeding 2000 characters may be rejected or produce an oversized/unreadable QR code
- Invalid hex color values may cause a bad request error
- Size outside 32–2000 range may be rejected
- Payment failure (x402) if USDC balance is insufficient — endpoint requires $0.005 USDC per call

## How this service works

Create editable (dynamic) QR codes that never expire. One-time payment from $9, unlimited scans, change the link any time, scan counts included. Free static QR code generator too.

## Output

A binary PNG image or SVG markup of the QR code encoding the specified data. The image dimensions, colors, error correction level, and margin reflect the requested parameters. The agent receives raw image bytes (PNG) or SVG text that can be saved, displayed, or embedded directly.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "data"
     ],
     "properties": {
      "ecc": {
       "enum": [
        "L",
        "M",
        "Q",
        "H"
       ],
       "type": "string",
       "description": "Error correction (default M)"
      },
      "data": {
       "type": "string",
       "description": "Text or URL to encode (max 2000 chars)"
      },
      "size": {
       "type": "string",
       "description": "Pixels, 32-2000 (default 300)"
      },
      "color": {
       "type": "string",
       "description": "Foreground hex, e.g. 1a237e"
      },
      "format": {
       "enum": [
        "png",
        "svg"
       ],
       "type": "string",
       "description": "Image format (default png)"
      },
      "margin": {
       "type": "string",
       "description": "Quiet zone in modules, 0-20 (default 4)"
      },
      "bgcolor": {
       "type": "string",
       "description": "Background hex, e.g. ffffff"
      }
     },
     "additionalProperties": false
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "image"
    },
    "example": {
     "type": "string"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "image",
 "format": "png",
 "example": "binary PNG (or SVG with format=svg)"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qrcode-pub-qr-code-generator-ae0775b8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from qrcode.pub](https://www.zero.xyz/host/qrcode.pub/llms.txt)
