QR code API

Encode an event link, text or another payload into a static PNG or SVG QR code. Choose size, quiet zone, colors and error correction.

On this page

Request and response

Send authenticated JSON to POST /v1/projects/{projectId}/tools/qr. Required content is a string. Successful responses are image bytes, not JSON or a delivery URL. Generation uses one credit and returns an ephemeral output.

A QR code contains the supplied content. Editing or tracking a destination is your application’s responsibility; this API does not host dynamic redirects. See code generation capabilities.

Parameters and defaults

FieldType / valuesContract
contentstringRequired. Up to 2048 characters. Text to encode. Also subject to the configured UTF-8 byte limit (default 2048 bytes).
formatpng | svgOptional. Default: png.
sizeintegerOptional. Default: 256. Min 128. Max 1024. Output edge in pixels; configured limits may be lower.
marginintegerOptional. Default: 2. Min 0. Max 16. Quiet-zone margin in modules.
errorCorrectionL | M | Q | HOptional. Default: M. Error correction level: low, medium, quartile, high.
foregroundstringOptional. Default: #000000. Foreground hex colour (#RGB or #RRGGBB).
backgroundstringOptional. Default: #ffffff. Background hex colour (#RGB or #RRGGBB).

Default output is PNG, size 256, margin 2 modules and error correction M. Size must be an integer from 128–1024; deployment bounds can be narrower. Margin is an integer from 0–16. Colors accept #RGB or #RRGGBB. Omit unused optional fields rather than sending null.

The 2048-character validation limit is also subject to a UTF-8 byte cap, default 2048 bytes. Multibyte text can reach the byte limit earlier. Scan-test the final size and contrast with your intended devices.

Example: an event check-in link

cURL example
curl --fail-with-body --silent --show-error "$IMAZEO_API_ORIGIN/v1/projects/$IMAZEO_PROJECT_ID/tools/qr" \
  -H "X-API-Key: $IMAZEO_API_KEY" -H 'Content-Type: application/json' \
  --data '{"content":"https://example.com/events/studio-open-day","format":"svg","size":384,"margin":4,"errorCorrection":"M","foreground":"#163F35","background":"#FFFFFF"}' --dump-header qr-headers.txt --output event-check-in.svg
Successful response shape (body abbreviated)
HTTP/1.1 200 OK
Content-Type: image/svg+xml
X-Request-Id: example-qr-request

<svg …>…</svg>

The example uses a fictional destination. Replace it with a stable address you control before distributing the code. cURL’s --fail-with-body reports failures, but can write their JSON body into the output file: only use that file when the command succeeds.

Use and retain the result

Serve the received bytes through your application, attach them to a ticket or save them privately with the artifact API. Store the filename and content type with the bytes. Generation alone creates no saved artifact ID.

Check HTTP status before decoding the body. Invalid parameters or overlong content should be corrected; quota denial is not a transient retry condition. See error codes.

Documentation reviewed 2026-10-03 against development backend e298ec7. Verify your deployment’s API origin and limits before integrating.