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.
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
Generate a QR code via URL parameters. Perfect for embedding directly in HTML <img> tags. Responses are cached for 1 hour.
Query Parameters
| Param | Type | Required | Description |
|---|---|---|---|
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
<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
Generate a single styled QR code with custom colors, logo, and optional frame. Returns a PNG or SVG image.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
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 -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.pngResponse
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 "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
{
"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
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!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
Generate multiple QR codes in a single request. Returns a ZIP archive containing all generated images. Maximum 500 items per batch.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
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 -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.zipResponse
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
List all available frame templates.
Example Request
curl "https://qrmint.dev/api/v1/frames"
Example Response
{
"status": "success",
"data": {
"frames": [
{
"id": "scan-me",
"name": "Scan Me",
"description": "Classic 'Scan Me' call-to-action frame"
},
...
],
"count": 6
}
}GET /types
List all supported structured QR data types with their required and optional fields.
GET /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
| Parameter | Type | Description |
|---|---|---|
type | string | Required. QR data type: wifi, vcard, email, phone, sms, event, epc, geo |
| Type-specific parameters (see POST /generate/typed for field details) | ||
foreground | string | Hex color without # (default: 000000) |
background | string | Hex color without # or "transparent" (default: ffffff) |
size | number | 64–2048 pixels (default: 512) |
format | string | png or svg (default: png) |
style | string | square, rounded, dots, classy-rounded |
eyeShape | string | Finder pattern shape: square, rounded, circle, leaf |
frameId | string | Frame template ID |
frameLabel | string | Custom frame text (max 50 chars) |
gradientType | string | linear or radial |
gradientColors | string | Comma-separated hex colors (2–4) |
output | string | raw (default) or base64 — returns JSON with data URI |
Examples
WiFi QR code (embeddable)
<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 "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 "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
https://qrmint.dev/api/v1/generate/typed?type=epc&name=Max+Mustermann&iban=DE89370400440532013000&amount=42.50&text=Invoice+%231234
Geographic location
https://qrmint.dev/api/v1/generate/typed?type=geo&latitude=52.5200&longitude=13.4050&label=Berlin
POST /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
| Type | Required Fields | Optional Fields |
|---|---|---|
wifi | ssid | password, encryption (WPA|WEP|nopass), hidden |
vcard | firstName, lastName | phone, email, organization, title, url, address (object) |
email | to | subject, body |
phone | number | — |
sms | number | message |
event | title, start (ISO 8601) | end, location, description |
epc | name, iban | amount, bic, reference, text, purpose |
geo | latitude, longitude | label |
All styling parameters from /generate (foreground, background, size, margin, format, style, frameId, frameLabel, logo, logoSize, errorCorrectionLevel, output) are also supported.
EPC (SEPA Payment) Fields
| Parameter | Type | Description |
|---|---|---|
name | string | Required. Beneficiary name (max 70 characters) |
iban | string | Required. International Bank Account Number |
amount | number | Amount in EUR (0.01–999999999.99) |
bic | string | BIC/SWIFT code (8 or 11 characters) |
reference | string | Structured creditor reference (max 35 chars). Mutually exclusive with text |
text | string | Unstructured remittance info (max 140 chars). Mutually exclusive with reference |
purpose | string | SEPA purpose code (max 4 characters) |
Geo (Location) Fields
| Parameter | Type | Description |
|---|---|---|
latitude | number | Required. Latitude (-90 to 90) |
longitude | number | Required. Longitude (-180 to 180) |
label | string | Location name shown in maps app (max 100 characters) |
Example: WiFi QR Code
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.pngExample: vCard QR Code
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.pngExample: Calendar Event
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.pngExample: EPC SEPA Payment
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.pngExample: Geographic Location
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.pngParameters Reference
Error Correction Levels
| Level | Recovery Capacity | Use 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:
#000000- Black#ffffff- White#ff00aa- Neon pink (cyberpunk)#00f0ff- Electric cyan
Frame Templates
QRMint includes 6 professional frame templates to enhance your QR codes:
| Frame ID | Name | Description |
|---|---|---|
scan-me | Scan Me | Classic "SCAN ME" call-to-action |
menu | Menu | Restaurant menu frame with "VIEW OUR MENU" |
wifi | WiFi | WiFi connection frame with icon |
payment | Payment | Payment/checkout frame "PAY HERE" |
social-instagram | Instagram profile frame "FOLLOW US" | |
social-linkedin | LinkedIn 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
| Status | Meaning |
|---|---|
400 | Bad Request — Missing required field (data) or invalid parameter values |
404 | Not Found — Endpoint does not exist |
429 | Too Many Requests — Rate limit exceeded (30 req/min) |
500 | Internal Server Error — QR generation failed |
Error Response Format
{
"error": "Validation error",
"message": "\"data\" field is required"
}Rate Limits
The API applies rate limiting to protect service quality:
| Limit | Value |
|---|---|
| Requests per minute | 30 per IP address |
| Window | 60 seconds sliding window |
When rate limited, the API returns a 429 status with a Retry-After header.
RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset.
cURL Examples
Basic QR Code
curl -X POST "https://qrmint.dev/api/v1/generate" \
-H "Content-Type: application/json" \
-d '{"data": "https://example.com"}' \
--output qrcode.pngStyled with Frame
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.pngGradient Foreground
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=45JavaScript Examples
Browser Usage
// 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
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
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
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):
{
"mcpServers": {
"qrmint": {
"command": "npx",
"args": ["-y", "qrmint-mcp"]
}
}
}Available Tools
| Tool | Description | Parameters |
|---|---|---|
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
| Variable | Default | Description |
|---|---|---|
QRMINT_BASE_URL |
https://qrmint.dev |
Override the base URL for API requests (useful for self-hosted instances) |