Generate QR codes with one request
A clean QR code in your colours, with your logo in the middle, as PNG or SVG. Ideal for menus, tickets, labels and campaigns.
- Restaurant menus
- Tickets and badges
- Product labels
- Business cards
- Campaign posters
POST
/v1/qr
1 credit(s) per callGenerates a QR code or a barcode, as PNG or SVG.
Try it online
Result
—
Example request
curl -X POST https://supercalcula.ch/api/v1/qr \
-H "Authorization: Bearer sk_live_…" \
-H "Content-Type: application/json" \
-d '{"content":"https://supercalcula.ch","size":512}' --output qr.png
const res = await fetch("https://supercalcula.ch/api/v1/qr", {
method: "POST",
headers: { Authorization: "Bearer sk_live_…", "Content-Type": "application/json" },
body: JSON.stringify({
"content": "https://supercalcula.ch",
"size": 512
}),
});
const blob = await res.blob();
import requests
r = requests.post("https://supercalcula.ch/api/v1/qr",
headers={"Authorization": "Bearer sk_live_…"},
json={"content":"https://supercalcula.ch","size":512})
open("qr.png", "wb").write(r.content)
$ch = curl_init("https://supercalcula.ch/api/v1/qr");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer sk_live_…", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["content" => "https://supercalcula.ch", "size" => 512]),
CURLOPT_RETURNTRANSFER => true,
]);
file_put_contents("qr.png", curl_exec($ch));
Response
The response is the image itself (PNG or SVG); with encoding=base64, a JSON object containing the image.
Limits and cost
- Cost : 1 credit(s) per call
- Content: 2,953 characters at most
- Size: 64 to 2,048 pixels
- Logo: https only, 500 KB at most, error correction forced to H