QRMint API Documentation

Generate styled QR codes with custom colors, logos, and professional frames. The API is completely free and open — no API keys, no authentication required. Perfect for marketing materials, product packaging, event tickets, and digital campaigns.

Base URL: https://qrmint.dev/api/v1

Authentication

No authentication is required. The API is free and open for everyone. Simply make HTTP POST requests to the /generate or /batch endpoints with JSON body.

GET /generate

GET /api/v1/generate?data=...

Generate a QR code via URL parameters. Perfect for embedding directly in HTML <img> tags. Responses are cached for 1 hour.

Query Parameters

ParamTypeRequiredDescription
data string required Data to encode (URL-encoded)
foreground string optional Foreground color (6-char hex without #). Default: 000000
background string optional Background color (6-char hex without #). Default: ffffff
size number optional Size in pixels (64-2048). Default: 512
errorCorrectionLevel string optional L, M, Q, or H. Default: M
format string optional png or svg. Default: png
style string optional Module shape: square, rounded, dots, or classy-rounded. Default: square
eyeShape string optional Finder pattern (eye) shape: square, rounded, circle, or leaf. Default: square
frameId string optional Frame template ID. See Frames
frameLabel string optional Custom text for the frame label (max 50 chars). Overrides the frame's default text (e.g., use your own language or CTA)
gradientType string optional Gradient type: linear or radial. When set, overrides foreground
gradientColors string optional Comma-separated hex colors without # (2-4 colors). Example: ff0000,0000ff
gradientAngle number optional Angle for linear gradients (0-360). Default: 0
output string optional raw (default) or base64 — returns JSON with data URI instead of binary image. See Base64 Output

HTML Embed Example

HTML
<img src="https://qrmint.dev/api/v1/generate?data=https://example.com" alt="QR Code" />

<!-- With custom styling -->
<img src="https://qrmint.dev/api/v1/generate?data=https://example.com&foreground=ff00aa&background=0a0a0f&size=512&frameId=scan-me" alt="Styled QR Code" />

POST /generate

POST /api/v1/generate

Generate a single styled QR code with custom colors, logo, and optional frame. Returns a PNG or SVG image.

Request Body

FieldTypeRequiredDescription
data string required Data to encode (URL, text, contact info, etc.)
foreground string optional Foreground color (hex). Default: #000000
background string optional Background color (hex) or "transparent". Default: #ffffff
size number optional Size in pixels (64-2048). Default: 512
margin number optional Margin in modules (0-10). Default: 4
errorCorrectionLevel string optional Error correction: L, M, Q, or H. Default: M
logo string optional Base64 encoded logo image (PNG, JPG, SVG)
logoSize number optional Logo size percentage (1-30). Default: 20
format string optional Output format: png or svg. Default: png
style string optional Module shape: square, rounded, dots, or classy-rounded. Default: square
eyeShape string optional Finder pattern (eye) shape: square, rounded, circle, or leaf. Default: square
frameId string optional Frame template ID. See Frame Templates
frameLabel string optional Custom text for the frame label (max 50 chars). Overrides the frame's default text
gradient object optional Gradient foreground. Overrides foreground color when set. Object with: type ("linear" or "radial"), colors (array of 2-4 hex colors), angle (0-360, for linear only)
output string optional Response format: raw (default, binary image) or base64 (JSON with data URI). See Base64 Output

Example Request

cURL
curl -X POST "https://qrmint.dev/api/v1/generate" \
  -H "Content-Type: application/json" \
  -d '{
    "data": "https://example.com",
    "foreground": "#ff00aa",
    "background": "#0a0a0f",
    "size": 512,
    "style": "dots",
    "errorCorrectionLevel": "H",
    "frameId": "scan-me"
  }' \
  --output qrcode.png

Response

Returns image binary data (PNG or SVG) with appropriate Content-Type header.

Base64 Output Mode

Add output=base64 to any generation endpoint (GET or POST) to receive a JSON response with a base64-encoded data URI instead of raw binary. This is ideal for embedding in React Native apps, emails, databases, or any context where binary blobs are inconvenient.

Example Request

cURL
curl "https://qrmint.dev/api/v1/generate?data=https://example.com&output=base64"

# POST with base64 output:
curl -X POST "https://qrmint.dev/api/v1/generate" \
  -H "Content-Type: application/json" \
  -d '{"data": "https://example.com", "style": "dots", "output": "base64"}'

Example Response

JSON
{
  "status": "success",
  "data": {
    "image": "data:image/png;base64,iVBORw0KGgoAAAANSUh...",
    "format": "png",
    "mimeType": "image/png",
    "dataLength": 12345
  }
}

The image field contains a complete data URI ready to use in <img src="..."> tags, CSS background-image, or store directly in a database.

Usage Examples

JavaScript
const res = await fetch('https://qrmint.dev/api/v1/generate?data=https://example.com&output=base64');
const { data } = await res.json();
document.getElementById('qr').src = data.image;  // Ready to use!
Python
import requests, base64
resp = requests.get('https://qrmint.dev/api/v1/generate', params={'data': 'https://example.com', 'output': 'base64'})
image_data = resp.json()['data']['image']  # data:image/png;base64,...
# Save to file:
b64 = image_data.split(',')[1]
with open('qr.png', 'wb') as f:
    f.write(base64.b64decode(b64))

POST /batch

POST /api/v1/batch

Generate multiple QR codes in a single request. Returns a ZIP archive containing all generated images. Maximum 500 items per batch.

Request Body

FieldTypeRequiredDescription
items array required Array of QR code configurations (max 500)
items[].data string required Data to encode in this QR code
items[].filename string required Filename for this QR code in the ZIP (e.g., qr1.png)
All parameters from /generate endpoint are also supported per item

Example Request

cURL
curl -X POST "https://qrmint.dev/api/v1/batch" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "data": "https://example.com/product1",
        "filename": "product1.png",
        "frameId": "scan-me"
      },
      {
        "data": "https://example.com/product2",
        "filename": "product2.png",
        "foreground": "#ff0000"
      }
    ]
  }' \
  --output qrcodes.zip

Response

Returns a ZIP archive (application/zip) containing all generated QR codes. If any items fail, an errors.txt file is included in the archive.

GET /frames

GET /api/v1/frames

List all available frame templates.

Example Request

cURL
curl "https://qrmint.dev/api/v1/frames"

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "frames": [
      {
        "id": "scan-me",
        "name": "Scan Me",
        "description": "Classic 'Scan Me' call-to-action frame"
      },
      ...
    ],
    "count": 6
  }
}

GET /types

GET /api/v1/types

List all supported structured QR data types with their required and optional fields.

GET /generate/typed

GET /api/v1/generate/typed

Generate a typed QR code via query parameters. Perfect for embedding structured QR codes directly in HTML <img> tags — no JavaScript or POST requests needed.

Query Parameters

ParameterTypeDescription
typestringRequired. QR data type: wifi, vcard, email, phone, sms, event, epc, geo
Type-specific parameters (see POST /generate/typed for field details)
foregroundstringHex color without # (default: 000000)
backgroundstringHex color without # or "transparent" (default: ffffff)
sizenumber64–2048 pixels (default: 512)
formatstringpng or svg (default: png)
stylestringsquare, rounded, dots, classy-rounded
eyeShapestringFinder pattern shape: square, rounded, circle, leaf
frameIdstringFrame template ID
frameLabelstringCustom frame text (max 50 chars)
gradientTypestringlinear or radial
gradientColorsstringComma-separated hex colors (2–4)
outputstringraw (default) or base64 — returns JSON with data URI

Examples

WiFi QR code (embeddable)

HTML
<img src="https://qrmint.dev/api/v1/generate/typed?type=wifi&ssid=CafeWiFi&password=latte123&frameId=wifi" alt="WiFi QR code">

vCard contact card

cURL
curl "https://qrmint.dev/api/v1/generate/typed?type=vcard&firstName=John&lastName=Doe&phone=%2B1234567890&email=john@example.com&style=rounded" -o contact.png

Calendar event with gradient

cURL
curl "https://qrmint.dev/api/v1/generate/typed?type=event&title=Team+Meeting&start=2026-04-01T10:00:00Z&location=Office&gradientType=linear&gradientColors=ff00aa,00f0ff" -o event.png

EPC SEPA payment

URL
https://qrmint.dev/api/v1/generate/typed?type=epc&name=Max+Mustermann&iban=DE89370400440532013000&amount=42.50&text=Invoice+%231234

Geographic location

URL
https://qrmint.dev/api/v1/generate/typed?type=geo&latitude=52.5200&longitude=13.4050&label=Berlin

POST /generate/typed

POST /api/v1/generate/typed

Generate a QR code from structured data. Instead of hand-building WiFi config strings or vCard payloads, pass JSON and QRMint encodes it for you.

Supported Types

TypeRequired FieldsOptional Fields
wifissidpassword, encryption (WPA|WEP|nopass), hidden
vcardfirstName, lastNamephone, email, organization, title, url, address (object)
emailtosubject, body
phonenumber
smsnumbermessage
eventtitle, start (ISO 8601)end, location, description
epcname, ibanamount, bic, reference, text, purpose
geolatitude, longitudelabel

All styling parameters from /generate (foreground, background, size, margin, format, style, frameId, frameLabel, logo, logoSize, errorCorrectionLevel, output) are also supported.

EPC (SEPA Payment) Fields

ParameterTypeDescription
namestringRequired. Beneficiary name (max 70 characters)
ibanstringRequired. International Bank Account Number
amountnumberAmount in EUR (0.01–999999999.99)
bicstringBIC/SWIFT code (8 or 11 characters)
referencestringStructured creditor reference (max 35 chars). Mutually exclusive with text
textstringUnstructured remittance info (max 140 chars). Mutually exclusive with reference
purposestringSEPA purpose code (max 4 characters)

Geo (Location) Fields

ParameterTypeDescription
latitudenumberRequired. Latitude (-90 to 90)
longitudenumberRequired. Longitude (-180 to 180)
labelstringLocation name shown in maps app (max 100 characters)

Example: WiFi QR Code

cURL
curl -X POST "https://qrmint.dev/api/v1/generate/typed" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "wifi",
    "ssid": "CafeNetwork",
    "password": "welcome2024",
    "encryption": "WPA",
    "frameId": "wifi"
  }' \
  --output wifi-qr.png

Example: vCard QR Code

cURL
curl -X POST "https://qrmint.dev/api/v1/generate/typed" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "vcard",
    "firstName": "Jane",
    "lastName": "Smith",
    "phone": "+1234567890",
    "email": "jane@example.com",
    "organization": "Acme Inc",
    "title": "CTO",
    "size": 1024,
    "errorCorrectionLevel": "H"
  }' \
  --output contact.png

Example: Calendar Event

cURL
curl -X POST "https://qrmint.dev/api/v1/generate/typed" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "event",
    "title": "Product Launch",
    "start": "2026-04-01T14:00:00Z",
    "end": "2026-04-01T16:00:00Z",
    "location": "Main Auditorium",
    "description": "Annual product launch event"
  }' \
  --output event-qr.png

Example: EPC SEPA Payment

cURL
curl -X POST "https://qrmint.dev/api/v1/generate/typed" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "epc",
    "name": "Max Mustermann",
    "iban": "DE89370400440532013000",
    "amount": 42.50,
    "text": "Invoice #1234"
  }' \
  --output epc-payment.png

Example: Geographic Location

cURL
curl -X POST "https://qrmint.dev/api/v1/generate/typed" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "geo",
    "latitude": 52.5200,
    "longitude": 13.4050,
    "label": "Brandenburg Gate, Berlin"
  }' \
  --output location.png

Parameters Reference

Error Correction Levels

LevelRecovery CapacityUse Case
L~7%Clean environments
M~15%Standard usage (default)
Q~25%Industrial environments
H~30%High risk of damage/dirt

Color Formats

All color parameters accept hex format (#RRGGBB or #RGB). Examples:

Frame Templates

QRMint includes 6 professional frame templates to enhance your QR codes:

Frame IDNameDescription
scan-meScan MeClassic "SCAN ME" call-to-action
menuMenuRestaurant menu frame with "VIEW OUR MENU"
wifiWiFiWiFi connection frame with icon
paymentPaymentPayment/checkout frame "PAY HERE"
social-instagramInstagramInstagram profile frame "FOLLOW US"
social-linkedinLinkedInLinkedIn profile frame "CONNECT"

Note: Frames are only supported for PNG format. If you request a frame with SVG format, the frame will not be applied.

Error Codes

StatusMeaning
400Bad Request — Missing required field (data) or invalid parameter values
404Not Found — Endpoint does not exist
429Too Many Requests — Rate limit exceeded (30 req/min)
500Internal Server Error — QR generation failed

Error Response Format

400 Bad Request
{
  "error": "Validation error",
  "message": "\"data\" field is required"
}

Rate Limits

The API applies rate limiting to protect service quality:

LimitValue
Requests per minute30 per IP address
Window60 seconds sliding window

When rate limited, the API returns a 429 status with a Retry-After header.

Rate limit headers are included in every response: RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset.

cURL Examples

Basic QR Code

terminal
curl -X POST "https://qrmint.dev/api/v1/generate" \
  -H "Content-Type: application/json" \
  -d '{"data": "https://example.com"}' \
  --output qrcode.png

Styled with Frame

terminal
curl -X POST "https://qrmint.dev/api/v1/generate" \
  -H "Content-Type: application/json" \
  -d '{
    "data": "https://example.com",
    "foreground": "#ff00aa",
    "background": "#0a0a0f",
    "size": 1024,
    "errorCorrectionLevel": "H",
    "frameId": "scan-me"
  }' \
  --output qrcode.png

Gradient Foreground

terminal
curl -X POST "https://qrmint.dev/api/v1/generate" \
  -H "Content-Type: application/json" \
  -d '{
    "data": "https://example.com",
    "style": "dots",
    "gradient": {
      "type": "linear",
      "colors": ["#ff00aa", "#00f0ff"],
      "angle": 45
    }
  }' \
  --output gradient-qr.png

# Or via GET:
# https://qrmint.dev/api/v1/generate?data=https://example.com&gradientType=linear&gradientColors=ff00aa,00f0ff&gradientAngle=45

JavaScript Examples

Browser Usage

app.js
// Generate QR code and display in <img> tag
const response = await fetch('https://qrmint.dev/api/v1/generate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    data: 'https://example.com',
    foreground: '#ff00aa',
    background: '#0a0a0f',
    size: 512,
    frameId: 'scan-me'
  })
});

const blob = await response.blob();
const url = URL.createObjectURL(blob);
document.getElementById('qr-image').src = url;

Node.js with File Save

generate.js
const fs = require('fs');
const fetch = require('node-fetch');

const response = await fetch('https://qrmint.dev/api/v1/generate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    data: 'https://example.com',
    size: 1024,
    errorCorrectionLevel: 'H'
  })
});

const buffer = await response.buffer();
fs.writeFileSync('qrcode.png', buffer);

Python Examples

Basic Generation

generate.py
import requests

response = requests.post(
    'https://qrmint.dev/api/v1/generate',
    json={
        'data': 'https://example.com',
        'foreground': '#ff00aa',
        'background': '#0a0a0f',
        'size': 512,
        'errorCorrectionLevel': 'H',
        'frameId': 'scan-me'
    }
)

with open('qrcode.png', 'wb') as f:
    f.write(response.content)

Batch Generation

batch.py
import requests

# Generate multiple QR codes
response = requests.post(
    'https://qrmint.dev/api/v1/batch',
    json={
        'items': [
            {
                'data': 'https://example.com/product1',
                'filename': 'product1.png',
                'frameId': 'scan-me'
            },
            {
                'data': 'https://example.com/product2',
                'filename': 'product2.png',
                'foreground': '#00ff00'
            }
        ]
    }
)

# Save ZIP archive
with open('qrcodes.zip', 'wb') as f:
    f.write(response.content)

MCP Integration

QRMint supports the Model Context Protocol (MCP), allowing AI assistants like Claude, VS Code Copilot, Cursor, and other MCP-compatible clients to generate QR codes directly.

Installation

Add the following to your claude_desktop_config.json (or equivalent MCP client configuration):

claude_desktop_config.json
{
  "mcpServers": {
    "qrmint": {
      "command": "npx",
      "args": ["-y", "qrmint-mcp"]
    }
  }
}

Available Tools

ToolDescriptionParameters
generate_qr Generate a styled QR code with custom options data (required), foreground, background, size, margin, errorCorrectionLevel, format, frameId, frameLabel (all optional)
list_frames List all available frame templates None

Environment Variables

VariableDefaultDescription
QRMINT_BASE_URL https://qrmint.dev Override the base URL for API requests (useful for self-hosted instances)
Part of the SoftVoyagers Ecosystem