generate_qr_code
Render text or a URL as a QR code image. Returns JSON { dataUrl, text, size } where dataUrl is a base64 PNG data URI embedded in the response — not a hosted link, so nothing is stored and the image cannot be fetched later. Runs locally and costs nothing. Writing only — it cannot read or decode an existing QR code. A long payload makes a denser, less scannable code, so shorten the address by other means before encoding it if you can.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Width and height of the output PNG in pixels; the code is always square. Default 300. Only applied when given as a number. | |
| text | Yes | The exact payload to encode. A URL must include its scheme to be actionable when scanned. Very long values force a denser code that is harder to scan. | |
| errorCorrection | No | Declared for compatibility but currently ignored — the code is always generated at the library default, level M (about 15% damage tolerance). |