POST/v1/qr-codes
A QR code for any text or URL, as SVG or PNG; no template needed
Encoded in the worker, up to 2,000 characters. format svg (the default) needs no browser and stays sharp at any print size; use png, jpeg or webp for email and anywhere else SVG does not show. ec trades density for damage tolerance. A QR code also fits inside a template as a qr layer. The record is an image: fetch it again with get_image.
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"data": "https://imageapis.com",
"size": 512,
"ec": "M",
"color": "#0b1220"
}
REQUEST
curl -X POST "https://api.imageapis.com/v1/qr-codes" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": "https://imageapis.com",
"size": 512,
"ec": "M",
"color": "#0b1220"
}'
import requests
r = requests.post("https://api.imageapis.com/v1/qr-codes", headers={"X-API-Key": "YOUR_KEY"}, json={
"data": "https://imageapis.com",
"size": 512,
"ec": "M",
"color": "#0b1220"
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.imageapis.com/v1/qr-codes", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"data": "https://imageapis.com",
"size": 512,
"ec": "M",
"color": "#0b1220"
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200With response=binary: the file itself, with X-Image-Id and X-Image-Url headers
201Created
{
"id": "img_9pk4wz7tq2mxbc8hdn3e",
"object": "image",
"status": "completed",
"url": "https://img.imageapis.com/i/img_9pk4wz7tq2mxbc8hdn3e.svg",
"format": "svg",
"width": 512,
"height": 512,
"template": "qr",
"bytes": 2496,
"units": 1,
"created": "2026-10-10T18:04:11Z",
"completed": "2026-10-10T18:04:12Z",
"expires": "2026-11-09T18:04:11Z"
}
202Accepted: rendering in the background; the record has status pending and the webhook gets the finished one
{
"id": "img_9pk4wz7tq2mxbc8hdn3e",
"object": "image",
"status": "completed",
"url": "https://img.imageapis.com/i/img_9pk4wz7tq2mxbc8hdn3e.svg",
"format": "svg",
"width": 512,
"height": 512,
"template": "qr",
"bytes": 2496,
"units": 1,
"created": "2026-10-10T18:04:11Z",
"completed": "2026-10-10T18:04:12Z",
"expires": "2026-11-09T18:04:11Z"
}