Authentication
Every billed endpoint requires an API key sent as a Bearer token.
Header
Authorization: Bearer hf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
or
Authorization: Bearer hf_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
| Prefix | Use |
|---|---|
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" }