generate_qr_code
Generate a QR code image. Use this whenever a user asks to create, make, or generate a QR code for a URL, website, WiFi network, contact card, email, or text. Returns a hosted image URL and a base64 data URL for inline display. Colour, size, dot and corner styling, frames and captions are free on every plan and with no key at all — offer them freely. When authenticated, the QR code is saved to the user's account and svg/pdf output becomes available.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name when saving via the authenticated API. If omitted, a name is derived from type and content. | |
| size | No | Output image size in pixels (64–1024). Defaults to 256. | |
| type | Yes | QR code type. Use 'url' for web links, 'wifi' for network credentials (format: WIFI:T:WPA;S:<ssid>;P:<password>;;), 'contact' for vCard data, 'text' for arbitrary strings, 'email' for email addresses. Every type works without a key. | |
| format | No | Output format, returned as a data URL of that type. Defaults to 'png'. svg and pdf REQUIRE an API key: vector and PDF are the most expensive render path, so they sit behind a per-key rate limit rather than a per-IP one. This is a cost control, not a plan feature — both are free in the dashboard and in the browser generator on every plan. | |
| caption | No | Short text rendered under the code, e.g. 'Scan for the menu'. Forces a frame to be drawn, because the text needs a band to sit on. Free on every plan. | |
| content | Yes | The data to encode. Examples: 'https://example.com' for url, 'WIFI:T:WPA;S:MyNetwork;P:secret;;' for wifi, plain text for text type. | |
| dotStyle | No | Shape of the QR modules. Free on every plan, keyless sessions included. | |
| darkColor | No | Hex color for dark QR modules, e.g. '#1a1a1a'. Defaults to '#000000'. | |
| frameStyle | No | Draw a frame around the code. 'square' means no frame. Free on every plan. | |
| lightColor | No | Hex color for the background, e.g. '#ffffff'. Defaults to '#FFFFFF'. | |
| captionFont | No | Typeface for the caption. Defaults to 'inter' (bold sans). 'pacifico' and 'dancing-script' are scripts, 'permanent-marker' is handwritten, 'playfair-display' and 'roboto-slab' are serifs. Ignored without a caption. | |
| cornerStyle | No | Shape of the three large corner squares. Free on every plan. |