# x402-tools QR Code Generator

> x402-tools QR Code Generator is a paid API for AI agents from x402.nichospt.net, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Generates a QR code (SVG or data URL) from any text or URL, paid per-call in USDC via x402.

## Facts

- Endpoint: POST https://x402.nichospt.net/qr-code?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-tools-qr-code-generator-5b1e8327
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TTskwDysio46sRNTO1u_v

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-tools-qr-code-generator-5b1e8327 -d '<json body>'
```

Example prompt: Can you generate a QR code for https://myshop.com/checkout as an SVG with high error correction and a margin of 2?

## When to prefer this

Choose this endpoint when an AI agent needs to programmatically produce a QR code from any text or URL with control over format, margin, and error correction level, and is operating in an x402-enabled payment environment that can settle $0.01 USDC per call. Prefer this over self-hosted QR generation when you need a simple pay-per-use model without infrastructure overhead.

## Known failure modes

- Text exceeds 2000 character limit — input too large error
- Invalid format enum value — must be 'svg' or 'dataurl'
- Margin out of range — must be 0–10
- Invalid error_correction value — must be L, M, Q, or H
- Payment not settled — 402 response if x402 USDC payment is not completed
- Network timeout or server error — 5xx response

## How this service works

Pay-per-call utility APIs for AI agents, settled in USDC via the x402 protocol.

## Output

A JSON object containing the generated QR code in the requested format — either raw SVG markup (e.g. <svg xmlns=...>) or a base64 data URL — plus a 'format' field confirming which was returned.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 2000,
   "description": "Text/URL to encode"
  },
  "format": {
   "enum": [
    "svg",
    "dataurl"
   ],
   "type": "string",
   "default": "svg"
  },
  "margin": {
   "type": "integer",
   "default": 4,
   "maximum": 10,
   "minimum": 0
  },
  "error_correction": {
   "enum": [
    "L",
    "M",
    "Q",
    "H"
   ],
   "type": "string",
   "default": "M"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "qr": "<svg xmlns=\"http://www.w3.org/2000/svg\" ...>",
  "format": "svg"
 }
}
```

## More

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