Skip to main content
This API returns data, not copy. No pre-written sentences, no branded language — you control how results are presented to your own users; we control the accuracy of the underlying analysis.
AI HairScan analyses one or more hair photos and returns a structured hair assessment: an overall health score, flagged findings, region-level density, detailed metrics, and (where configured) product recommendations from your own catalog.

Authentication

All requests require a bearer API key:
Test keys (sk_test_...) run the full pipeline against non-billed, non-persisted requests — use them for integration testing.
API keys and webhook signing secrets are provisioned during onboarding. Once your account is set up, your HairHealth.ai account manager will issue your live and test keys. Sandbox credentials are available on request if you’d like to integrate against this spec before your account is fully live.

Base URL

Your base URL will be provided by HairHealth.ai in your onboarding document, along with your API key and webhook signing secret.
Endpoint paths below (e.g. /v1/hairscan) are relative to that base URL. The API is versioned in the path; breaking changes will ship as /v2, additive changes (new optional fields) will not change the version.

The scan object

This is the core object returned once a scan completes.
object
Echoes the subject info submitted with the scan
object
Overall score, band, confidence, and 3 pillar scores
array
Notable findings worth surfacing to a user or clinician. No narrative — pair these with your own copy in your UI.
object
Four fixed scalp regions, each rated low / medium / high with an optional tag
object
Full detailed metrics, grouped into 2 categories
object
Structured, not diagnostic language — a data label, not a report sentence
Top 3 ranked SKU matches — present only if a product catalog has been onboarded for your account
object
Compact record for CRM/lead routing

Endpoints

Create a scan

string
required
JSON string — see subject schema above
file
required
Clear frontal hairline photo
file
Top-down crown photo — recommended, needed for crown flags & density
file
Improves hairline recession accuracy
file
Back/sides — needed for donor region reading
string
Free-form JSON object, e.g. family_history, onset_duration_months. Exact fields are configured per account — talk to your account manager to set up your intake schema.
string
Overrides your account’s default webhook URL for this scan
Response — 202 Accepted, returned immediately:

Retrieve a scan

While processing:
Once complete, returns the full scan object. If it fails:

Webhooks

Instead of polling, register a webhook_url on your account (or per-request) to be notified when a scan completes.
event is hairscan.completed or hairscan.failed.
Always verify the X-HairHealth-Signature header before trusting a webhook payload. Compute an HMAC-SHA256 of the raw request body using your webhook signing secret (issued alongside your API key) and compare it to the header. Reject the request if they don’t match.

Errors

Errors return a standard shape:
message is for developers/logs — don’t surface it directly to end users.

Rate limits

Each API key has a request quota tied to your account’s plan. Every response includes:
Exceeding your quota returns 429 with type: rate_limit_error.

Changelog

  • v1 — initial release.