QR Code Generator API
Generate a QR code as an SVG image for a URL, text, email, phone number, SMS, vCard contact or map location.
POST /api/v1/tools/qr-code-generatorMCP qr_code_generatorGeneratorsMake free static QR codes for links, text, email, phone, SMS, vCards and map locations. Pick colours and error correction, then download PNG or SVG.
Input
Send these as a JSON object. Unknown fields are rejected.
- type
- What the code holds; decides which other fields are used. (string, one of url, text, email, phone, sms, vcard, geo, default "url")
- url
- type url: the link; https:// is added if missing. (string, up to 2000 characters)
- text
- type text: any text. (string, up to 2953 characters)
- type email or vcard: email address. (string, up to 254 characters)
- subject
- type email: subject line. (string, up to 500 characters)
- body
- type email: message body. (string, up to 2000 characters)
- phone
- type phone, sms or vcard: phone number, digits with an optional leading +. (string, up to 30 characters)
- message
- type sms: message text. (string, up to 1000 characters)
- firstName
- type vcard: first name. (string, up to 100 characters)
- lastName
- type vcard: last name. (string, up to 100 characters)
- org
- type vcard: organisation. (string, up to 200 characters)
- website
- type vcard: website URL. (string, up to 2000 characters)
- latitude
- type geo: latitude in decimal degrees, e.g. 51.5074. (string, up to 20 characters)
- longitude
- type geo: longitude in decimal degrees, e.g. -0.1278. (string, up to 20 characters)
- errorCorrection
- Error correction level: L (7%), M (15%), Q (25%) or H (30%). Higher survives damage but holds less data. (string, one of L, M, Q, H, default "M")
- size
- SVG width and height in pixels. (integer, 64 to 4096, default 512)
- margin
- Quiet zone around the code, in modules (4 is the standard). (integer, 0 to 16, default 4)
- foreground
- Dark module colour as #rrggbb. (string, up to 7 characters, default "#000000")
- background
- Background colour as #rrggbb. (string, up to 7 characters, default "#ffffff")
curl https://pithlab.com/api/v1/tools/qr-code-generator \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"type":"url","url":"https://pithlab.com","size":256}'