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 (100-230)
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 (100-230)
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/status

Get current subscription status and quota usage.

Headers

Header Required Description
X-API-Key Your API key

Success Response (200)

{
  "status": true,
  "data": {
    "tier": "tailor_pro",
    "quota": {
      "limit": 500,
      "used": 127,
      "remaining": 373
    },
    "reset_date": "2024-02-15T00:00:00Z"
  }
}
GET /v2/subscription-plans

Get available subscription plans.

Headers

Header Required Description
X-API-Key Your API key

Success Response (200)

{
  "status": true,
  "data": {
    "plans": [
      {
        "name": "Starter",
        "price": 29,
        "quota": 500,
        "features": ["dual_photo", "all_measurements"]
      },
      {
        "name": "Growth",
        "price": 99,
        "quota": 2500,
        "features": ["dual_photo", "webhooks", "priority_support"]
      }
    ],
    "current_plan": "tailor_pro",
    "subscription_status": "active"
  }
}

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