QR code scanning API powered by QReader, packaged as a Docker image.
docker compose up --buildThe API will be available at http://localhost:8000. Interactive docs at http://localhost:8000/docs.
Simple scan — returns the first QR code found.
curl -X POST -F "imageFile=@qr.png" http://localhost:8000/scan{
"Successful": true,
"BarcodeType": "QR_CODE",
"RawText": "https://example.com"
}Advanced scan — returns all QR codes found in the image.
curl -X POST -F "imageFile=@qr.png" http://localhost:8000/scan/advanced{
"Successful": true,
"ResultBarcodes": [
{ "RawText": "https://example.com", "BarcodeType": "QR_CODE" }
],
"BarcodeCount": 1,
"ErrorMessage": null
}curl http://localhost:8000/health| Variable | Default | Description |
|---|---|---|
API_KEY |
(unset) | If set, requires Apikey header on scan endpoints |
MODEL_SIZE |
s |
QReader model size: n, s, m, or l |
MAX_UPLOAD_SIZE_MB |
5 |
Maximum upload file size in MB |
docker build -t qreader-api .
docker run -p 8000:8000 qreader-apidocker run -p 8000:8000 -e API_KEY=your-secret-key qreader-apiThen include the Apikey header in requests:
curl -X POST -H "Apikey: your-secret-key" -F "imageFile=@qr.png" http://localhost:8000/scan/advancedImages are published automatically on pushes to main (tagged latest) and on version tags (v*).
docker pull ghcr.io/Poheart/qreader-api:latest