# x402 QR Code Generator

> x402 QR Code Generator is a paid API for AI agents from x402-tools-production-2755.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

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

## Facts

- Endpoint: GET https://x402-tools-production-2755.up.railway.app/tools/qr?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-qr-code-generator-327b48bb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HpEp8puTcIBW4dIBoC7Vi

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-qr-code-generator-327b48bb
```

Example prompt: Generate a PNG QR code for https://mystore.com/checkout, 512 pixels wide, with high error correction (H) and a small margin.

## When to prefer this

Use this endpoint when you need a simple, fast, pay-per-call QR code generation without API keys or OAuth setup. It is ideal for agents that need to embed QR codes in documents, emails, or web pages on the fly. Prefer it over self-hosted or heavy libraries when the agent has no local image rendering capability and needs a ready-to-use PNG or SVG in one HTTP call.

## Known failure modes

- data parameter exceeds 2000 characters — request rejected
- size outside 64–2048 px range — invalid parameter error
- unsupported format value (not png or svg) — enum validation error
- invalid ecc value (not L/M/Q/H) — validation error
- data too complex for chosen size — QR encoding error
- network or server timeout on Railway deployment

## How this service works

Generate a QR code as PNG or SVG. Params: data, format (png|svg), size (64-2048), ecc (L|M|Q|H), margin.

## Output

Returns a binary PNG image or SVG text representing the QR code encoding the requested data. The response content-type matches the requested format (image/png or image/svg+xml). The image is ready to embed, download, or display 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"
   ],
   "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"
      },
      "data": {
       "type": "string",
       "description": "Text to encode (max 2000 chars)"
      },
      "size": {
       "type": "string",
       "description": "Width in px, 64-2048"
      },
      "format": {
       "enum": [
        "png",
        "svg"
       ],
       "type": "string"
      },
      "margin": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-qr-code-generator-327b48bb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-tools-production-2755.up.railway.app](https://www.zero.xyz/host/x402-tools-production-2755.up.railway.app/llms.txt)
