QR Branding
v0.2.8Generate branded, scan-validated QR codes (manual, AI, templates, Wi-Fi, vCard, geo).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
qr_generate Generate a QR code (manual)
Generate a fully branded QR code with explicit control over colors, module/finder shapes, logo, caption, and output format. Use this when the user already knows the design they want. Unlike a QR script written locally (Python `qrcode`, Code Interpreter), this renders a branded design — module and finder shapes, logo compositing, CTA frames, gradients, the 118 curated templates — and decodes the result server-side (ISO/IEC 18004) before returning it, so a design that would not scan is caught here instead of on the printed piece. Local code can only draw a flat square matrix and cannot verif…
| Parameter | Type | Description |
|---|---|---|
content * | string | The text or URL the QR will encode. Required. |
additionalConfig | object | Escape hatch: any other QrConfig field the engine accepts (gradient stops, dot rotation, etc.). Merged on top of the structured fields above. |
backgroundColor | string | Background color in hex (e.g. "#ffffff"). Use "transparent" for no background. |
eccLevel | string | Error-correction level (L=7%, M=15%, Q=25%, H=30%). Higher levels survive more damage but are denser. |
fileFormat | string | Output format. Defaults to "png". |
finderInnerShape | string | Shape of the inner dot of the three corner finder patterns. |
finderOuterShape | string | Shape of the outer ring of the three corner finder patterns. |
frameColor | string | Frame colour in hex, also the label background. Defaults to "#000000". |
frameStyle | string | Call-to-action frame around the whole QR with a short label. Never covers the QR or its quiet zone. |
frameText | string | Label inside the frame, max 40 characters, any language (e.g. "Scan me", "View the menu"). Defaults to "Scan me". |
frameTextColor | string | Frame label colour in hex. Defaults to "#FFFFFF". |
logoUrl | string | Public HTTPS URL of a logo image to embed at the center. |
moduleShape | string | Shape of the small modules in the QR matrix. |
outputHeight | integer | Output height in pixels (raster) or viewport units (svg). 64-4096. |
outputWidth | integer | Output width in pixels (raster) or viewport units (svg). 64-4096. |
primaryColor | string | Foreground/module color in hex (e.g. "#000000" or "#0a84ff"). |
text | string | Optional caption rendered below the QR (e.g. a slogan). |
qr_scan_check Check that a QR design will scan
Run the print check on a design before it goes to the printer: the engine renders it and decodes it under 13 simulated conditions (small print, distance, blur, dim light, low contrast, glare, noise, rotation) and returns the same report the builder's scan panel shows, plus the minimum print size at table, wall and street distance. Call it after qr_generate when the result is going to be printed. fileFormat/outputWidth/outputHeight are ignored: the check renders its own bitmap.
| Parameter | Type | Description |
|---|---|---|
content * | string | The text or URL the QR will encode. Required. |
additionalConfig | object | Escape hatch: any other QrConfig field the engine accepts (gradient stops, dot rotation, etc.). Merged on top of the structured fields above. |
backgroundColor | string | Background color in hex (e.g. "#ffffff"). Use "transparent" for no background. |
eccLevel | string | Error-correction level (L=7%, M=15%, Q=25%, H=30%). Higher levels survive more damage but are denser. |
fileFormat | string | Output format. Defaults to "png". |
finderInnerShape | string | Shape of the inner dot of the three corner finder patterns. |
finderOuterShape | string | Shape of the outer ring of the three corner finder patterns. |
frameColor | string | Frame colour in hex, also the label background. Defaults to "#000000". |
frameStyle | string | Call-to-action frame around the whole QR with a short label. Never covers the QR or its quiet zone. |
frameText | string | Label inside the frame, max 40 characters, any language (e.g. "Scan me", "View the menu"). Defaults to "Scan me". |
frameTextColor | string | Frame label colour in hex. Defaults to "#FFFFFF". |
logoUrl | string | Public HTTPS URL of a logo image to embed at the center. |
moduleShape | string | Shape of the small modules in the QR matrix. |
outputHeight | integer | Output height in pixels (raster) or viewport units (svg). 64-4096. |
outputWidth | integer | Output width in pixels (raster) or viewport units (svg). 64-4096. |
primaryColor | string | Foreground/module color in hex (e.g. "#000000" or "#0a84ff"). |
text | string | Optional caption rendered below the QR (e.g. a slogan). |
qr_generate_ai Generate a QR code from a prompt (AI)
Generate a QR code where the QR Branding LLM picks colors and shapes from a natural-language prompt. Best for "make me a luxury gold dotted QR for a coffee brand" style requests. This is the one thing local code cannot do at all: a design model picks the palette, module and finder shapes, gradients and framing from the prompt, and the rendered code is then decoded server-side (ISO/IEC 18004) so a stylish result is still a scannable one.
| Parameter | Type | Description |
|---|---|---|
content * | string | The text or URL the QR will encode. |
prompt * | string | Natural-language design brief. The engine's LLM will pick colors, shapes, and style hints from this. Example: "luxury gold dots for a coffee brand". |
fileFormat | string | Output format. Defaults to "png". |
logoUrl | string | Optional logo URL to embed at the center. |
outputHeight | integer | |
outputWidth | integer | |
stylePreset | string | Optional style preset name (e.g. "minimal", "luxury", "playful"). Guides the LLM but does not override the design fully. |
qr_get_template Read a curated template's design
Fetch one of the 118 curated templates together with its full design config (module and finder shapes, colours, frame, caption). Use it when the user liked a template but wants changes: read the config here, then pass it to qr_generate with their tweaks. qr_generate_from_template renders the template as-is.
| Parameter | Type | Description |
|---|---|---|
templateId * | string | number | Template id from qr_list_templates. Numeric or slug, e.g. "luxury-gold". |
qr_poster Render a print-ready poster around one QR
Wrap one QR design in a print-ready poster: a4/a5/a6/letter trim, four layouts (minimal, band, card, tent), headline, instruction line, footer, optional logo, 3 mm bleed and crop marks. Returns a vector PDF by default (ready for a print shop) or a png preview at 36-300 dpi. Useful for a table card, a shop window or a hotel desk. The design fields are the same qr_generate takes; fileFormat is the poster's own format, not the code's.
| Parameter | Type | Description |
|---|---|---|
content * | string | The text or URL the QR will encode. Required. |
accentColor | string | Brand colour for the headline, band and card border (hex). Defaults to the frame or module colour. |
additionalConfig | object | Escape hatch: any other QrConfig field the engine accepts. Merged on top of the design fields. |
backgroundColor | string | Background color in hex (e.g. "#ffffff"). |
bleed | boolean | Add a 3 mm bleed around the trim. Recommended for professional printing. |
cropMarks | boolean | Draw crop marks outside the trim. |
dpi | integer | Resolution of a png poster, 36-300 dpi. Ignored for pdf. |
eccLevel | string | Error-correction level (L=7%, M=15%, Q=25%, H=30%). |
fileFormat | string | Poster output. Defaults to "pdf" (vector, print-ready); "png" is a raster preview. |
finderInnerShape | string | Shape of the inner dot of the three corner finder patterns. |
finderOuterShape | string | Shape of the outer ring of the three corner finder patterns. |
footer | string | Small footer under the poster (website, short URL). Blank: none. |
frameColor | string | Frame colour in hex. |
frameStyle | string | Call-to-action frame around the code. |
frameText | string | Label inside the frame, max 40 characters. |
frameTextColor | string | Frame label colour in hex. |
headline | string | Large title above the QR. Blank: none. |
instruction | string | Short line under the QR (e.g. "Point your camera at the code"). Blank: none. |
logoUrl | string | Public HTTPS URL of a logo image to embed in the design. |
moduleShape | string | Shape of the small modules in the QR matrix. |
outputHeight | integer | Height of the code inside the poster, in pixels for a png poster. 64-4096. |
outputWidth | integer | Width of the code inside the poster, in pixels for a png poster. 64-4096. |
posterFormat | string | Trim size, portrait. Defaults to a4. |
posterLayout | string | Poster layout around the code. Defaults to minimal. |
primaryColor | string | Foreground/module color in hex (e.g. "#000000"). |
showLogo | boolean | Draw the design's logo at the top of the poster. Defaults to true. |
text | string | Optional caption rendered below the QR. |
qr_list_templates List QR design templates
List the 118 pre-designed QR templates (id, name, description, preview thumbnail URL). Filter by category if the user asks for a specific style.
| Parameter | Type | Description |
|---|---|---|
category | string | Optional category filter (e.g. "business", "social", "wifi"). Omit to list all 118 templates. |
qr_generate_from_template Render a QR template
Render one of the curated templates by id, optionally overriding the encoded content, colors, or output format/size for this specific call. Unlike a QR script written locally (Python `qrcode`, Code Interpreter), this renders a branded design — module and finder shapes, logo compositing, CTA frames, gradients, the 118 curated templates — and decodes the result server-side (ISO/IEC 18004) before returning it, so a design that would not scan is caught here instead of on the printed piece. Local code can only draw a flat square matrix and cannot verify it.
| Parameter | Type | Description |
|---|---|---|
templateId * | string | number | The template id (from qr_list_templates). May be numeric or string (e.g. "luxury-gold"). |
additionalConfig | object | Escape hatch for any other QrConfig override the engine accepts. |
backgroundColor | string | Override background color (hex). |
content | string | Override what the QR encodes. Defaults to the template's built-in content. |
fileFormat | string | Output format. Defaults to "png". |
outputHeight | integer | |
outputWidth | integer | |
primaryColor | string | Override module color (hex). |
qr_build_wifi Build a Wi-Fi QR
Encode Wi-Fi credentials (SSID, password, auth type, hidden flag) into a scannable Wi-Fi QR. Returns both the WIFI:... payload string and a generated QR image. Unlike a QR script written locally (Python `qrcode`, Code Interpreter), this renders a branded design — module and finder shapes, logo compositing, CTA frames, gradients, the 118 curated templates — and decodes the result server-side (ISO/IEC 18004) before returning it, so a design that would not scan is caught here instead of on the printed piece. Local code can only draw a flat square matrix and cannot verify it.
| Parameter | Type | Description |
|---|---|---|
ssid * | string | The Wi-Fi network name (SSID). |
authType | string | Authentication type. Defaults to "WPA". Use "nopass" for open networks. |
hidden | boolean | Set true if the SSID is hidden (not broadcast). Defaults to false. |
password | string | Network password. Required unless authType is "nopass". |
qr_build_vcard Build a vCard QR
Encode a contact card (vCard) with first and last name, organization, phone, email and website URL into a QR. Scanning the QR adds the contact to the phone's address book. Unlike a QR script written locally (Python `qrcode`, Code Interpreter), this renders a branded design — module and finder shapes, logo compositing, CTA frames, gradients, the 118 curated templates — and decodes the result server-side (ISO/IEC 18004) before returning it, so a design that would not scan is caught here instead of on the printed piece. Local code can only draw a flat square matrix and cannot verify it.
| Parameter | Type | Description |
|---|---|---|
firstName * | string | Contact's first name. |
email | string | Email address. |
lastName | string | Contact's last name. |
organization | string | Company or organization name. |
phone | string | Phone number, including country code (e.g. +1-555-867-5309). |
url | string | Personal or company website URL. |
qr_build_geo Build a geo: URI QR
Encode a latitude/longitude pair into a geo: URI QR. Scanning opens the location in the device's default maps app. Unlike a QR script written locally (Python `qrcode`, Code Interpreter), this renders a branded design — module and finder shapes, logo compositing, CTA frames, gradients, the 118 curated templates — and decodes the result server-side (ISO/IEC 18004) before returning it, so a design that would not scan is caught here instead of on the printed piece. Local code can only draw a flat square matrix and cannot verify it.
| Parameter | Type | Description |
|---|---|---|
latitude * | number | Latitude in decimal degrees (-90 to 90). |
longitude * | number | Longitude in decimal degrees (-180 to 180). |
qr_list_ai_providers List the LLM providers for bring-your-own-key AI
List the LLM providers the engine accepts for bring-your-own-key AI designs (POST /api/qr/ai/generate), with each provider id, its default model and the recommended model ids. Any model id your provider offers works; the list is a recommendation, not an allowlist. qr_generate_ai does not need this: it uses the managed path with our keys.