Generate a QR code
generate_qr_codeMake a static QR code for a link or any text, up to 800 UTF-8 bytes. Returns a 512 px PNG image plus the SVG markup. The data is stored in the code itself, so it never expires and needs no account. Light-on-dark colors are allowed, but some older scanners need dark on light. Errors are returned for empty text, content over 800 bytes, or colors that are not six-digit hex.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Link or text to encode | |
| background | No | Six-digit hex color for the background | #ffffff |
| foreground | No | Six-digit hex color for the modules | #000000 |
| errorCorrection | No | Error correction: L 7%, M 15%, Q 25%, H 30% of the code can be damaged and still scan; higher is denser | M |