Skip to content

QR code API docs

The base URL is https://qr.cuelark.com. GET or POST /v1/qr returns the image itself, and POST /v1/decode reads a code. No account or key is needed.

GET or POST /v1/qr

ParameterMeaning
dataText or link to encode (up to 2,000 characters). Use this or type + fields.
typeurl, text, wifi, vcard, email, sms, phone, whatsapp, event, location or upi
fieldsPOST: object with the type's fields. GET: pass the fields as query parameters, e.g. type=wifi&ssid=Guest&password=...
formatpng (default) or svg
size64 to 2048 pixels (default 512)
fg / bgHex colors without # in a URL (fg=1e3a8a), or bg=transparent
marginQuiet zone in modules, 0 to 10 (default 4)
eccError correction L, M (default), Q or H
stylesquare (default), rounded or dots

Fields per type

typefields
wifissid, password, encryption (WPA, WEP, nopass), hidden
vcardfirstName, lastName, org, title, phone, workPhone, email, website, street, city, region, zip, country, note
emailto, subject, body
smsphone, message
phonephone
whatsappphone (with country code), message
eventtitle, start, end (YYYY-MM-DDTHH:MM), location, description, allDay
locationlat, lng, label
upivpa, name, amount, note
html
<img src="https://qr.cuelark.com/v1/qr?data=https%3A%2F%2Fexample.com&size=256" width="256" height="256" alt="QR code for example.com">
js
const svg = await fetch("https://qr.cuelark.com/v1/qr", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ type: "vcard", fields: { firstName: "Jane", lastName: "Rivera", phone: "+14155550134" }, format: "svg" }),
}).then((r) => r.text());

POST /v1/decode

Send a PNG or JPEG as the raw body (content-type image/png or image/jpeg), or JSON with image (base64) or url (a public image link). Images up to 4 MB and 16 megapixels.

bash
curl -X POST https://qr.cuelark.com/v1/decode -H "content-type: application/json" \
  -d '{"url":"https://qr.cuelark.com/v1/qr?data=hello"}'
# {"found":true,"text":"hello","version":1,"type":"unknown","summary":"Plain text"}

Limits

Errors

Errors are JSON: {"error":"bad_request","message":"…"}, with status 400 (bad input or URL refused), 413 (too large), 429 (limit reached; see retry-after) or 504 (image URL timed out).

Security and privacy

Using an AI assistant? See the MCP server.