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
frameId string optional Frame template ID. See Frames

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). 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
frameId string optional Frame template ID. See Frame Templates

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,
    "errorCorrectionLevel": "H",
    "frameId": "scan-me"
  }' \
  --output qrcode.png

Response

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

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
  }
}

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

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)
Part of the SoftVoyagers Ecosystem