Skip to content

QR Branding API

The most customizable QR code API available. Generate stunning, branded, ISO 18004-compliant QR codes with 37 module shapes, 118 templates, AI-powered design, and 5 output formats.

Subscribe on RapidAPI: rapidapi.com/quartzondev/api/qr-branding. Plans and quotas are listed on the RapidAPI page.


Quick Start

1. Generate a Custom QR Code

curl -X POST "https://qr-branding.p.rapidapi.com/api/qr/generate" \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding.p.rapidapi.com" \
  -d '{
    "content": "https://example.com",
    "primaryColor": "#1a1a2e",
    "backgroundColor": "#FFFFFF",
    "moduleShape": "circle",
    "fileFormat": "png",
    "outputWidth": 512,
    "eccLevel": "H"
  }'

Response:

{
  "success": true,
  "qrBase64": "iVBORw0KGgoAAAANSUhEUg...",
  "format": "png",
  "contentType": "image/png",
  "sizeBytes": 15234
}

2. Generate from a Template

curl -X POST "https://qr-branding.p.rapidapi.com/api/qr/templates/cyber-neon" \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding.p.rapidapi.com" \
  -d '{
    "content": "https://mywebsite.com",
    "outputWidth": 600
  }'

3. AI-Powered QR Code

curl -X POST "https://qr-branding.p.rapidapi.com/api/qr/ai/generate" \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: qr-branding.p.rapidapi.com" \
  -d '{
    "prompt": "A luxurious gold and black QR code with rounded modules and a subtle glow effect, suitable for a premium brand",
    "content": "https://premium-brand.com",
    "llmProvider": "openai",
    "llmApiKey": "sk-your-openai-key",
    "creativity": 0.7,
    "strictScannability": true,
    "stylePreset": "luxury"
  }'

Response:

{
  "success": true,
  "qrBase64": "iVBORw0KGgoAAAANSUhEUg...",
  "format": "png",
  "contentType": "image/png",
  "sizeBytes": 28456,
  "generatedConfig": { },
  "aiExplanation": "I designed a premium QR code with...",
  "llmProviderUsed": "openai",
  "llmModelUsed": "gpt-6-luna"
}

Code Examples

Python

import requests

url = "https://qr-branding.p.rapidapi.com/api/qr/generate"
headers = {
    "Content-Type": "application/json",
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "qr-branding.p.rapidapi.com"
}
payload = {
    "content": "https://example.com",
    "primaryColor": "#FF6B35",
    "moduleShape": "star",
    "eccLevel": "H",
    "outputWidth": 800,
    "fileFormat": "png"
}

response = requests.post(url, json=payload, headers=headers)
data = response.json()

if data["success"]:
    import base64
    img_bytes = base64.b64decode(data["qrBase64"])
    with open("my_qr.png", "wb") as f:
        f.write(img_bytes)
    print(f"QR saved! Size: {data['sizeBytes']} bytes")

JavaScript (Node.js)

const response = await fetch(
  "https://qr-branding.p.rapidapi.com/api/qr/generate",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
      "X-RapidAPI-Host": "qr-branding.p.rapidapi.com",
    },
    body: JSON.stringify({
      content: "https://example.com",
      primaryColor: "#0066FF",
      moduleShape: "hexagon",
      eccLevel: "H",
      outputWidth: 600,
      fileFormat: "png",
    }),
  }
);

const data = await response.json();

if (data.success) {
  const buffer = Buffer.from(data.qrBase64, "base64");
  require("fs").writeFileSync("qr_code.png", buffer);
  console.log(`QR generated: ${data.sizeBytes} bytes`);
}

Features Overview

CategoryDetails
Module Shapes37: square, circle, diamond, star, heart, hexagon, leaf, cross, dot, mosaic, clipped, edgecut, pointed, pill, rounded, japanese, octagon, shield, arrow, drop + custom SVG
Templates118 pre-designed across 28 categories
AI Providers9 LLM providers plus any OpenAI-compatible endpoint (bring your own key), or Managed AI with no key
Output FormatsPNG, JPEG, SVG, PDF, WebP
Max Resolution4,096 × 4,096 pixels
GradientsLinear, radial, sweep with unlimited color stops
Visual EffectsShadow, glow/neon, emboss/3D, noise, blur, edge fade, color filters
Logo SupportURL or Base64, circle/square/rounded shapes, shadow, custom sizing
Text OverlaysCircular text, center stripe, CTA banners
FramesRectangle, speech bubble, badge, shield, circle
Error CorrectionL (7%), M (15%), Q (25%), H (30%) — ISO 18004
Content HelpersWiFi, vCard, Geolocation string generators
Background ImagesURL/Base64, blend modes, fit modes, blur
Connected ModulesFluid, sharp, round connections for artistic designs

Template Categories (28)

Technology, Corporate, Social, Luxury, Nature, Artistic, Marketing, Events, Music, Fun, Background, Culture, Industry, Restaurant, Retail, Education, Travel, Automotive, Healthcare, Social Media, Art & Design, Business, Food & Drink, Finance, Health, Legal, Non-Profit, Real Estate.

Use GET /api/qr/templates?category=luxury to filter by category.


AI Providers & Models

ProviderModels
OpenAIgpt-6-astra, gpt-6.1-sol, gpt-6-luna, gpt-6-sol, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-4.1-mini
Anthropicclaude-fable-5-1, claude-opus-5-5, claude-sonnet-5-5, claude-haiku-4-5
Googlegemini-3.1-pro-preview, gemini-3.8-flash, gemini-3.5-flash-lite, gemini-3.5-flash
Mistralmistral-large-latest, mistral-medium-latest, mistral-small-latest
Coherecommand-a-plus-05-2026, command-a-03-2025, command-a-reasoning-08-2025, command-r7b-12-2024
Groqopenai/gpt-oss-120b, openai/gpt-oss-20b, llama-3.3-70b-versatile
xAIgrok-4.7, grok-4.3, grok-4.20-0309-non-reasoning
DeepSeekdeepseek-v4-pro, deepseek-flash
Qwenqwen3.8-max, qwen3.7-plus, qwen3.8-flash
LocalAny OpenAI-compatible endpoint (Ollama, LM Studio, vLLM); set llmProvider: "local" and pass localEndpoint

Any model ID your provider offers works; this list shows recommended ones.

Note: on /api/qr/ai/generate you provide your own API key for the chosen LLM provider and the provider bills you directly; QR Branding adds no markup. On /api/qr/ai/generate-managed no LLM key is needed: we run the models, and those calls count towards the separate Managed AI quota of your plan.


Endpoints

POST /api/qr/generate — Generate Custom QR

Generate a fully customizable QR code with 100+ parameters including module shapes, gradients, effects, logos, text overlays, frames, and more. Supports JSON body or multipart/form-data for logo file upload.

Request Body:

{
  "content": "https://example.com",
  "eccLevel": "H",
  "pixelsPerModule": 20,
  "outputWidth": 512,
  "fileFormat": "png",
  "quality": 90,
  "responseType": "base64",
  "backgroundColor": "#FFFFFF",
  "transparentBackground": false,
  "primaryColor": "#000000",
  "secondaryColor": null,
  "foregroundStyle": "solid",
  "gradientType": "linear",
  "gradientDirection": "vertical",
  "gradientColors": ["#FF0000", "#0000FF"],
  "gradientStops": [0.0, 1.0],
  "gradientAngle": 0,
  "qrShape": "square",
  "moduleShape": "square",
  "moduleScale": 0.85,
  "moduleRotation": 0,
  "moduleStyle": "solid",
  "modulePattern": "standard",
  "connectedStyle": "none",
  "finderOuterShape": "square",
  "finderInnerShape": "square",
  "finderOuterColor": "#000000",
  "finderInnerColor": "#000000",
  "finderStyle": "standard",
  "logoUrl": "https://example.com/logo.png",
  "logoShape": "circle",
  "logoSizePercent": 18,
  "logoBorderWidth": 2,
  "logoBorderColor": "#FFFFFF",
  "logoShadow": true,
  "logoBackground": "solid",
  "ctaText": "SCAN ME"
}

Response 200:

{
  "success": true,
  "qrBase64": "iVBORw0KGgoAAAANSUhEUg...",
  "format": "png",
  "contentType": "image/png",
  "sizeBytes": 15234
}

Response 400:

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Validation failed with 1 error.",
    "details": [
      {
        "field": "moduleShape",
        "code": "INVALID_MODULE_SHAPE",
        "message": "Invalid module shape 'triangle'. Valid shapes: square, circle, diamond, star, heart, hexagon, leaf, cross, dot, mosaic, clipped, edgecut, pointed, pill, rounded, japanese, octagon, shield, arrow, drop."
      }
    ]
  }
}

POST /api/qr/ai/generate — Generate AI QR

Describe your ideal QR code in natural language and let AI design it for you. Supports 9 LLM providers plus any OpenAI-compatible endpoint (local); any model ID your provider offers is accepted. Here you provide your own LLM API key; if you prefer not to use one, call POST /api/qr/ai/generate-managed (below).

Request Body:

{
  "prompt": "A modern tech-style QR code with hexagonal modules, a blue-to-purple gradient, subtle glow effect, and rounded finder patterns",
  "content": "https://myapp.com",
  "llmProvider": "openai",
  "llmApiKey": "sk-your-api-key-here",
  "llmModel": "gpt-6-luna",
  "creativity": 0.7,
  "strictScannability": true,
  "stylePreset": "tech",
  "fileFormat": "png",
  "outputWidth": 800,
  "logoUrl": "https://example.com/logo.png",
  "ctaText": "Download App"
}

Response 200:

{
  "success": true,
  "qrBase64": "iVBORw0KGgoAAAANSUhEUg...",
  "format": "png",
  "contentType": "image/png",
  "sizeBytes": 28456,
  "generatedConfig": {
    "content": "https://myapp.com",
    "moduleShape": "hexagon",
    "primaryColor": "#4A90D9",
    "gradientColors": ["#4A90D9", "#7B2FF7"],
    "gradientType": "linear",
    "gradientDirection": "vertical",
    "finderOuterShape": "roundedsquare",
    "finderInnerShape": "circle",
    "eccLevel": "H"
  },
  "aiExplanation": "I designed a tech-inspired QR code with hexagonal modules...",
  "llmProviderUsed": "openai",
  "llmModelUsed": "gpt-6-luna"
}

POST /api/qr/ai/generate-managed — Managed AI (no LLM key)

Same request shape as /api/qr/ai/generate, but llmProvider, llmApiKey and llmModel are ignored: no LLM key is needed. The engine uses its own models with a fallback chain (Groq → Gemini). Calls count towards the Managed AI quota of your plan.

{
  "prompt": "A luxurious gold and black QR with rounded modules and a subtle glow effect",
  "content": "https://premium-brand.com",
  "creativity": 0.7,
  "strictScannability": true,
  "stylePreset": "luxury",
  "fileFormat": "png",
  "outputWidth": 800
}

The response has the same shape as /api/qr/ai/generate, plus the field "managed": true.


GET /api/qr/ai/providers — Get AI Providers

List all supported LLM providers and their available models for AI-powered QR generation.

Response 200:

{
  "success": true,
  "count": 10,
  "providers": [
    {
      "id": "openai",
      "name": "OpenAI",
      "defaultModel": "gpt-6-luna",
      "availableModels": ["gpt-6-astra", "gpt-6.1-sol", "gpt-6-luna", "gpt-6-sol", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-4.1-mini"]
    },
    {
      "id": "anthropic",
      "name": "Anthropic",
      "defaultModel": "claude-sonnet-5-5",
      "availableModels": ["claude-fable-5-1", "claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-4-5"]
    }
  ]
}

GET /api/qr/templates — List Templates

Browse 118 professionally designed QR code templates across 28 categories.

Query Parameters:

ParameterTypeRequiredDescription
categorystringNoFilter by category (e.g., luxury, corporate, social)

Response 200:

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

POST /api/qr/templates/{templateId} — Generate from Template

Generate a QR code using a pre-designed template. The template's visual design is preserved; you can optionally override output settings.

Path Parameters:

ParameterTypeRequiredDescription
templateIdstringYesTemplate ID from the List Templates endpoint (e.g., cyber-neon)

Request Body:

{
  "content": "https://mywebsite.com",
  "fileFormat": "png",
  "responseType": "base64",
  "outputWidth": 600,
  "logoUrl": "https://example.com/logo.png",
  "ctaText": "Visit Us"
}

Response 200:

{
  "success": true,
  "qrBase64": "iVBORw0KGgoAAAANSUhEUg...",
  "format": "png",
  "contentType": "image/png",
  "sizeBytes": 22100
}

POST /api/qr/content/wifi — Generate WiFi String

Generate a WiFi connection string for QR encoding. Users who scan the QR code will be prompted to connect to the network automatically.

Request Body:

{
  "ssid": "MyNetwork",
  "password": "MyP@ssw0rd!",
  "encryption": "WPA",
  "hidden": false
}

Response 200:

{
  "success": true,
  "text": "WIFI:T:WPA;S:MyNetwork;P:MyP@ssw0rd!;H:false;;"
}

POST /api/qr/content/vcard — Generate vCard String

Generate a vCard contact string for QR encoding. When scanned, the QR code will prompt users to save the contact to their phone.

Request Body:

{
  "firstName": "John",
  "lastName": "Doe",
  "phone": "+1-555-123-4567",
  "email": "john.doe@example.com",
  "org": "Acme Corp",
  "url": "https://johndoe.com"
}

Response 200:

{
  "success": true,
  "text": "BEGIN:VCARD\nVERSION:3.0\nN:Doe;John\nFN:John Doe\nTEL:+1-555-123-4567\nEMAIL:john.doe@example.com\nORG:Acme Corp\nURL:https://johndoe.com\nEND:VCARD"
}

POST /api/qr/content/geo — Generate Geolocation String

Generate a geolocation URI for QR encoding. When scanned, the QR code will open the location in the user's default maps app.

Request Body:

{
  "lat": 40.7128,
  "lng": -74.0060
}

Response 200:

{
  "success": true,
  "text": "geo:40.7128,-74.006"
}

POST /api/qr/scan-check — Check that a design scans

Simulate how a printed code reads back before you send it to the printer. Send the same QrConfig as /api/qr/generate (content is the only required field) and the engine renders that exact design and decodes it under 13 simulated conditions: baseline, small-print, far-away, slight-blur, strong-blur, dim-light, low-contrast, uneven-light, glare, noise, rotated, angle-30 and angle-40. This is a simulation, never a guarantee: it reports what the render reads back under those conditions, not that every phone will scan it. Output settings (fileFormat, responseType, outputWidth, outputHeight, pixelsPerModule) are ignored because the check renders its own PNG.

Request Body:

{
  "content": "https://example.com/menu",
  "eccLevel": "H",
  "primaryColor": "#1a1a2e",
  "backgroundColor": "#FFFFFF",
  "moduleShape": "circle",
  "finderOuterShape": "roundedsquare"
}

Response 200:

{
  "success": true,
  "grade": "good",
  "symbolModules": 33,
  "version": 4,
  "smallestModulePx": 1.5,
  "conditions": [
    { "id": "baseline", "core": true, "passed": true, "adaptiveReader": true, "globalReader": true },
    { "id": "small-print", "core": true, "passed": true, "adaptiveReader": true, "globalReader": true },
    { "id": "glare", "core": false, "passed": true, "adaptiveReader": true, "globalReader": false },
    { "id": "angle-40", "core": false, "passed": false, "adaptiveReader": false, "globalReader": false }
  ],
  "sizes": [
    { "id": "table", "distanceCm": 40, "minSideMm": 55 },
    { "id": "wall", "distanceCm": 150, "minSideMm": 200 },
    { "id": "street", "distanceCm": 400, "minSideMm": 530 }
  ],
  "designScore": 96,
  "designWarnings": [],
  "elapsedMs": 812
}

grade is excellent, good, fair or poor. Each condition reports passed, core (required for a good grade) and which of the engine's two decoders read it (adaptiveReader, globalReader; together they give the reader count, 0–2). sizes gives the minimum printed side in millimetres to read from a table (40 cm), a wall (1.5 m) and the street (4 m); minSideMm is null when the design did not read at any probed resolution. designScore is the engine's static ISO 18004 design score (0–100) and designWarnings lists the QrConfig fields its rules flagged.

Errors: 400 validation (VALIDATION_ERROR, INVALID_JSON, MISSING_REQUIRED_FIELD) · 401 UNAUTHORIZED · 500 QR_GENERATION_FAILED.


GET /api/qr/templates/{templateId}/config — Read a template's design

Read a template's design without rendering a QR code. config is the template's full QrConfig: take any of its fields, add your own content and send the result to /api/qr/generate to render a tweaked version.

Path Parameters:

ParameterTypeRequiredDescription
templateIdstringYesTemplate ID from the List Templates endpoint (e.g., cyber-neon)

Response 200:

{
  "success": true,
  "id": "cyber-neon",
  "name": "Cyber Neon",
  "category": "Technology",
  "description": "Futuristic glowing neon style with diamond modules and vibrant cyan-pink gradient",
  "config": {
    "eccLevel": "H",
    "primaryColor": "#00f2ea",
    "secondaryColor": "#FF7AA4",
    "backgroundColor": "#0a0a12",
    "foregroundStyle": "linearGradient",
    "gradientDirection": "diagonal",
    "moduleShape": "diamond",
    "finderOuterShape": "roundedsquare",
    "finderInnerShape": "diamond",
    "logoSizePercent": 22
  }
}

Errors: 404 TEMPLATE_NOT_FOUND when the id does not exist.


POST /api/qr/poster — Generate a print-ready poster

Wrap one QR design in a print-ready poster: A4, A5, A6 (portrait) or US Letter, with an optional headline, instruction line and footer, the design's logo, 3 mm bleed and crop marks. qr takes exactly the /api/qr/generate body; its fileFormat and responseType are ignored because the poster decides the file. PDF output is vector and carries the same scan guarantee as /api/qr/generate; PNG is for previews.

Request Body:

{
  "qr": {
    "content": "https://example.com/menu",
    "eccLevel": "H",
    "primaryColor": "#1a1a2e",
    "backgroundColor": "#FFFFFF",
    "moduleShape": "circle"
  },
  "poster": {
    "format": "a4",
    "layout": "band",
    "headline": "Scan the menu",
    "instruction": "Point your camera at the code",
    "footer": "example.com",
    "showLogo": true,
    "bleed": true,
    "cropMarks": true,
    "fileFormat": "pdf",
    "responseType": "base64"
  }
}

Poster Options:

ParameterTypeDefaultDescription
formatstringa4Trim size: a4, a5, a6 (portrait) or letter (US Letter, portrait)
layoutstringminimalminimal, band (header band in the accent colour), card (bordered card) or tent (folding table tent)
headlinestring—Large title above the QR
instructionstring—Short line under the QR (e.g., "Point your camera at the code")
footerstring—Small footer line, e.g. a website or a short URL
showLogobooleantrueDraw the design's logo at the top of the poster
bleedbooleanfalseAdd a 3 mm bleed around the trim; backgrounds and bands run into it
cropMarksbooleanfalseDraw crop marks outside the trim
accentColorstringCTA/module colourBrand colour for the headline, band and card border; defaults to the CTA frame colour, else the module colour
fileFormatstringpdfpdf (vector, print) or png (raster, previews)
dpiinteger150Resolution of a PNG poster, 36–300 dpi (ignored for PDF)
responseTypestringbase64base64 (JSON, like /api/qr/generate) or binary (the file itself)

Response 200:

{
  "success": true,
  "qrBase64": "JVBERi0xLjQKJcfsj6IK...",
  "format": "pdf",
  "contentType": "application/pdf",
  "sizeBytes": 184320
}

With "responseType": "binary" the response is the file itself (application/pdf or image/png).

Errors: 400 validation · 401 UNAUTHORIZED · 422 QR_UNSCANNABLE when the code cannot be read back · 422 OUTPUT_TOO_COMPLEX when the PDF would exceed 20 MB · 500 QR_GENERATION_FAILED.


GET /api/ping — Liveness probe

Check that the API is reachable without spending a generation.

Response 200:

{
  "status": "ok"
}

Errors: 429 when the per-IP probe rate limit is exceeded (10 probes per minute).


Error Handling

All errors follow a consistent format:

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Validation failed with 2 errors.",
    "details": [
      {
        "field": "primaryColor",
        "code": "INVALID_COLOR_FORMAT",
        "message": "Invalid color format. Use hex (#RRGGBB or #RRGGBBAA).",
        "value": "not-a-color"
      }
    ]
  }
}

Error Codes

Validation (400) VALIDATION_ERROR · INVALID_JSON · MISSING_REQUIRED_FIELD · INVALID_FIELD_VALUE · INVALID_COLOR_FORMAT · INVALID_FILE_FORMAT · CONTENT_TOO_LONG · FILE_TOO_LARGE · INVALID_URL · INVALID_ECC_LEVEL · INVALID_MODULE_SHAPE · INVALID_GRADIENT_TYPE · INVALID_RESPONSE_TYPE · VALUE_OUT_OF_RANGE · MULTIPART_CONFIG_MISSING

Authentication (401) UNAUTHORIZED · INVALID_API_KEY · MISSING_API_KEY

Not Found (404) RESOURCE_NOT_FOUND · TEMPLATE_NOT_FOUND

AI/LLM Errors (400/500) INVALID_LLM_PROVIDER · INVALID_LLM_MODEL · LLM_API_KEY_INVALID · AI_GENERATION_FAILED · AI_CONFIG_INVALID · AI_REQUEST_TIMEOUT

Output budget (422) OUTPUT_TOO_COMPLEX — the design would produce an SVG or PDF over 20 MB or a canvas over 5120 px per side. Export as PNG, shorten the content or use simpler module shapes

Capacity (503) SERVER_BUSY · AI_QUOTA_EXCEEDED (managed AI is out of quota on every provider; try again later)

Server Errors (500) INTERNAL_ERROR · QR_GENERATION_FAILED · LOGO_LOAD_FAILED · BACKGROUND_LOAD_FAILED


Terms of Use

By calling this API through the marketplace you accept the RapidAPI Terms of Use and our marketplace terms: https://qr-branding.com/docs/rapidapi/terms (effective 2026-10-07).

  • Billing and plans are sold and invoiced by RapidAPI. Quotas, overage, refunds and cancellations go through the RapidAPI billing portal, not us.
  • Authentication is injected by RapidAPI as the X-RapidAPI-Proxy-Secret header. Keep your X-RapidAPI-Key confidential and never ship it in client-side code or public repositories.
  • Every request counts toward your quota, including the ones that end in an error such as 422 QR_UNSCANNABLE, because RapidAPI meters calls, not outcomes.
  • Scan guarantee: every render is decoded server-side before delivery. When a design cannot be read back, the API returns 422 instead of an image. That verifies the file, it does not guarantee every camera at every distance.
  • Acceptable use: no unlawful content, no key sharing beyond your plan, no attempts to bypass rate limits or the proxy-secret check.
  • Governing law: Spain. The full text of this section lives at https://qr-branding.com/docs/rapidapi/terms