Authentication

Updated Jul 17, 2026

Every billed endpoint requires an API key sent as a Bearer token.

Authorization: Bearer hf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

or

Authorization: Bearer hf_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PrefixUse
hf_live_Production
hf_test_Development / playground

After the prefix, keys are 32 URL-safe characters (A–Z, a–z, 0–9, _, -).

Create and revoke keys in the dashboard.

Example

curl -sS https://api.humanform.app/v1/predict \
  -H "Authorization: Bearer hf_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "measurement": "Stature",
    "gender": "Female",
    "age": 35,
    "percentile": 50,
    "country": "UK",
    "unit": "mm"
  }'

Auth errors

Missing, malformed, unknown, or revoked keys return 401:

{ "error": "Missing or invalid Authorization header" }
{ "error": "Invalid API key" }