API Reference
Complete parameter reference for the QRzap REST API and MCP tool.
Endpoint
GET
/api/generate?type=...&...POST
/api/generateJSON bodyBase URL: https://qrzap.fun
CORS enabled. No authentication required. Rate limited to 60 requests/minute per IP.
| Header | Description |
|---|---|
| X-RateLimit-Limit | Max requests per window (60) |
| X-RateLimit-Remaining | Requests left in current window |
| X-RateLimit-Reset | Unix timestamp when window resets |
Common Parameters
| Param | Type | Default | Description |
|---|---|---|---|
| type | string | - | Required. url, wifi, phone, email, sms, vcard, text |
| size | number | 400 | Image size in pixels |
| format | string | png | png or svg |
| errorCorrection | string | M | L, 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"
}
}