API Reference

Complete endpoint documentation for body measurement extraction.

Endpoints

POST /v2/measurements/extract

Extract body measurements from dual photos (front + side). Requires both photos for ±1-3cm accuracy.

Request Body

Parameter Type Required Description
front file Front photo (JPEG/PNG)
side file Side profile photo (JPEG/PNG)
height number User height in cm (120-220)
gender string "male" or "female" (default: male)
# Example request
curl -X POST "https://api.aiscan.io/v2/measurements/extract" \
  -H "X-API-Key: sk_live_your_api_key" \
  -F "front=@front.jpg" \
  -F "side=@side.jpg" \
  -F "height=175" \
  -F "gender=male"

Success Response (200)

{
  "success": true,
  "measurements": {
    "Shoulder": 46.4,
    "Neck Round": 39.2,
    "Chest Round": 102.9,
    "Waist Round": 82.4,
    "Hip Round": 97.8,
    "Full Top Length": 77.2,
    "Inseam": 80.3
  },
  "accuracy_mode": "dual",
  "accuracy": "±1-3cm"
}
GET /v2/health

Check API health status and version info.

Response

{
  "status": "healthy",
  "version": "2.0.0",
  "accuracy": "±1-3cm",
  "mediapipe_available": true
}
POST /v2/measurements/estimate

Estimate measurements from height only (fallback mode). No photos required.

Request Body

Parameter Type Required Description
height number User height in cm (120-220)
gender string "male" or "female" (default: male)
weight number Weight in kg (optional, for BMI adjustment)
# Example request
curl -X POST "https://api.aiscan.io/v2/measurements/estimate" \
  -H "X-API-Key: sk_live_your_api_key" \
  -F "height=175" \
  -F "gender=male"

Success Response (200)

{
  "success": true,
  "measurements": {
    "Shoulder": 46.4,
    "Chest Round": 102.9,
    "Waist Round": 82.4
  },
  "mode": "estimation",
  "accuracy": "~±5cm (estimated)"
}
GET /v2/subscriptions

Get current subscription status and quota usage.

Headers

Header Required Description
X-API-Key Your API key

Success Response (200)

{
  "plan": "Starter",
  "status": "active",
  "quota": {
    "limit": 500,
    "used": 127,
    "remaining": 373
  },
  "current_period_end": "2024-02-15T00:00:00Z"
}
GET /v2/subscriptions/plans

Get available subscription plans.

Success Response (200)

{
  "plans": [
    {
      "name": "Starter",
      "price": 29,
      "quota": 500,
      "features": ["dual_photo", "all_measurements"]
    },
    {
      "name": "Growth",
      "price": 99,
      "quota": 2500,
      "features": ["dual_photo", "webhooks", "priority_support"]
    }
  ]
}

Measurements

Returns 18 measurements for male, 27 for female. All values in centimeters.

Male (18 measurements)

Measurement Description Typical Range
ShoulderShoulder width35-55cm
Neck RoundNeck circumference30-45cm
Chest RoundChest circumference80-120cm
Waist RoundWaist circumference65-100cm
Hip RoundHip circumference80-110cm
Full Top LengthShoulder to hem55-85cm
InseamCrotch to ankle65-95cm

Female (27 measurements)

Measurement Description Typical Range
Bust RoundBust circumference70-110cm
Under BustUnder bust60-95cm
Waist RoundWaist circumference55-85cm
Hip RoundHip circumference75-115cm
Thigh RoundThigh circumference40-65cm