API Reference

Complete parameter reference for the QRzap REST API and MCP tool.

Endpoint

GET/api/generate?type=...&...
POST/api/generateJSON body

Base URL: https://qrzap.fun

CORS enabled. No authentication required. Rate limited to 60 requests/minute per IP.

HeaderDescription
X-RateLimit-LimitMax requests per window (60)
X-RateLimit-RemainingRequests left in current window
X-RateLimit-ResetUnix timestamp when window resets

Common Parameters

ParamTypeDefaultDescription
typestring-Required. url, wifi, phone, email, sms, vcard, text
sizenumber400Image size in pixels
formatstringpngpng or svg
errorCorrectionstringML, M, Q, or H

QR Types

urlrequired: url
{ "type": "url", "url": "https://example.com" }
textrequired: text
{ "type": "text", "text": "Hello World" }
phonerequired: phone
{ "type": "phone", "phone": "+1234567890" }
wifirequired: ssidoptional: password, encryption (WPA|WEP|nopass), hidden
{ "type": "wifi", "ssid": "MyNetwork", "password": "secret", "encryption": "WPA" }
emailrequired: emailoptional: subject, body
{ "type": "email", "email": "hi@example.com", "subject": "Hello" }
smsrequired: phoneoptional: message
{ "type": "sms", "phone": "+1234567890", "message": "Hey!" }
vcardrequired: firstNameoptional: lastName, phone, email, org, url
{ "type": "vcard", "firstName": "John", "lastName": "Doe", "phone": "+1234567890" }

Responses

format=png (default)

Content-Type: image/png

Binary PNG data

format=svg

Content-Type: image/svg+xml

SVG markup string

Errors

Errors return JSON with an error field.

{ "error": "Invalid type. Valid: url, wifi, phone, email, sms, vcard, text" }

MCP Tool Schema

The MCP server exposes one tool: generate_qr. Same parameters as the REST API. Returns base64 PNG image or SVG text.

// MCP tool call
{
  "name": "generate_qr",
  "arguments": {
    "type": "wifi",
    "ssid": "Office",
    "password": "guest123"
  }
}