QR Branding QR Branding
Enterprise-Grade QR Engine

Create Stunning QR Codes
with Pixel-Perfect Control

The most powerful QR code generation API. Design branded, artistic QR codes with custom shapes, gradients, logos, frames, and text overlays. Export in 4K resolution.

25+
Module Shapes
8
Output Formats
4K
Max Resolution
30+
Templates

✨ Key Features

🎨
25+ Module Shapes
Square, Circle, Diamond, Star, Heart, Hexagon, Leaf, Mosaic, Pointed, Japanese, Shield, Arrow, Drop, and more. Plus 20+ finder patterns.
👁️
Granular Eye Control
Customize each of the 3 finder patterns independently with different shapes and colors.
🌈
Advanced Gradients
Linear, diagonal, and radial color transitions. Apply to modules, eyes, or both.
🖼️
Smart Frames
Auto-padded decorative frames with rounded corners and multiple styles.
✂️
Center Text Strip
Split the QR with horizontal or vertical text bands. Perfect for branding.
🏷️
Logo Integration
Upload via URL, Base64, or binary file. Auto-clears QR modules behind logo.
📐
8 Output Formats
Export as PNG, JPG, WEBP, SVG, PDF, BMP, GIF, or TIFF. Up to 4K resolution. Vector & print-ready.
🔧
Helper Endpoints
Generate WiFi, vCard, and Geo strings instantly for common use cases.

🎯 Use Cases

🛍️
Product Packaging
🎫
Event Tickets
🍽️
Restaurant Menus
💼
Business Cards
📱
App Downloads
📍
Location Sharing

🚀 Quick Start

Generate your first branded QR code in seconds. Copy the example below:

⚡ Minimal Example
cURL
curl -X POST "https://qr-branding-api.p.rapidapi.com/api/qr/generate" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding-api.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{
                    "content": "https://mywebsite.com",
                    "moduleShape": "circle",
                    "primaryColor": "#6366f1"
  }'
💡
Pro Tip: Only the content field is required. All other parameters have sensible defaults. Start simple and add customizations as needed.

🔐 Authentication

This API is accessed through RapidAPI. All authentication is handled automatically by RapidAPI when you subscribe to the API.

RapidAPI Headers (added automatically)
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: qr-branding-api.p.rapidapi.com
🚀
Getting Started: Subscribe to the API on RapidAPI and use the provided code snippets. RapidAPI handles authentication automatically.
⚠️
Security: Never expose your RapidAPI key in client-side code. Always call the API from your backend server.

Generate Custom QR

POST /api/qr/generate

The primary endpoint. Send a JSON configuration object to generate a fully customized QR code image. Returns a Base64-encoded image.

Complete Example Request

This example showcases all available customization options:

Request Body - Full FeaturedJSON
{
                // === REQUIRED ===
                "content": "https://mybrand.com",
  
                // === OUTPUT SETTINGS ===
                "eccLevel": "H",
                "pixelsPerModule": 20,
                "quietZone": true,
                "outputWidth": 1024,
                "outputHeight": 1024,
                "fileFormat": "png",
                "responseType": "base64",
  
                // === QR SHAPE (MASK) ===
                "qrShape": "circle",
                "qrShapeRadius": 0,
  
                // === COLORS & GRADIENTS ===
                "primaryColor": "#6366f1",
                "secondaryColor": "#ec4899",
                "foregroundStyle": "linearGradient",
                "gradientType": "linear",
                "gradientDirection": "diagonal",
                "gradientAngle": 45,
                "gradientColors": ["#FF0000", "#00FF00", "#0000FF"],
                "gradientOnEyes": false,
                "backgroundColor": "#ffffff",
                "transparentBackground": false,
  
                // === MODULE SHAPES & PATTERNS ===
                "moduleShape": "circle",
                "moduleScale": 0.85,
                "moduleRotation": 0,
                "moduleStyle": "solid",
                "moduleOutlineWidth": 2,
                "modulePattern": "standard",
                "moduleSizeVariation": 0,
  
                // === FINDER PATTERNS (EYES) ===
                "finderOuterShape": "circle",
                "finderInnerShape": "circle",
                "finderOuterColor": "#6366f1",
                "finderInnerColor": "#ec4899",
                "finderBorderRadius": 10,
                "finderInnerScale": 0.43,
                "finderStyle": "concentric-circles",
                "finderConcentricRings": 3,
                "finderInnerPattern": "none",
  
                // Individual Eye Overrides
                "eye1": { 
                "outerShape": "circle", 
                "innerShape": "circle",
                "outerColor": "#6366f1",
                "innerColor": "#ec4899",
                "rotation": 0
  },
                "eye2": null,
                "eye3": null,
  
                // === FRAME ===
                "frame": {
                "enabled": true,
                "shape": "speechbubble",
                "color": "#1e3a5f",
                "secondaryColor": "#4cc9f0",
                "gradientType": "linear",
                "fillColor": "#f8fafc",
                "width": 8,
                "cornerRadius": 25,
                "style": "solid",
                "padding": 20,
                "speechBubbleDirection": "bottom",
                "speechBubbleSize": 20
  },
  
                // === LOGO ===
                "logoUrl": "https://example.com/logo.png",
                "logoShape": "circle",
                "logoBorderWidth": 3,
                "logoBorderColor": "#ffffff",
                "cleanBehindLogo": true,
                "logoSizePercent": 18,
                "logoPadding": 5,
                "logoShadow": true,
                "logoBackground": "solid",
                "logoBackgroundColor": "#ffffff",
  
                // === VISUAL EFFECTS ===
                "effects": {
                "shadow": true,
                "shadowColor": "#00000040",
                "shadowOffsetX": 5,
                "shadowOffsetY": 5,
                "shadowBlur": 10,
                "glow": false,
                "glowColor": "#00FF00",
                "glowIntensity": 10,
                "glowRadius": 15,
                "edgeFade": false,
                "edgeFadePercent": 25,
                "edgeFadeType": "size",
                "emboss": false,
                "embossDepth": 3,
                "noise": false,
                "noiseIntensity": 0.1
  },
  
                // === CIRCULAR TEXT ===
                "circularText": {
                "topText": "SCAN ME",
                "bottomText": "MY BRAND",
                "color": "#000000",
                "fontSize": 20,
                "bold": true,
                "letterSpacing": 5,
                "margin": 10,
                "radius": 0
  },
  
                // === SCAN CORNERS ===
                "scanCorners": {
                "enabled": true,
                "color": "#6366f1",
                "style": "brackets",
                "length": 15,
                "thickness": 3,
                "offset": 10
  },
  
                // === CENTER TEXT STRIP ===
                "centerText": {
                "text": "BRAND",
                "color": "#000000",
                "backgroundColor": "#ffffff",
                "backgroundOpacity": 1.0,
                "orientation": "horizontal",
                "height": 40,
                "fontSize": 16,
                "bold": true
  },
  
                // === CTA TEXT ===
                "ctaText": "SCAN ME",
                "ctaColor": "#000000",
                "ctaFontSize": 24,
                "ctaPosition": "bottom",
                "ctaFontFamily": null
}
💡
Note: You don't need to include all parameters. Only content is required. All other parameters have sensible defaults. Include only what you want to customize.

Response (Base64 Mode)

When responseType: "base64" (default), you receive a JSON response:

200 OK — application/json
{
                "success": true,
                "qrBase64": "iVBORw0KGgoAAAANSUhEUgAA...",
                "format": "png",
                "contentType": "image/png",
                "sizeBytes": 24680
}

Response Fields

FieldTypeDescription
successboolWhether the generation succeeded
qrBase64stringBase64-encoded file data
formatstringFile extension (png, jpg, svg, pdf, etc.)
contentTypestringMIME type for the file
sizeBytesintFile size in bytes

Response (Binary Mode)

When responseType: "binary", you receive the file directly:

200 OK — image/png (or corresponding MIME type)
// Binary file data returned directly
// Content-Disposition: attachment; filename="qrcode.png"
// Content-Type: image/png (or image/svg+xml, application/pdf, etc.)
🖼️
Displaying Base64 images: Use the Base64 string in an <img> tag:
<img src="data:{contentType};base64,{qrBase64}" />
📥
Binary mode tip: When using responseType: "binary", the response is a direct file download. In JavaScript, handle it as a Blob:
const blob = await response.blob();

Example: Download PDF

cURL - Download PDF filecURL
curl -X POST "https://qr-branding-api.p.rapidapi.com/api/qr/generate" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding-api.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{
                "content": "https://mywebsite.com",
                "fileFormat": "pdf",
                "responseType": "binary",
                "moduleShape": "circle",
                "primaryColor": "#6366f1"
  }' --output qrcode.pdf

Example: Get SVG as Base64

cURL - SVG in JSON responsecURL
curl -X POST "https://qr-branding-api.p.rapidapi.com/api/qr/generate" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding-api.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{
                "content": "https://mywebsite.com",
                "fileFormat": "svg",
                "responseType": "base64",
                "primaryColor": "#f72585"
  }'

📤 Multipart Logo Upload

Instead of using logoUrl or logoBase64, you can upload your logo directly as a binary file using multipart/form-data. This is ideal when your logo isn't publicly accessible.

Multipart Request Structure

FieldTypeDescription
config REQ text (JSON string) The complete QR configuration as a JSON string
logoFile file (binary) Logo image file (PNG, JPG, etc.). Takes priority over logoUrl/logoBase64

cURL Example

Multipart RequestcURL
curl -X POST "https://qr-branding-api.p.rapidapi.com/api/qr/generate" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding-api.p.rapidapi.com" \
  -F 'config={"content":"https://mysite.com","moduleShape":"circle","primaryColor":"#f72585"}' \
  -F "logoFile=@/path/to/logo.png"

📦 Basic Parameters

ParameterTypeDefaultDescription
content REQ string The data to encode. Can be any text: URLs, WiFi strings, vCards, plain text, etc.
eccLevel string "H" Error correction level. Higher levels allow more damage/obstruction.
L M Q H
pixelsPerModule int 20 Base resolution. Higher = sharper. Range: 5-100
quietZone bool true Add a white margin (4 modules) around the QR for better scanning.

📐 Output & Resolution

Control the final image size, format, and response type for different use cases.

ParameterTypeDefaultDescription
outputWidth int 0 Final image width in pixels. Use 3840 for 4K. 0 = auto (based on pixelsPerModule).
outputHeight int 0 Final image height in pixels. Usually equals outputWidth for square QRs. 0 = auto.
fileFormat string "png" Output image/document format.
png jpg jpeg webp bmp gif tiff svg pdf
responseType string "base64" How to receive the generated QR code.
base64 binary

Response Types Explained

TypeResponseUse Case
base64 JSON with Base64-encoded image string Web apps, embedding in HTML, storing in databases
binary Direct file download (PNG, SVG, PDF, etc.) Direct file save, print workflows, design tools

Format Comparison

FormatTypeBest ForFeatures
PNG Raster Web, transparency needed ✅ Transparency, ✅ Logos, ✅ All shapes
JPG Raster Photos, smaller file size ❌ Transparency, ✅ Logos, ✅ All shapes
SVG Vector Scalable graphics, print ✅ Infinite scale, ❌ Logos*, ⚠️ Basic shapes only
PDF Document Print, professional sharing ✅ Print-ready, ✅ Logos, ✅ All shapes
BMP/TIFF Raster Legacy systems, archival ✅ Uncompressed, ✅ Logos, ✅ All shapes
💡
SVG Note: SVG output uses QRCoder's native SVG generator which supports basic styling (colors, quiet zone) but not advanced features like custom shapes, gradients, or embedded logos. For full customization, use PNG or PDF.

🎨 Colors & Gradients

ParameterTypeDefaultDescription
primaryColor hex "#000000" Main foreground color for QR modules. Use hex format: #RRGGBB
secondaryColor hex null Gradient end color. Required when using gradient styles.
foregroundStyle string "solid" Fill style for modules.
solid linearGradient radialGradient
gradientType string "linear" Type of gradient when using gradient foregroundStyle.
linear radial
gradientDirection string "vertical" Direction for gradients.
vertical horizontal diagonal diagonal-reverse radial custom
gradientAngle float 0 Custom gradient angle in degrees when gradientDirection is "custom". Range: 0-360.
gradientColors array null Multi-color gradient. Array of hex colors, e.g., ["#FF0000", "#00FF00", "#0000FF"]. Overrides primaryColor/secondaryColor.
gradientOnEyes bool false Apply the gradient to finder patterns (eyes) as well. When false, eyes use solid colors.

🔵 QR Shape (Mask)

Transform the overall shape of your QR code. Perfect for creating circular QR codes like Spotify or Pepsi style.

ParameterTypeDefaultDescription
qrShape string "square" Overall shape/mask of the QR code.
square circle roundedsquare
qrShapeRadius int 0 Corner radius when qrShape is "roundedsquare". Range: 0-50.
💡
Pro Tip: Circular QR codes (qrShape: "circle") work great with moduleShape: "circle" and concentric finder patterns for a cohesive look.

⬡ Module Shapes

Transform the individual data modules of your QR code into unique shapes.

ParameterTypeDefaultDescription
moduleShape string "square" Shape of each QR data module.
square circle roundedSquare diamond star heart hexagon leaf cross
moduleScale float 0.85 Scale of each module relative to cell size. Range: 0.5-1.0. Lower values = more spacing between modules.
moduleRotation float 0 Rotation angle of modules in degrees. Range: 0-360. Great for diagonal effects.
moduleStyle string "solid" Rendering style of modules.
solid outline dotted
moduleOutlineWidth int 2 Stroke width when moduleStyle is "outline". Range: 1-5.
moduleSizeVariation float 0 Random size variation. Range: 0-0.5. Higher = more varied module sizes.

Module Patterns

Advanced module rendering patterns inspired by social media QR codes.

ParameterTypeDefaultDescription
modulePattern string "standard" Pattern style for rendering modules.
standard vertical-lines horizontal-lines diagonal-lines dots-random dots-gradient
💡
Best Practices: Use vertical-lines for YouTube-style QR codes, horizontal-lines for Twitter-style, and dots-random for Instagram-style. Always use eccLevel: "H" for maximum reliability.

👁️ Eye Customization

The three finder patterns (corners) can be styled globally or individually with advanced styles like concentric circles. Individual eye settings override global defaults.

Global Eye Defaults

ParameterTypeDefaultDescription
finderOuterShape string "square" Default shape for the outer frame of all finder patterns.
square circle roundedsquare diamond octagon target double
finderInnerShape string "square" Default shape for the inner pupil of all finder patterns.
square circle roundedsquare diamond star dot
finderOuterColor hex null Default outer frame color. Falls back to primaryColor if not set.
finderInnerColor hex null Default inner pupil color. Falls back to primaryColor if not set.
finderBorderRadius int 0 Corner radius for square/roundedSquare finder shapes. Range: 0-50. Higher = more rounded corners.
finderInnerScale float 0.43 Scale of inner finder relative to outer. Range: 0.25-0.55. Lower = smaller inner, more padding from outer edge.

Advanced Finder Styles

Create unique finder patterns like concentric circles (Pepsi style) or target patterns.

ParameterTypeDefaultDescription
finderStyle string "standard" Advanced rendering style for finder patterns.
standard concentric-circles target
finderConcentricRings int 3 Number of rings when finderStyle is "concentric-circles". Range: 2-5.
finderInnerPattern string "none" Decorative pattern inside the finder center.
none cross star dot

Individual Eye Overrides

ParameterTypeDescription
eye1 object Top-Left finder pattern override.
eye2 object Top-Right finder pattern override.
eye3 object Bottom-Left finder pattern override.

Eye Object Structure

Eye Configuration ObjectJSON
{
                "outerShape": "circle",      // Optional: "square" | "circle" | "roundedSquare" | etc.
                "innerShape": "circle",      // Optional: "square" | "circle" | "roundedSquare" | etc.
                "outerColor": "#ff0000",     // Optional: Hex color for outer frame
                "innerColor": "#0000ff",     // Optional: Hex color for inner pupil
                "rotation": 45,              // Optional: Rotation in degrees (0-360)
                "iconUrl": "https://...",   // Optional: Custom icon URL for finder center
                "iconBase64": "iVBORw..."   // Optional: Base64 icon for finder center
}

🖼️ Background Options

Customize the QR code background with solid colors, transparency, or images.

ParameterTypeDefaultDescription
backgroundColor hex "#FFFFFF" Background color in hex format.
transparentBackground bool false Make the background fully transparent. Requires PNG format for best results.
backgroundImageUrl string null URL to a background/watermark image. Image will be stretched to fill.
backgroundImageBase64 string null Base64-encoded background image. Can include or omit the data URI prefix.
backgroundOpacity float 1.0 Opacity of the background image. Range: 0.0 - 1.0

🔲 Frame Options

Wrap the QR code in a decorative frame. Supports multiple shapes including speech bubbles, badges, and shields with gradient options.

ParameterTypeDefaultDescription
frame.enabled bool false Enable the decorative frame.
frame.shape string "rectangle" Frame shape style.
rectangle speechbubble badge shield
frame.color hex "#000000" Frame border color (primary color for gradients).
frame.secondaryColor hex null Secondary color for gradient frames.
frame.gradientType string "none" Gradient type for the frame border.
none linear radial
frame.fillColor hex null Background fill color inside the frame (different from QR background).
frame.blendMode string "normal" Blend mode for the frame over background.
normal multiply screen overlay ...
frame.width int 10 Border thickness in pixels.
frame.cornerRadius int 20 Rounded corner radius. Use 0 for sharp corners.
frame.style string "solid" Border line style.
solid dashed dotted double
frame.padding int 20 Space between the QR and the frame. Auto-adjusted when cornerRadius is large.

Speech Bubble Options

When using frame.shape: "speechbubble", configure the pointer direction.

ParameterTypeDefaultDescription
frame.speechBubbleDirection string "bottom" Direction of the speech bubble pointer.
bottom top left right
frame.speechBubbleSize int 20 Size of the speech bubble pointer in pixels. Range: 0-100.

✨ Visual Effects

Apply stunning visual effects to your QR code including shadows, neon glow, edge fading, and 3D emboss effects.

Shadow Effect

ParameterTypeDefaultDescription
effects.shadow bool false Enable drop shadow effect on the QR code.
effects.shadowColor hex "#00000040" Shadow color with alpha (RRGGBBAA format supported).
effects.shadowOffsetX int 5 Horizontal shadow offset in pixels.
effects.shadowOffsetY int 5 Vertical shadow offset in pixels.
effects.shadowBlur int 10 Shadow blur radius. Range: 0-50.

Neon Glow Effect

ParameterTypeDefaultDescription
effects.glow bool false Enable neon glow effect around the QR modules.
effects.glowColor hex "#00FF00" Glow color (neon effect color).
effects.glowIntensity int 10 Glow brightness intensity. Range: 1-20.
effects.glowRadius int 15 Glow expansion radius. Range: 1-50.

Edge Fade Effect

Create a dispersing/fading effect where modules gradually fade toward the edges (like Instagram QR style).

ParameterTypeDefaultDescription
effects.edgeFade bool false Enable edge fade/dispersion effect.
effects.edgeFadePercent int 25 Percentage of QR affected by fade. Range: 10-50.
effects.edgeFadeType string "size" How modules fade at edges.
size opacity both

Additional Effects

ParameterTypeDefaultDescription
effects.emboss bool false Enable 3D emboss/elevation effect.
effects.embossDepth int 3 Depth of the 3D effect. Range: 1-10.
effects.noise bool false Add subtle noise/texture to the QR.
effects.noiseIntensity float 0.1 Noise intensity. Range: 0.0-1.0.
effects.blur bool false Enable gaussian blur effect.
effects.blurRadius int 5 Blur radius in pixels. Range: 1-20.
effects.colorFilter string "none" Apply color filter.
none grayscale sepia invert high-contrast

Path Effects

Advanced stroke effects for outline-style modules and decorative patterns.

ParameterTypeDefaultDescription
effects.dashEffect bool false Enable dashed line effect for outline modules.
effects.dashLength float 5 Length of dash segments.
effects.dashGap float 3 Gap between dash segments.
effects.cornerEffect bool false Enable corner rounding for paths.
effects.cornerRadius float 5 Radius for corner smoothing.
effects.wiggleEffect bool false Enable random distortion/wiggle effect for organic look.
effects.wiggleSegmentLength float 3 Segment length for wiggle calculation.
effects.wiggleDeviation float 2 Maximum deviation for wiggle effect.
effects.dotEffect bool false Enable dotted line effect for outline modules.
effects.dotSize float 2 Size of dots in dotted effect.
effects.dotSpacing float 4 Spacing between dots.

Advanced Connectivity

Create organic, liquid, or connected designs by linking adjacent modules.

ParameterTypeDefaultDescription
connectedStyle string "none" Connection style between neighbor modules.
none fluid sharp round
connectionThreshold float 0.5 How much modules stretch to touch neighbors (0.0-1.0).
cornerRounding int 0 Radius for smoothing connections.
isolatedModuleShape string null Shape for modules without neighbors (e.g., "leaf", "circle"). Inherits moduleShape if null.

Custom SVG Shapes

Extreme customization using standard SVG path data strings.

ParameterTypeDefaultDescription
customModuleSvg string null SVG path data (d="M...") for data modules.
customFinderOuterSvg string null SVG path data for finder outer ring.
customFinderInnerSvg string null SVG path data for finder inner center.

🔄 Circular Text

Add curved text around the QR code, perfect for "SCAN ME" badges like the circular QR designs.

ParameterTypeDefaultDescription
circularText.topText string null Text displayed in a curve above the QR (e.g., "SCAN ME").
circularText.bottomText string null Text displayed in a curve below the QR.
circularText.color hex "#000000" Text color.
circularText.fontSize int 20 Font size in points.
circularText.fontFamily string null Font family name (system fonts).
circularText.bold bool true Use bold font weight.
circularText.letterSpacing int 5 Space between characters. Range: 0-50.
circularText.margin int 10 Distance from the QR edge.
circularText.radius int 0 Custom curve radius. 0 = automatic based on QR size.

📐 Scan Corners

Add decorative corner markers around the QR code, similar to camera viewfinder corners.

ParameterTypeDefaultDescription
scanCorners.enabled bool false Enable decorative scan corners.
scanCorners.color hex "#000000" Color of the corner markers.
scanCorners.style string "lines" Style of corner markers.
lines brackets dots
scanCorners.length int 15 Length of corner lines as % of QR size. Range: 5-25.
scanCorners.thickness int 3 Line thickness. Range: 1-10.
scanCorners.offset int 10 Distance from the QR edge. Range: 0-50.

✍️ Text Overlays

Center Text Strip

Add a text band that cuts through the center of the QR code.

ParameterTypeDefaultDescription
centerText.text string Text to display across the QR.
centerText.color hex "#000000" Text color.
centerText.backgroundColor hex "#FFFFFF" Strip background color.
centerText.orientation string "horizontal" Direction of the text strip.
horizontal vertical-rotated vertical-stacked
centerText.height int 40 Thickness of the strip in pixels.
centerText.fontSize int 16 Font size in points.
centerText.bold bool true Use bold font weight.

Footer/Header CTA (Call to Action)

Add promotional text above or below the QR code.

ParameterTypeDefaultDescription
ctaText string null Text displayed near the QR (e.g., "SCAN ME", "Visit our website").
ctaColor hex "#000000" CTA text color.
ctaFontSize int 24 CTA font size in points. Text is always bold.
ctaPosition string "bottom" Position of the CTA text.
bottom top
ctaFontFamily string null Custom font family name (system fonts only).

📚 List Templates

GET /api/qr/templates

Retrieve the list of available pre-designed QR templates. Returns template metadata without the full configuration.

Query Parameters

ParameterTypeDescription
category OPTstringFilter templates by category (e.g., "Technology", "Luxury", "Fun")

Response

200 OK
{
                "success": true,
                "count": 12,
                "categories": ["Artistic", "Corporate", "Events", "Fun", "Luxury", "Nature", "Social", "Technology"],
                "templates": [
    {
                "id": "cyber-neon",
                "name": "Cyber Neon",
                "category": "Technology",
                "description": "Futuristic neon style with hexagon modules and cyan-pink gradient"
    },
    {
                "id": "professional-blue",
                "name": "Professional Blue",
                "category": "Corporate",
                "description": "Clean corporate style with blue gradient, ideal for business"
    },
    ...
  ]
}

🎨 Generate from Template

POST /api/qr/templates/{templateId}

Generate a QR code using a pre-designed template. You can customize the content, logo, output format, and CTA text while keeping the template's visual style intact.

URL Parameters

ParameterTypeDescription
templateId REQstringThe template identifier (e.g., "cyber-neon", "minimalist")

Request Body

ParameterTypeDefaultDescription
content REQstringThe data to encode (URL, text, etc.)
fileFormat OPTstring"png"Output format: png, jpg, svg, pdf, etc.
responseType OPTstring"base64"Response type: base64 or binary
outputWidth OPTint0Output width in pixels (0 = auto)
outputHeight OPTint0Output height in pixels (0 = auto)
logoUrl OPTstringnullURL of logo to embed in QR center
logoBase64 OPTstringnullBase64-encoded logo image
backgroundImageUrl OPTstringnullURL of background image (for Background Integration templates)
backgroundImageBase64 OPTstringnullBase64-encoded background image
ctaText OPTstringnullCall-to-action text below QR (e.g., "SCAN ME")
💡
Template Protection: Visual style properties (colors, shapes, gradients, frames) are locked to the template design. You can only customize content-related properties like the encoded data, logo, output format, and CTA text.

Example Request

Generate QR from TemplatecURL
curl -X POST "https://qr-branding-api.p.rapidapi.com/api/qr/templates/cyber-neon" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding-api.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{
                "content": "https://mycompany.com",
                "logoUrl": "https://mycompany.com/logo.png",
                "ctaText": "SCAN ME",
                "fileFormat": "png",
                "outputWidth": 1024
  }'

Multipart Upload (with Logo File)

Template with Logo File UploadcURL
curl -X POST "https://qr-branding-api.p.rapidapi.com/api/qr/templates/premium-gold" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding-api.p.rapidapi.com" \
  -F 'config={"content":"https://luxury-brand.com","ctaText":"DISCOVER MORE"}' \
  -F "logoFile=@/path/to/logo.png"

Response

200 OK
{
                "success": true,
                "qrBase64": "iVBORw0KGgoAAAANSUhEUgAA...",
                "format": "png",
                "contentType": "image/png",
                "sizeBytes": 24680
}

Error: Template Not Found

404 Not FoundJSON
{
                "success": false,
                "error": {
                "code": "TEMPLATE_NOT_FOUND",
                "message": "Template 'unknown-template' not found. Use GET /api/qr/templates to see available templates.",
                "field": "templateId"
  }
}

🖼️ Template Gallery

Browse our curated collection of pre-designed QR templates. Each template is ready to use with the POST /api/qr/templates/{templateId} endpoint. Click on any template to see its ID.

🤖 AI-Powered QR Generation

POST /api/qr/ai/generate

Generate a custom QR code by describing it in natural language. The AI will interpret your description and create the perfect configuration using all available styling options. Just describe the style, colors, mood, and brand identity - the AI handles the rest!

🌟
Bring Your Own Key: This endpoint requires your own LLM API key (OpenAI, Anthropic, Google, etc.). Your key is never stored - it's used only for the request.

Supported LLM Providers

ProviderIDAvailable Models
OpenAIopenaigpt-5.1, gpt-5, gpt-4o, gpt-4o-mini, gpt-4-turbo
Anthropicanthropicclaude-opus-4.5, claude-opus-4-20250514, claude-sonnet-4-20250514, claude-3-5-sonnet-20241022
Google Geminigooglegemini-3-pro-preview, gemini-2.5-flash, gemini-2.5-pro, gemini-2.0-flash, gemini-1.5-pro
Mistral AImistralmistral-large-latest, mistral-medium-latest, mistral-small-latest
Coherecoherecommand-r-plus, command-r
Groqgroqllama-3.3-70b-versatile, mixtral-8x7b-32768

Request Body

ParameterTypeDefaultDescription
prompt REQstringNatural language description of how you want the QR to look. Be specific about colors, style, mood, shapes, effects, etc.
content REQstringThe data to encode (URL, text, etc.)
llmProvider REQstringLLM provider ID: openai, anthropic, google, mistral, cohere, groq
llmApiKey REQstringYour API key for the selected LLM provider
llmModel OPTstringvariesSpecific model to use. If not provided, uses the provider's default model.
fileFormat OPTstring"png"Output format: png, jpg, svg, pdf, etc.
responseType OPTstring"base64"Response type: base64 or binary
outputWidth OPTint0Output width in pixels (0 = auto)
outputHeight OPTint0Output height in pixels (0 = auto)
logoUrl OPTstringnullURL of logo to embed in QR center
logoBase64 OPTstringnullBase64-encoded logo image
backgroundImageUrl OPTstringnullURL of background image
backgroundImageBase64 OPTstringnullBase64-encoded background image
ctaText OPTstringnullCall-to-action text (e.g., "SCAN ME")
creativity OPTfloat0.5AI creativity level (0.0-1.0). 0 = conservative/minimal, 1 = highly creative/artistic. Affects LLM temperature and design decisions.
strictScannability OPTbooleantrueWhen true, AI prioritizes QR readability over visual creativity. Recommended for production use.
stylePreset OPTstring"balanced"Style preset to guide AI: minimal, balanced, artistic, corporate, playful, luxury, tech, nature

Example Request

AI QR GenerationcURL
curl -X POST "https://qr-branding-api.p.rapidapi.com/api/qr/ai/generate" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding-api.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Create a modern tech startup QR code with a gradient from electric blue to purple, circular modules, neon glow effect, dark background, and rounded finder patterns. Make it look futuristic and premium.",
    "content": "https://mycompany.com",
    "llmProvider": "openai",
    "llmApiKey": "sk-your-openai-api-key",
    "llmModel": "gpt-4o-mini",
    "logoUrl": "https://mycompany.com/logo.png",
    "ctaText": "SCAN TO CONNECT"
  }'

Example Response

JSON ResponseJSON
{
  "success": true,
  "qrBase64": "iVBORw0KGgoAAAANSUhEUgAAA...",
  "format": "png",
  "contentType": "image/png",
  "sizeBytes": 45892,
  "generatedConfig": {
    "primaryColor": "#0066FF",
    "secondaryColor": "#9933FF",
    "foregroundStyle": "linearGradient",
    "gradientDirection": "diagonal",
    "backgroundColor": "#0a0a12",
    "moduleShape": "circle",
    "finderOuterShape": "roundedsquare",
    "finderInnerShape": "circle",
    "finderBorderRadius": 15,
    "effects": {
      "glow": true,
      "glowColor": "#0066FF",
      "glowIntensity": 12
    }
  },
  "aiExplanation": "Created a futuristic design with blue-to-purple gradient, circular modules for a modern feel, and neon glow effect on a dark background to achieve the premium tech aesthetic.",
  "llmProviderUsed": "openai",
  "llmModelUsed": "gpt-4o-mini"
}

Prompt Tips

Write Better Prompts:
  • Be specific about colors: "electric blue", "rose gold", "forest green"
  • Describe the mood: "professional", "playful", "luxurious", "minimalist"
  • Mention your industry: "tech startup", "wedding invitation", "restaurant menu"
  • Request specific effects: "neon glow", "drop shadow", "3D emboss"
  • Specify shapes: "circular modules", "heart-shaped finders", "diamond pattern"
  • Reference styles: "Instagram-like gradient", "Spotify green theme", "TikTok colors"

📋 List AI Providers

GET /api/qr/ai/providers

Get the list of supported LLM providers and their available models.

Example Request

List AI ProviderscURL
curl -X GET "https://qr-branding-api.p.rapidapi.com/api/qr/ai/providers" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding-api.p.rapidapi.com"

Example Response

JSON ResponseJSON
{
  "success": true,
  "count": 6,
  "providers": [
    {
      "id": "openai",
      "name": "OpenAI",
      "defaultModel": "gpt-4o-mini",
      "availableModels": ["gpt-5.1", "gpt-5", "gpt-4o", "gpt-4o-mini", "gpt-4-turbo", "gpt-3.5-turbo"]
    },
    {
      "id": "anthropic",
      "name": "Anthropic",
      "defaultModel": "claude-sonnet-4-20250514",
      "availableModels": ["claude-opus-4.5", "claude-opus-4-20250514", "claude-sonnet-4-20250514", "claude-3-5-sonnet-20241022"]
    },
    {
      "id": "google",
      "name": "Google Gemini",
      "defaultModel": "gemini-2.0-flash",
      "availableModels": ["gemini-3-pro-preview", "gemini-2.5-flash", "gemini-2.5-pro", "gemini-2.0-flash", "gemini-1.5-pro"]
    }
  ]
}

📶 Generate WiFi String

POST /api/qr/content/wifi

Generate a WiFi connection string that users can scan to auto-connect to a network.

Request Parameters

ParameterTypeDefaultDescription
ssid REQ string Network name (SSID).
password REQ string Network password.
encryption string "WPA" Encryption type.
WPA WPA2 WEP nopass
hidden bool false Whether the network SSID is hidden.
RequestJSON
{
                "ssid": "MyNetwork",
                "password": "secret123",
                "encryption": "WPA",
                "hidden": false
}
200 OK
{
                "text": "WIFI:S:MyNetwork;T:WPA;P:secret123;H:false;;"
}

👤 Generate vCard String

POST /api/qr/content/vcard

Generate a vCard contact string that adds contact info directly to the scanner's address book.

Request Parameters

ParameterTypeDescription
firstNamestringFirst name
lastNamestringLast name
phonestringPhone number (include country code)
emailstringEmail address
orgstringOrganization/Company name
urlstringWebsite URL
RequestJSON
{
                "firstName": "John",
                "lastName": "Doe",
                "phone": "+1234567890",
                "email": "john@example.com",
                "org": "Acme Inc",
                "url": "https://example.com"
}
200 OK
{
                "text": "BEGIN:VCARD\nVERSION:3.0\nN:Doe;John\nFN:John Doe\nORG:Acme Inc\nTEL:+1234567890\nEMAIL:john@example.com\nURL:https://example.com\nEND:VCARD"
}

📍 Generate Geo String

POST /api/qr/content/geo

Generate a geographic location string that opens the location in the user's maps app.

Request Parameters

ParameterTypeDescription
lat REQdoubleLatitude coordinate
lng REQdoubleLongitude coordinate
RequestJSON
{
                "lat": 40.7128,
                "lng": -74.0060
}
200 OK
{
                "text": "geo:40.7128,-74.006"
}

⚠️ Error Codes Reference

The API uses standardized error responses across all endpoints. Every error response includes a structured JSON body with detailed information to help you debug and handle errors gracefully.

Error Response Format

Error Response StructureJSON
{
                "success": false,
                "error": {
                "code": "ERROR_CODE",
                "message": "Human-readable error description",
                "field": "fieldName",         // Optional: affected field
                "details": [...]              // Optional: multiple validation errors
  }
}

HTTP Status Codes

CodeStatusDescription
200OKRequest successful
400Bad RequestInvalid input, validation error, or malformed JSON
401UnauthorizedMissing or invalid API authentication
404Not FoundResource or endpoint not found
500Internal ErrorServer-side error during processing

Validation Errors (400)

These errors occur when input data doesn't meet the required format or constraints.

Error CodeDescriptionExample
VALIDATION_ERROR General validation failure (may contain multiple errors) Validation failed with 3 errors.
INVALID_JSON Request body is not valid JSON Invalid JSON body: Unexpected character at position 45
MISSING_REQUIRED_FIELD A required field is missing or empty The 'content' field is required and cannot be empty.
INVALID_FIELD_VALUE Field value is not one of the allowed values Invalid logo shape 'triangle'. Allowed: square, circle.
INVALID_COLOR_FORMAT Color is not a valid hex format Invalid color format for 'primaryColor': 'red'. Use hex format (#RGB, #RRGGBB, or #RRGGBBAA).
INVALID_FILE_FORMAT Unsupported file format requested Invalid file format 'webp'. Allowed: png, jpg, jpeg, bmp, gif, svg, pdf.
CONTENT_TOO_LONG QR content exceeds maximum length Content length (5000) exceeds maximum allowed (4296 characters).
FILE_TOO_LARGE Uploaded file exceeds size limit Logo file size (15728640 bytes) exceeds maximum allowed (10MB).
INVALID_URL URL format is invalid Invalid URL format for 'logoUrl'. URL must start with http:// or https://.
INVALID_ECC_LEVEL Invalid error correction level Invalid ECC level 'X'. Allowed values: L, M, Q, H.
INVALID_MODULE_SHAPE Invalid module shape specified Invalid module shape 'triangle'. Allowed: square, circle, roundedsquare, diamond, star, heart, hexagon, leaf.
INVALID_GRADIENT_TYPE Invalid gradient type Invalid gradient type 'conic'. Allowed: linear, radial.
INVALID_RESPONSE_TYPE Invalid response type requested Invalid response type 'file'. Allowed: base64, binary.
VALUE_OUT_OF_RANGE Numeric value outside allowed range PixelsPerModule (150) must be between 1 and 100.
MULTIPART_CONFIG_MISSING Multipart request missing config field Multipart request requires a 'config' field containing JSON configuration.

Authentication Errors (401)

Error CodeDescriptionExample
UNAUTHORIZED Authentication failed or missing Missing authentication header. Please use RapidAPI to access this API.
INVALID_API_KEY API key is invalid or expired Invalid authentication. Please use RapidAPI to access this API.
LLM_API_KEY_INVALID LLM provider API key is invalid (AI endpoint only) OpenAI API error: 401 - Invalid API key provided.

🤖 AI Generation Errors

These errors are specific to the AI-powered QR generation endpoint.

Error CodeHTTPDescriptionExample
INVALID_LLM_PROVIDER 400 Unsupported LLM provider specified Unsupported LLM provider 'chatgpt'. Supported providers: openai, anthropic, google, mistral, cohere, groq
INVALID_LLM_MODEL 400 Model not available for the selected provider Model 'gpt-6' is not available for OpenAI. Available models: gpt-5.1, gpt-5, gpt-4o, gpt-4o-mini
LLM_API_KEY_INVALID 401 The provided LLM API key is invalid OpenAI API error: 401 - Invalid API key provided.
AI_GENERATION_FAILED 500 AI failed to generate a valid configuration Failed to generate QR configuration from AI. Please check your API key and try again.
AI_CONFIG_INVALID 500 AI generated an invalid QR configuration AI generated an invalid configuration. Validation errors: Invalid color format...
AI_REQUEST_TIMEOUT 500 LLM API request timed out Request timed out. Please try again.

Server Errors (500)

Error CodeDescriptionExample
INTERNAL_ERROR Unexpected server error An unexpected error occurred while processing your request. Please try again later.
QR_GENERATION_FAILED QR code generation engine failed Failed to generate QR code. Please check your configuration and try again.

Error Response Examples

Missing Required Field

400 Bad RequestJSON
{
                "success": false,
                "error": {
                "code": "MISSING_REQUIRED_FIELD",
                "message": "The 'content' field is required and cannot be empty.",
                "field": "content"
  }
}

Invalid Color Format

400 Bad RequestJSON
{
                "success": false,
                "error": {
                "code": "INVALID_COLOR_FORMAT",
                "message": "Invalid color format for 'primaryColor': 'blue'. Use hex format (#RGB, #RRGGBB, or #RRGGBBAA).",
                "field": "primaryColor"
  }
}

Multiple Validation Errors

400 Bad RequestJSON
{
                "success": false,
                "error": {
                "code": "VALIDATION_ERROR",
                "message": "Validation failed with 3 errors.",
                "details": [
      {
                "field": "content",
                "code": "MISSING_REQUIRED_FIELD",
                "message": "The 'content' field is required and cannot be empty."
      },
      {
                "field": "primaryColor",
                "code": "INVALID_COLOR_FORMAT",
                "message": "Invalid color format for 'primaryColor': 'red'.",
                "value": "red"
      },
      {
                "field": "pixelsPerModule",
                "code": "VALUE_OUT_OF_RANGE",
                "message": "PixelsPerModule (200) must be between 1 and 100.",
                "value": 200
      }
    ]
  }
}

Invalid JSON

400 Bad RequestJSON
{
                "success": false,
                "error": {
                "code": "INVALID_JSON",
                "message": "Invalid JSON body: 'c' is an invalid start of a property name. Expected a '\"'. LineNumber: 2 | BytePositionInLine: 2."
  }
}

Authentication Error

401 UnauthorizedJSON
{
                "success": false,
                "error": {
                "code": "UNAUTHORIZED",
                "message": "Missing authentication header. Please use RapidAPI to access this API."
  }
}

Server Error

500 Internal Server ErrorJSON
{
                "success": false,
                "error": {
                "code": "QR_GENERATION_FAILED",
                "message": "Failed to generate QR code. Please check your configuration and try again."
  }
}
💡
Best Practice: Always check the success field first, then parse the error.code to programmatically handle specific error cases. The error.field property helps identify which input parameter caused the error.

Field Validation Constraints

FieldConstraints
contentRequired. Max 4,296 characters
eccLevelMust be: L, M, Q, H
pixelsPerModule1 - 100
fileFormatpng, jpg, jpeg, bmp, gif, svg, pdf, tiff
responseTypebase64, binary
outputWidth/Height0 - 8,192 pixels
backgroundOpacity0.0 - 1.0
Colors (all)Hex format: #RGB, #RRGGBB, #RRGGBBAA
foregroundStylesolid, linearGradient, radialGradient
gradientTypelinear, radial
gradientDirectionvertical, horizontal, diagonal, diagonal-reverse, radial, custom
qrShapesquare, circle, roundedsquare
moduleShapesquare, circle, roundedsquare, diamond, star, heart, hexagon, leaf, cross, dot, mosaic, clipped, clippedsmooth, pointed, pointedinward, pointedsmooth, pill, roundedinward, roundedpointed, circlestripe, japanese, octagon, shield, arrow, drop
modulePatternstandard, vertical-lines, horizontal-lines, diagonal-lines, dots-random, dots-gradient
moduleStylesolid, outline, dotted
moduleBlendModenormal, multiply, screen, overlay, darken, lighten, colorburn, colordodge, hardlight, softlight, difference, exclusion
finderOuterShapesquare, circle, roundedsquare, diamond, octagon, target, double
finderInnerShapesquare, circle, roundedsquare, diamond, star, dot
finderStylestandard, concentric-circles, target
finderInnerPatternnone, cross, star, dot
finderBorderRadius0 - 50
finderInnerScale0.25 - 0.55
moduleScale0.5 - 1.0
logoShapesquare, circle
logoBackgroundnone, solid, blur
logoBorderWidth0 - 50
logoSizePercent3 - 40
logoPadding0+
frame.shaperectangle, speechbubble, badge, shield
frame.stylesolid, dashed, dotted, double
scanCorners.stylelines, brackets, dots
effects.edgeFadeTypesize, opacity, both
ctaPositionbottom, top
ctaFontSize1 - 200
frame.width0 - 100
frame.cornerRadius0 - 500
frame.padding0 - 200
frame.stylesolid, dashed
centerText.fontSize1 - 200
centerText.height1 - 500
centerText.orientationhorizontal, vertical-rotated, vertical-stacked
URLs (logo, background)Must start with http:// or https://. Max 2,048 characters
Logo file (multipart)Max 10 MB
WiFi ssidRequired. Max 32 characters
WiFi passwordRequired unless encryption is 'nopass'. Max 63 characters
WiFi encryptionWPA, WPA2, WPA3, WEP, nopass
Geo latitude-90 to 90
Geo longitude-180 to 180