Read QR codes from an image (upload, url or base64)

Reads every QR code in an image and returns its contents and position.

Request

POSThttps://qr-code-generator.p.apihiver.com/v1/decode

Upload the image in the file field (max 25 MB). Instead of a file you can send JSON: {"url": "https://…"} for a public image URL, or {"base64": "…"}.

*
No file chosen
File. The image file (JPG, PNG, WebP, GIF, BMP or TIFF).

Parameters and body structure are inherited from this endpoint's definition. Changes here only apply to this test run.

Language
Client
1curl --request POST \
2  --url https://qr-code-generator.p.apihiver.com/v1/decode \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY' \
5  --header 'content-type: multipart/form-data' \
6  --form file=@file.bin

Read QR codes from an image (upload, url or base64): QR Code Generator & Reader API reference

Reads every QR code in an image and returns its contents and position. This endpoint is part of the QR Code Generator & Reader API: Create QR codes for links, text, UPI payments, Wi-Fi logins and contact cards (PNG/SVG, custom colours) and read QR codes from images.

Example response (200, application/json)

Success.

1{
2  "codes": [
3    {
4      "data": "https://apihiver.com",
5      "type": "QRCODE",
6      "position": {
7        "x": 38,
8        "y": 38,
9        "width": 224,
10        "height": 224
11      }
12    }
13  ],
14  "count": 1
15}

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "Provide a file upload, 'url', or 'base64'."
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.