xtract.bot
POST /api/qr-decode

Decode a QR code from a clean image. Single-symbol, head-on. For rotated / multi-symbol / occluded inputs, use image-detect-qr instead.

Decodes the text of a QR code from an image. Optimised for clean, head-on QR codes — small, fast, and accurate when the input is the QR code itself with little noise. For multi-symbol detection, rotated codes, or codes embedded in larger photos, use `image-detect-qr` instead.

Inputs

NameTypeDefaultDescription
image*filePNG or JPEG image bytes containing one or more QR codes.

Response

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

Code samples

Built from the round-trip example.

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

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