Image APIs
API reference › Qr codes

A QR code for any text or URL, as SVG or PNG; no template needed

POST/v1/qr-codes

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"
}
In the full reference
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"
}'
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"
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.