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.
✨ Key Features
🎯 Use Cases
🚀 Quick Start
Generate your first branded QR code in seconds. Copy the example below:
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"
}'
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.
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY X-RapidAPI-Host: qr-branding-api.p.rapidapi.com
Generate Custom QR
The primary endpoint. Send a JSON configuration object to generate a fully customized QR code image. Returns a Base64-encoded image.
Complete Example Request
{
// Required
"content": "https://mybrand.com",
// Output Settings
"outputWidth": 1024,
"fileFormat": "png",
// Style
"moduleShape": "circle",
"primaryColor": "#6366f1",
"secondaryColor": "#ec4899",
"gradientType": "radial",
"backgroundColor": "#ffffff",
// Eye Customization
"eye1": {
"outerShape": "circle",
"outerColor": "#6366f1"
},
// Frame
"frame": {
"enabled": true,
"color": "#6366f1",
"width": 8,
"cornerRadius": 20
},
// Logo
"logoUrl": "https://example.com/logo.png",
"logoShape": "circle",
// Text
"ctaText": "SCAN ME"
}
Response (Base64 Mode)
When responseType: "base64" (default), you receive a JSON response:
{
"success": true,
"qrBase64": "iVBORw0KGgoAAAANSUhEUgAA...",
"format": "png",
"contentType": "image/png",
"sizeBytes": 24680
}
Response Fields
| Field | Type | Description |
|---|---|---|
| success | bool | Whether the generation succeeded |
| qrBase64 | string | Base64-encoded file data |
| format | string | File extension (png, jpg, svg, pdf, etc.) |
| contentType | string | MIME type for the file |
| sizeBytes | int | File size in bytes |
Response (Binary Mode)
When responseType: "binary", you receive the file directly:
// Binary file data returned directly // Content-Disposition: attachment; filename="qrcode.png" // Content-Type: image/png (or image/svg+xml, application/pdf, etc.)
<img> tag:
<img src="data:{contentType};base64,{qrBase64}" />
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 -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 -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
| Field | Type | Description |
|---|---|---|
| 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
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
| Parameter | Type | Default | Description |
|---|---|---|---|
| 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| 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
bmp
gif
tiff
svg
pdf
|
| responseType | string | "base64" |
How to receive the generated QR code.
base64
binary
|
Response Types Explained
| Type | Response | Use 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
| Format | Type | Best For | Features |
|---|---|---|---|
| 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 |
| Document | Print, professional sharing | ✅ Print-ready, ✅ Logos, ✅ All shapes | |
| BMP/TIFF | Raster | Legacy systems, archival | ✅ Uncompressed, ✅ Logos, ✅ All shapes |
🎨 Colors & Gradients
| Parameter | Type | Default | Description |
|---|---|---|---|
| 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 linear gradients.
vertical
horizontal
diagonal
|
| gradientOnEyes | bool | false | Apply the gradient to finder patterns (eyes) as well. When false, eyes use solid colors. |
⬡ Module Shapes
Transform the individual data modules of your QR code into unique shapes.
| Parameter | Type | Default | Description |
|---|---|---|---|
| moduleShape | string | "square" |
Shape of each QR data module. All shapes are scaled to 85% of the module size for visual separation.
square
circle
roundedSquare
diamond
star
heart
hexagon
leaf
|
square, circle, or roundedSquare. Artistic shapes like star or heart work best with high error correction (eccLevel: "H").
👁️ Eye Customization
The three finder patterns (corners) can be styled globally or individually. Individual eye settings override global defaults.
Global Eye Defaults
| Parameter | Type | Default | Description |
|---|---|---|---|
| finderOuterShape | string | "square" |
Default shape for the outer frame of all finder patterns.
square
circle
roundedSquare
|
| finderInnerShape | string | "square" | Default shape for the inner pupil of all finder patterns. Same values as above. |
| 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. |
Individual Eye Overrides
| Parameter | Type | Description |
|---|---|---|
| eye1 | object | Top-Left finder pattern override. |
| eye2 | object | Top-Right finder pattern override. |
| eye3 | object | Bottom-Left finder pattern override. |
Eye Object Structure
{
"outerShape": "circle", // Optional: "square" | "circle" | "roundedSquare"
"innerShape": "circle", // Optional: "square" | "circle" | "roundedSquare"
"outerColor": "#ff0000", // Optional: Hex color for outer frame
"innerColor": "#0000ff" // Optional: Hex color for inner pupil
}
🖼️ Background Options
Customize the QR code background with solid colors, transparency, or images.
| Parameter | Type | Default | Description |
|---|---|---|---|
| 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 border frame. The frame automatically adjusts padding to prevent corner overlap.
| Parameter | Type | Default | Description |
|---|---|---|---|
| frame.enabled | bool | false | Enable the decorative frame. |
| frame.color | hex | "#000000" | Frame border color. |
| 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 style.
solid
dashed
|
| frame.padding | int | 20 | Space between the QR and the frame. Auto-adjusted when cornerRadius is large. |
🏷️ Logo Integration
Embed a logo in the center of your QR code. The logo is automatically sized to ~22% of the QR area.
| Parameter | Type | Default | Description |
|---|---|---|---|
| logoUrl | string | null | URL to the logo image. Must be publicly accessible. |
| logoBase64 | string | null | Base64-encoded logo image. Supports data URI format. |
| logoShape | string | "square" |
Logo clipping shape.
square
circle
|
| logoBorderWidth | int | 0 | Border thickness around the logo. 0 = no border. |
| logoBorderColor | hex | "#FFFFFF" | Color of the logo border. |
| cleanBehindLogo | bool | true | Remove QR modules behind the logo for a cleaner look. Requires eccLevel: "H" for reliable scanning. |
cleanBehindLogo: true, always use eccLevel: "H" (High error correction) to ensure the QR remains scannable.
✍️ Text Overlays
Center Text Strip
Add a text band that cuts through the center of the QR code.
| Parameter | Type | Default | Description |
|---|---|---|---|
| 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 CTA (Call to Action)
Add promotional text below the QR code.
| Parameter | Type | Default | Description |
|---|---|---|---|
| ctaText | string | null | Text displayed below 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. |
📚 Get Templates
Retrieve a curated library of pre-designed QR configurations. Use these as starting points or apply them directly.
Available Templates
Response
{
"success": true,
"count": 12,
"templates": [
{
"id": "tech-neon",
"name": "Cyber Neon",
"category": "Technology",
"config": { ... }
},
...
]
}
📶 Generate WiFi String
Generate a WiFi connection string that users can scan to auto-connect to a network.
Request Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| 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. |
{
"ssid": "MyNetwork",
"password": "secret123",
"encryption": "WPA",
"hidden": false
}
{
"text": "WIFI:S:MyNetwork;T:WPA;P:secret123;H:false;;"
}
👤 Generate vCard String
Generate a vCard contact string that adds contact info directly to the scanner's address book.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| firstName | string | First name |
| lastName | string | Last name |
| phone | string | Phone number (include country code) |
| string | Email address | |
| org | string | Organization/Company name |
| url | string | Website URL |
{
"firstName": "John",
"lastName": "Doe",
"phone": "+1234567890",
"email": "john@example.com",
"org": "Acme Inc",
"url": "https://example.com"
}
{
"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
Generate a geographic location string that opens the location in the user's maps app.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| lat REQ | double | Latitude coordinate |
| lng REQ | double | Longitude coordinate |
{
"lat": 40.7128,
"lng": -74.0060
}
{
"text": "geo:40.7128,-74.006"
}