---
title: "Detect barcodes and QR codes"
method: POST
path: "/v1/apple/barcode"
tags: ["Apple"]
---

# Detect barcodes and QR codes

`POST /v1/apple/barcode`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/apple/barcode`
- Auth: HTTP bearer

Detects barcodes (QR, EAN, UPC, Code128, etc.) using Apple Vision.
Symbology names use camelCase (qr, code128, ean13, upce, aztec, etc.).

## Request body

- ImageRequest
  - `image` string, required: Base64-encoded image data (PNG, JPEG, TIFF, HEIC)

## Response `200`

Detected barcodes

- object
  - `barcodes` object[]
    - `symbology` string
    - `payload` string, nullable
    - `bounding_box` BoundingBox: Normalized coordinates (0–1), bottom-left origin
      - `x` number, required
      - `y` number, required
      - `width` number, required
      - `height` number, required
    - `confidence` number

## Other responses

- `400`: Invalid request

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
