# QR Code Generator (x402 Pay-per-Call)

> QR Code Generator (x402 Pay-per-Call) is a paid API for AI agents from x402.valkyry.fr, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Generates a QR code image (PNG or SVG) from a given text or URL, returned as a base64 data URL.

## Facts

- Endpoint: POST https://x402.valkyry.fr/qr
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/qr-code-generator-x402-pay-per-call-51d5ade0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VkJPdNy_7yiNzRUYHlpXd

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 qr-code-generator-x402-pay-per-call-51d5ade0 -d '<json body>'
```

Example prompt: Can you generate a QR code for https://example.com and give it to me as a PNG image?

## When to prefer this

Use this endpoint when you need a quick, pay-per-call QR code generation without setting up infrastructure, especially in agent workflows where USDC micro-payments via x402 are already supported and you need PNG or SVG output as a base64 data URL.

## Known failure modes

- Missing text/url field — returns error with no QR code generated
- Invalid format enum value (not png or svg) — may return error or default to png
- Payment not completed via x402 — 402 Payment Required response, no output returned
- Malformed or excessively long input text — may fail to encode or time out

## How this service works

Generate a QR code (PNG data-URI or SVG) for any text or URL. Simple, instant utility endpoint.

## Output

A JSON object containing the original text/URL, the format used (png or svg), and a base64-encoded data URL of the QR code image ready for embedding or display.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "Alias for text"
  },
  "text": {
   "type": "string",
   "description": "Text or URL to encode"
  },
  "format": {
   "enum": [
    "png",
    "svg"
   ],
   "type": "string",
   "description": "Output format (default png)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "https://example.com",
  "format": "png",
  "dataUrl": "data:image/png;base64,…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qr-code-generator-x402-pay-per-call-51d5ade0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.valkyry.fr](https://www.zero.xyz/host/x402.valkyry.fr/llms.txt)
