Detect and decode QR codes from images via a single API call. Input an image (URL or base64), get structured output: decoded content, content type classification, position, and confidence.
Endpoint: POST https://data.cli.im/x-deepscan/vision/detect
Content-Type: application/json
bash
# From URL (simplest)
curl -s -X POST https://data.cli.im/x-deepscan/vision/detect \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/photo-with-qrcode.jpg"}'
# From local file (base64)
curl -s -X POST https://data.cli.im/x-deepscan/vision/detect \
-H "Content-Type: application/json" \
-d "{\"image\": \"$(base64 -i photo.jpg)\"}"
# Batch
curl -s -X POST https://data.cli.im/x-deepscan/vision/detect \
-H "Content-Type: application/json" \
-d '{"urls": ["https://example.com/1.jpg", "https://example.com/2.jpg"]}'
Single image returns:
json
{
"count": 1,
"codes": [
{
"content": "https://example.com",
"format": "QR Code",
"content_type": "url",
"bbox": {"x1": 211.8, "y1": 211.3, "x2": 425.8, "y2": 424.7},
"keypoints": null,
"confidence": 0.93
}
]
}
No QR code found returns {"count": 0, "codes": []} — not an error.
content_type is auto-classified:
ValueMatchesurl``http:// or https:// prefixwifi``WIFI: prefixvcard``BEGIN:VCARD prefixemail``mailto: prefixphone``tel: prefixsms``sms: prefixgeo``geo: prefixtextEverything else
All fields optional, but at least one required:
FieldTypeDescriptionimagestringBase64-encoded imageurlstringImage URL (http/https only)imagesstring[]Batch base64 (max 10)urlsstring[]Batch URLs (max 10)
Single input ( image or url alone) returns DetectResponse. Batch/mixed returns BatchDetectResponse with per-item results.
Errors return {"error": {"code": "...", "message": "..."}}.
CodeWhenINVALID_BASE64Base64 decoding failedINVALID_URLBad URL or SSRF blocked (private IP)URL_NOT_IMAGEURL content is not an imageURL_DOWNLOAD_FAILEDDownload timeout or HTTP errorIMAGE_TOO_LARGEExceeds 10MBRATE_LIMITEDToo many requests (check Retry-After header)BATCH_TOO_LARGEMore than 10 images
Free usage: 20 requests/minute, 200 requests/day per IP.