generate_qr_code
Encode text or URLs into QR code images in PNG, SVG, or GIF format. Customize size, colors, and error correction level.
Instructions
Generate a QR code image and return it as Base64-encoded data.
Use this when you need to encode a URL, text, or other data into a QR code
image that can be displayed or embedded in documents/web pages.
Parameters:
text — The text or URL to encode in the QR code (required).
format — Output image format: "png", "svg", or "gif" (default: "png").
size — Image size in pixels (100-1000, default: 300).
color — Foreground hex color (without #, default: "000000").
bgcolor — Background hex color (without #, default: "FFFFFF").
ecc — Error correction level: "L", "M", "Q", or "H" (default: "M").
Higher levels allow more damage before the code becomes unreadable.
margin — Margin in modules (0-20, default: 4).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| format | No | png | |
| size | No | ||
| color | No | 000000 | |
| bgcolor | No | FFFFFF | |
| ecc | No | M | |
| margin | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |