API Documentation

Everything you need to integrate QRKit into your application.

Base URL

https://www.qrkit.site/api/v1

Authentication

Include your API key in the Authorization header:

Authorization: Bearer qk_your_api_key_here

Get your API key from the Dashboard.

Generate QR Code

POST/qrcode

Request Body

ParameterTypeRequiredDefaultDescription
datastringYes-URL or text to encode (max 4296 chars)
sizenumberNo300Image size in pixels (100-2000)
formatstringNopngOutput format: png, svg, jpg
fgColorstringNo#000000Foreground hex color
bgColorstringNo#ffffffBackground hex color
logostringNo-URL of logo to overlay in center
logoSizenumberNo0.3Logo size ratio (0.1-0.4)
stylestringNosquareDot style: square, rounded, dots
ecLevelstringNoMError correction: L, M, Q, H
marginnumberNo2Margin in modules (0-10)
templatestringNo-Template ID or slug (see Templates)

Success Response (200)

{
  "success": true,
  "data": {
    "id": "qr_abc123",
    "url": "https://pub-xxxx.r2.dev/qr_abc123.png",
    "size": 300,
    "format": "png",
    "createdAt": "2026-04-17T10:00:00Z"
  }
}

Try It Out

Fill in the parameters below and generate a QR code instantly.

QR code preview will appear here

curl -X POST https://www.qrkit.site/api/v1/qrcode \
  -H "Authorization: Bearer qk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "data": "https://example.com",
    "size": 300,
    "style": "square",
    "fgColor": "#000000",
    "bgColor": "#ffffff",
    "format": "png"
  }'

Style Templates

Use templates to apply pre-configured styles. Pass a template slug or ID in the template parameter.

Built-in Templates

Classic

Black on white, square

classic

Dark Mode

White on dark blue

dark-mode

Ocean Dots

Blue dots on white

ocean-dots

Rounded Warm

Red rounded on cream

rounded-warm

Minimal

Gray rounded, subtle

minimal

Custom Templates

Create and manage your own templates via the API:

# List templates (built-in + yours)
GET /api/templates

# Create a custom template
POST /api/templates
{
  "name": "My Brand",
  "config": { "fgColor": "#ff0000", "style": "rounded" }
}

# Delete a custom template
DELETE /api/templates/{id}

Batch Generation

POST/qrcode/batchPro+

Generate up to 50 QR codes in a single request. Each item is processed independently.

curl -X POST https://www.qrkit.site/api/v1/qrcode/batch \
  -H "Authorization: Bearer qk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "ocean-dots",
    "items": [
      { "data": "https://a.com" },
      { "data": "https://b.com", "fgColor": "#ff0000" },
      { "data": "https://c.com", "size": 500 }
    ]
  }'

Response

{
  "success": true,
  "data": {
    "results": [
      { "index": 0, "success": true, "data": { "id": "...", "url": "...", ... } },
      { "index": 1, "success": true, "data": { "id": "...", "url": "...", ... } },
      { "index": 2, "success": true, "data": { "id": "...", "url": "...", ... } }
    ],
    "total": 3,
    "succeeded": 3,
    "failed": 0
  }
}

Error Codes

CodeStatusDescription
UNAUTHORIZED401Missing or invalid API key
INVALID_KEY401API key not found or deactivated
INVALID_PARAMS400Invalid request parameters
MISSING_DATA400Required "data" parameter missing
RATE_LIMITED429Too many requests per minute
QUOTA_EXCEEDED429Monthly request limit reached
TEMPLATE_NOT_FOUND404Template slug/ID not found
PLAN_NOT_SUPPORTED403Feature requires Pro or Enterprise plan
GENERATION_FAILED500Internal QR generation error

Get Usage Statistics

GET/account/usage
curl https://www.qrkit.site/api/v1/account/usage \
  -H "Authorization: Bearer qk_your_key"