QR encode
Try it interactively →POST /api/qr-encodeGenerate a QR code as PNG or SVG. Configurable error-correction level, size, and quiet-zone margin.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| text* | string | — | Text payload to encode (e.g. URL, message). |
| errorCorrection | enum (L | M | Q | H) | "M" | Error-correction level. L=~7%, M=~15%, Q=~25%, H=~30% recovery. |
| sizePx | number (0…4096) | 256 | Minimum SVG dimension in user units. 0 = auto (per-module = 1). |
Response
Modes: binary, text, json. Cache: yes (24h TTL).
Code samples
Built from the url example.
curl -X POST https://api.xtract.bot/api/qr-encode \
-H "Content-Type: application/json" \
-H "Accept: application/octet-stream" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"text": "https://xtract.bot",
"errorCorrection": "M",
"sizePx": 256
}'