Skip to main content
POST
/
api
/
v1
/
scanner
/
analyze-label
Analyze a cannabis product label image
curl --request POST \
  --url https://tiwih-api.vercel.app/api/v1/scanner/analyze-label \
  --header 'Content-Type: application/json' \
  --data '
{
  "imageBase64": "<string>",
  "imageUrl": "<string>",
  "hints": {
    "expectedStrainName": "<string>",
    "dispensaryName": "<string>",
    "productType": "flower"
  },
  "attribution": {
    "userAgent": "<string>",
    "screenWidth": 123,
    "screenHeight": 123,
    "timezone": "<string>",
    "language": "<string>",
    "referrer": "<string>",
    "utmSource": "<string>",
    "utmMedium": "<string>",
    "utmCampaign": "<string>",
    "sessionId": "<string>",
    "userId": "<string>"
  }
}
'

Body

application/json
imageBase64
string

Base64-encoded image data (JPEG, PNG, WebP, HEIC)

Maximum string length: 10000000
imageUrl
string<uri>

URL to the image (must be publicly accessible)

hints
object
attribution
object

Device/browser attribution for analytics (collected client-side)

Response

Label analysis result with strain classification