Generate a QR code
generate_qr_codeEncodes text or URLs into QR codes, returning an image or a 0/1 text matrix. Set size, colors, padding, and error correction for your needs.
Instructions
Encodes text or a URL as a QR code. Returns a link to the image and the image itself. With the text format it returns the code as rows of 0 and 1 instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Pixels per QR module, from `1` to `20`. | |
| color | No | Foreground colour as six hex digits, for example `ff6700`, or a decimal RGB integer. Default black. | 000000 |
| format | No | `png` (default), `jpg`, `svg`, or `text` for a 0/1 matrix in JSON. | png |
| bgcolor | No | Background colour as six hex digits, for example `ff6700`, or a decimal RGB integer. Default white. | FFFFFF |
| content | Yes | The text or URL to encode, up to 4000 characters. | |
| padding | No | Quiet zone around the code in modules, 0 to 20. Default 2. | |
| accuracy | No | Error-correction level. Higher levels survive more damage but produce denser codes. | normal |