# x402tools QR Generator

> x402tools QR Generator is a paid API for AI agents from qr.x402tools.xyz, paid per call via x402, $0.01/call, status down (last checked 2026-10-13).

Generates a QR code image (PNG, SVG, or base64) from any text or URL, billed per call via the x402 USDC micropayment protocol.

## Facts

- Endpoint: POST https://qr.x402tools.xyz/v1/generate?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: down
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402tools-qr-generator-f0c711fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8bX1PI2hPD9mw3rRLx8Ze

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 x402tools-qr-generator-f0c711fb -d '<json body>'
```

Example prompt: Can you generate a 512px PNG QR code for the URL https://myshop.example.com so I can put it on my flyer?

## When to prefer this

Choose this endpoint when you need a quick, pay-as-you-go QR code generation call without a subscription, especially when building agents that require micropayment-compatible APIs or when you need flexible output formats (PNG, SVG, base64) and configurable image sizes.

## Known failure modes

- Missing or empty `text` field returns an error indicating required input
- Invalid `format` value outside the enum returns a validation error
- Unpaid or failed x402 payment results in a 402 Payment Required response
- Extremely large `size` values may be rejected or time out
- Non-printable or binary content in `text` may produce unreadable QR codes

## How this service works

Generate a QR code from any text, URL, or data. Returns a scannable PNG, SVG, or Base64 image. Use for QR code creation, link encoding, and barcode generation.

## Output

A JSON object containing a `dataUrl` field with the QR code encoded as a base64 data URI (e.g. `data:image/png;base64,...`), ready to embed in HTML or decode as an image file.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "size": {
   "type": "number",
   "description": "Image width/height in pixels (default: 256)"
  },
  "text": {
   "type": "string",
   "description": "Content to encode in QR code"
  },
  "format": {
   "enum": [
    "png",
    "svg",
    "base64"
   ],
   "type": "string",
   "description": "Output format"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "dataUrl": "data:image/png;base64,iVBORw..."
 }
}
```

## More

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