xtract.bot
POST /api/image-detect-qr

Detect and decode QR codes in JPEG, PNG, WebP, or BMP images. Returns each code's text plus its polygon corners. Multi-symbol detection is on by default.

Detects QR codes in an image and returns the decoded text plus the four-corner polygon of each code's bounding quad. Robust to rotation, perspective warp (photos taken at an angle), and partial occlusion. Multi-symbol detection is on by default — multiple QR codes in one image are all returned. For simpler, faster decoding of clean QR codes, see `qr-decode`.

Inputs

NameTypeDefaultDescription
image*fileJPEG, PNG, WebP, or BMP image bytes.
multibooleantrueDetect every QR code in the image (true) or stop at the first one found (false). Multi adds modest overhead.

Response

Modes: json. Cache: yes (24h TTL).

Code samples

Built from the round-trip example.

# Download or substitute the example input:
#   curl -O https://xtract.bot/examples/image-detect-qr/sample.png
IMAGE=$(base64 -w0 < sample.png)

curl -X POST https://api.xtract.bot/api/image-detect-qr \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
  -H "X-Api-Key: $XTRACT_API_KEY" \
  -d '{
  "multi": true,
  "image": "'"$IMAGE"'"
}'