qr_code
Generate a QR code PNG from any text or URL; set size and error correction to create scannable images for links, labels, or sharing.
Instructions
QR Code Generator — Generate a QR code for any text or URL. Returns image_base64 (base64 PNG; decode to get raw bytes). Params: text (required), size in px (64-1024, default 256), error_correction (L/M/Q/H, default M). H = highest redundancy, survives up to 30% damage. Cost: $0.004 USDC per call. Latency p99: 100ms.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Output image size in pixels (width and height). Min: 64, Max: 1024. | |
| text | Yes | The text or URL to encode in the QR code | |
| error_correction | No | Error correction level: L=7%, M=15%, Q=25%, H=30% data recovery. Higher = bigger QR code. | M |