Predict range

Updated Jul 17, 2026

Predict the same measurement at several percentiles in a single request.

POST/v1/predict/range

Summary

Returns one value per requested percentile. Useful for P5 / P50 / P95 design envelopes without issuing multiple /v1/predict calls.

Cost: 1 credit (or free-tier call) per returned percentile. Maximum 20 unique percentiles.

Request

FieldTypeRequiredNotes
measurementstringyesMeasurement name
genderstringyesMale or Female
agenumberyes0–120
percentilesnumber[]yesEach value 1–99; max 20 unique
countrystringnoDefault US
unitstringnomm, cm, or in
clothingstringnoDefault nude
posturestringnoDefault standing_erect

Example

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

Response

{
  "measurement": "Stature",
  "gender": "Female",
  "country": "US",
  "clothing": "nude",
  "posture": "standing_erect",
  "unit": "mm",
  "source": "modeled",
  "values": [
    { "percentile": 5, "value": 1520.1 },
    { "percentile": 50, "value": 1625.4 },
    { "percentile": 95, "value": 1738.9 }
  ]
}

Notes

  • If available predictions cannot cover the full batch, the API returns 402 with insufficient_predictions (no partial result).
  • See Credits for batch billing behaviour.