Developers · Body measurement API

Add 3D body scanning to your product with one API call.

Send a front and a side photo and the person's height. Get their body measurements back, in your own measurement set, and the 3D body as OBJ, glTF or raw geometry if you want it. In about 5 seconds.

  • REST, JSON in and out
  • API keys, TLS 1.2+
  • US and EU regions
  • Photos never stored
POST /v1/measurements
// request
POST https://api.snapmeasureai.com/v1/measurements
X-API-Key: smk_live_…

{
  "height":  "174cm",
  "images":  ["/9j/4AAQ…", "/9j/4AAQ…"],  // front, side (base64)
  "include": ["glb"]
}

// 200 OK
{
  "request_id":    "3f9a1c0d2b7e4a51",
  "model_version": "2026.10",
  "unit":          "cm",
  "photos":        { "received": 2, "used": 2, "unused": [] },
  "measurements": {
    "chest circumf": 99.5,
    "waist circumf": 79.5,
    "hip circumf":   94.8   // …your measurement set
  },
  "glb": "Z2xURgIAAAD…"   // the 3D body, glTF 2.0
}

Overview

Your app captures. We measure. Your system keeps the result.

The scan service is stateless: it builds the 3D body, computes what you asked for, returns it, and keeps nothing. Everything that persists lives on your side.

Your app or website

Capture

Your user takes a front and a side photo and enters their height, in your own capture screen or with our capture SDK inside your page.

  • Any smartphone camera
  • Everyday clothes work

SnapMeasureAI · stateless

Reconstruct & measure

The person is found in every photo, the views are combined into one 3D body at the real height, and your measurements are taken on it.

  • Processed in memory
  • Photos never written to disk

Your system

Store & use

Measurements and the 3D body land in your system, joined to your own user, order or patient record, under your retention policy.

  • You hold the history
  • Size charts, CAD, progress views

Typically 5–7 seconds from photos to result, nearly all of it processing: the prepared photos are a few hundred kilobytes.

Quickstart

From two photos to measurements.

One request. Photos go as base64 text inside a JSON body, so it works the same from any language.

  1. Get your API key

    Keys are issued with your agreement, set up for your measurement set, your outputs and your region. Keep server keys in your back end's secret store, never in an app or web page. No key yet? Build against the sandbox now.

  2. Turn each photo into base64

    Use the capture or upload flow your product already has. 1,000–2,000 px on the long side is plenty: photos are scaled to 800 px before measuring, so larger ones only slow the upload.

  3. POST to /v1/measurements

    Send the height and the photos, front first, with your key in the X-API-Key header. Allow up to 120 seconds of client timeout.

  4. Use the result

    Store the measurements against your own record, map them to your size charts, or pass the 3D body to your CAD, pattern or visualization pipeline. Keep the model_version with each result.

import base64, os, requests

API = "https://api.snapmeasureai.com/v1/measurements"
# No key yet? SNAPMEASURE_API_KEY=smk_test_sandbox (the sandbox)
KEY = os.environ["SNAPMEASURE_API_KEY"]   # smk_live_…, kept on your server

def b64(path):
    with open(path, "rb") as f:
        return base64.b64encode(f.read()).decode("ascii")

res = requests.post(API, headers={"X-API-Key": KEY}, timeout=120, json={
    "height": "174cm",                       # or "68.5in"
    "images": [b64("front.jpg"), b64("side.jpg")],
    "include": ["glb"],                      # optional: the 3D body too
    "reference": "order-42",                 # optional: echoed back
})
result = res.json()
if not res.ok:
    err = result["error"]
    raise RuntimeError(f'{err["code"]}: {err["message"]} (request {result["request_id"]})')

print(result["measurements"]["waist circumf"])   # 79.5 (cm)

Capture SDK

The guided camera, inside your own page.

Add one script and call SnapMeasure.capture(). The guided camera flow runs on your domain and in your design, sends the photos straight to the API with your browser key, and hands the result to your page's code.

  1. Add the script

    From the API's own domain, pinned to its version with an integrity hash, or bundled from npm (@snapmeasureai/capture) so no third-party script runs on your page.

  2. Call capture() when your user is ready

    Pass the height if your form already asks for it; otherwise the SDK asks. Add include: ["weight"] and you can drop the weight question too.

  3. Take it from there

    The promise resolves with the same JSON as /v1/measurements, the SDK closes, and your next step shows. Closing it rejects with cancelled.

  4. Choose where your key lives

    A browser key is public by design: anyone can read it in your page's source. It only runs scans, only from your registered websites, within per-visitor limits and your monthly cap, and there's no stored data for it to reach. To keep any key out of the page, use proxyUrl: "/api/body-scan" instead of apiKey: a route on your own server that adds your server key and forwards the request. This also suits store tablets that share one internet connection.

your page
<script src="https://api.snapmeasureai.com/sdk/capture-1.0.0.js"
        integrity="sha384-7MUv6UquvmkfKPocDMeJffOux2NZG6Wc8v/4QiddwOXBc3+eEcJ10Ozi0IgYF+K2"
        crossorigin="anonymous"></script>
<script>
  button.onclick = async () => {
    try {
      const scan = await SnapMeasure.capture({
        apiKey: "smk_pub_…",          // public, works only on your website (step 4)
        // proxyUrl: "/api/body-scan", // or no key: your server adds it
        height: form.height.value,      // or leave out: the SDK asks
        include: ["weight"],
        theme: { accent: "#1D1D1B", font: "Your Sans, sans-serif" },
      });
      nextStep(scan.measurements, scan.weight);
    } catch (err) {
      if (err.code !== "cancelled") showRetry(err.code);
    }
  };
</script>

At home or in store

Self or assisted

A large countdown, with beeps, for a phone propped against a wall; or a shutter button and the back camera for staff with a tablet.

Your brand

Your colors, font and words

Theme colors, corners, font and logo; every text replaceable or translated; CSS parts for the rest. Or your own screens with SnapMeasure.measure().

Built in

Guidance and recovery

The whole picture inside a frame in your color, instructions never over the person, photo review and retake, upload without a camera, automatic retries.

Private

Nothing left behind

No cookies, storage or third parties. Photos are re-encoded on the device, without location data, and the camera turns off the moment it closes.

Phones, tablets and computers, in current Safari, Chrome, Edge, Firefox and Samsung Internet, on HTTPS pages. About 27 KB gzipped, no dependencies, TypeScript types included. Two people in one visit: call capture() once for each.

What your customer sees

  1. Start. Three setup steps (prop the phone up, stand 2–3 m back, fitted clothes work best but everyday clothes are fine, no coats, arms slightly out), the height field if you didn't pass a height (in ft/in on US pages, cm elsewhere), a privacy line or your consent checkbox, then Start or Upload photos instead. One screen before the camera.
  2. Camera. The whole camera picture, never cropped, inside a border in your color: the person stands inside the frame. Instructions, the countdown and the buttons sit in a panel below the picture, or beside it on wide screens, never over the person. Self-capture: Start countdown, a 10-second countdown as one large number with a cue readable from 2–3 m and beeps in the last three seconds, then for 3 seconds the picture dims and Turn to your side sits in large type in its middle (the frame turns amber), where people look while getting into place, and a 7-second side countdown starts on its own. The screen stays on throughout. Nothing on the camera screen is animated, so it behaves the same on every device. Stop returns to the start without leaving. Assisted: a shutter button.
  3. Check the photos. Both photos, each with Retake, and Retake both. On phones they sit one above the other, as large as fits, with no scrolling.
  4. Measuring. The front photo with a scan line and the three stages, a few seconds. Busy moments are retried on their own.
  5. Done. The SDK closes and your page has the result, for your own results page or next step. (showResult: true shows a short summary first.)

Camera blocked, or none: two upload tiles instead. No whole body found: the SDK explains and offers to retake. Height out of range: it asks again and resends the same photos.

Options

Connection

OptionTypeDefaultDescription
apiKeystring–Your browser key, smk_pub_…. Server keys are refused from web pages. To test without a key of your own, use the public sandbox key through proxyUrl.
proxyUrlstring–Instead of apiKey: a route on your own server, such as /api/body-scan, that adds your server key and forwards the same JSON to /v1/measurements. No key in the page.
headersobject–Extra request headers for your proxy, such as a CSRF token.
credentialsstringomitsame-origin to send your session cookie to your proxy.
apiUrlstringhttps://api.snapmeasureai.comThe EU endpoint or your dedicated URL (see Regions).
timeout, retriesnumber120000, 3Milliseconds per attempt, and retries when the service is busy (waiting the time the API asks for).

The scan

OptionTypeDefaultDescription
heightnumber | string | object–175, "175cm", "69in", "5'9\"" or {ft: 5, in: 9}. Leave it out and the SDK asks on its first screen.
heightUnitstringby languagecm or in: the unit of a numeric height, and the unit the height field opens in. Without it the field opens in ft/in on US pages and in cm elsewhere.
askHeightstringautoauto: ask only when no height is passed. always: show the field, filled in. never: a missing height is an error.
includearrayyour account'sExtra outputs, such as ["weight"] (see Outputs).
unit, weightUnitstringthe height'scm, mm or in for the measurements; kg or lb for the weight.
sex, age, weightstring | number–For include: ["body_composition"]: sex (male or female) is needed unless your proxy adds it; age and weight ("72.5kg") are optional. Never kept.
profilestringyour key'sOne of your measurement sets (build one in the measurement builder).
referencestring–Your own id, returned as sent. Never stored or logged.
imageMaxSize, jpegQualitynumber1280, 0.9The photos sent: long side in pixels, and JPEG quality.

The flow

OptionTypeDefaultDescription
assistedbooleanfalseSomeone else takes the photos, such as store staff: a shutter button and staff wording.
camerastringuserenvironment for the back camera, with assisted on tablets. Users can switch cameras on screen.
countdown, sideCountdownnumber10, 7Seconds before the front photo and before the side photo.
soundbooleantrueBeeps in the last three seconds. Users can mute them on screen.
voice, languageboolean, stringfalse, the page'sSpoken prompts (the browser's speech), in language. The language also picks the height unit.
introbooleantrueThe first screen. false goes straight to the camera (asking the height on its own screen if needed).
consentboolean | stringfalsetrue or your own wording: a checkbox on the first screen that must be ticked before the camera or upload.
reviewbooleantrueThe check-the-photos screen.
allowUploadbooleantruePhoto upload as an alternative, and the fallback when there's no camera.
showResultbooleanfalseA summary of the main measurements before closing. Usually your own page shows the results instead.
containerelement–Render inside this element instead of a full-screen overlay.
zIndexnumber2147483000Of the overlay.
signalAbortSignal–Close it from your code (or call SnapMeasure.close()).
onResult, onError, onCancelfunction–Callbacks, if you prefer them to the promise.
onEventfunction–(name, detail) for your analytics (events below).

Your brand

Pass theme for colors, corners and font, logo (an image URL) for the top of the first screen, and text to change any words. The flow lives in a Shadow DOM, so your page's CSS can't break it and its CSS can't touch your page.

theme keyDefaultUsed for
accent, accentText#0ABFA3, #04211CPrimary buttons and their text, focus rings, icon tints.
background, text, mutedwhite, #0F172A, #5B6474The light screens: start, upload, camera problems.
surface, border, danger#F2F5F8, #E2E8F0, #B42318Cards, secondary buttons and dividers; error text.
radius, buttonRadius16, 999Corners of the panel and of buttons, in px or any CSS length.
fontsystem fontA font-family your page already loads.
overlayrgba(8,12,16,.6)The backdrop behind the panel on large screens.
cameraAccent, cameraAccentTextaccentThe camera's frame border, countdown ring, step indicator and buttons. The camera screen is black, so if your accent is too dark to see there (a near-black brand color), the SDK uses a bright teal unless you set this.
cameraTurn#FFB020The frame and heading while the person turns to the side.
frameWidth5The width of the frame border, in px.
Every text key, to reword or translate
ScreenKeys
StartintroTitle introBody tipPhoneTitle tipPhone tipSpaceTitle tipSpace tipClothesTitle tipClothes privacy privacyAssisted consent start uploadInstead logoAlt, and …Assisted versions of the intro and tip keys
HeightheightLabel heightTitle heightHint (each with …Assisted; heightHint is an optional line under the field, empty by default) heightInvalid unitCm unitFtIn cm ft inch heightLabelCm heightLabelFt heightLabelIn
CameracameraStarting cameraAllow front side frontTitle frontText sideTitle sideText (each with …Assisted) startCountdown takePhoto cueFront cueSide holdStill stop turnTitle turnText frontTaken allTaken photoTaken switchCamera soundOn soundOff tapToStart
Camera problemscameraBlockedTitle cameraBlocked cameraFailedTitle cameraFailed cameraMissing
Review, uploadreviewTitle reviewText retake retakeBoth usePhotos uploadTitle uploadText uploadFront uploadSide choosePhoto change notAPhoto photoTooLarge photoUnreadable useCamera
Measuring, resultmeasuring measuringAssisted stepSend stepBuild stepMeasure busyRetry ({s} is the seconds left) processingNote resultTitle weight done
ErrorserrorTitle errNoPerson errImage errHeight errNetwork errTimeout errBusy errUnavailable errGeneric tryAgain retakePhotos
OtherdialogLabel close cancel back continue voiceFront voiceSide voiceDone
Every CSS part, for styling beyond the theme

Style a part from your own stylesheet, for example snapmeasure-capture::part(button-primary) { text-transform: uppercase; }.

root dialog screen title logo tips height input consent consent-checkbox button-primary button-secondary button-link button-back button-close camera frame video steps panel instruction-title instruction-text countdown countdown-cue shutter button-switch button-sound review-photo upload-tile measuring-photo measuring-steps result-list

Results and errors

The promise resolves with the API's response, unchanged: the same JSON as /v1/measurements, with weight when you include it. It rejects with a SnapMeasure.Error (code, status, requestId, retryAfter, retryable). By then the customer has already seen a clear message and a way forward; the code is for your page and your logs.

codeMeaning
cancelledThe customer closed it, or your code did.
camera_denied, camera_unavailableCamera blocked or failing, and they closed instead of uploading.
no_person_detected, invalid_imageThey closed after being asked to retake.
network, timeout, busyConnection trouble, after the automatic retries.
rate_limited, monthly_limit_reachedYour key's limits.
invalid_config, origin_not_allowed, invalid_api_key, …Setup problems only you can fix. Also written to the browser console.

Events

onEvent(name, detail) reports progress for your analytics and funnels. Events never contain photos, heights or measurements.

Eventdetail
openmode: self or assisted
consent_given, intro_start–
height_enteredunit
camera_ready, camera_error, camera_switchedfacing; code
photo_taken, retake, countdown_stoppedview: front or side (retake: also both)
review_confirmed, upload_selected, upload_confirmedview for uploads
submit, retryattempt, code, wait
result, errorseconds, requestId; code, status
cancel, closeoutcome

Methods and requirements

  • capture(options) the guided flow, resolving with the result.
  • measure(options) no interface: pass images you captured yourself (File, Blob, image, video, canvas or base64). It resizes them, strips their metadata, sends them with the same retries and resolves with the same result.
  • isSupported() {camera, upload, secureContext, fetch}, to decide whether to show your button.
  • close(), parseHeight(value, unit), version, Error.
  • HTTPS. Browsers allow the camera only on secure pages. In an iframe, add allow="camera".
  • Content-Security-Policy. Allow https://api.snapmeasureai.com in script-src (unless you bundle it) and connect-src, and blob: data: in img-src. No eval, inline scripts or 'unsafe-inline' needed.
  • Accessible. A labeled dialog that keeps focus inside, fully keyboard operable, every control named for screen readers, progress announced, no animation for users who ask for reduced motion.
  • Versions. capture-1.0.0.js is the current version; pin it with integrity.

Authentication

One key per place you call from.

Every request carries an API key in the X-API-Key header (Authorization: Bearer works too). Never put a key in a URL.

Key typePrefixUse it fromProtection
Serversmk_live_Your back endSecret. Refused when sent from a web page. Can be limited to your own IP ranges.
Browsersmk_pub_Your websitePublic by design: visible in your page's source, but it only runs scans, only from the website addresses registered for it, with per-visitor limits.
Appsmk_app_Your mobile appPer-device limits, so one copied key can't run up volume.
Sandboxsmk_test_Your back end, while you buildNever measures a photo: every request is answered with the same sample person.

Sandbox: build before you have a key

The public key smk_test_sandbox works now, with no sign-up, on https://api.snapmeasureai.com. Each request is checked exactly like a real one: the height, the photos' size and file type, every option. It is then answered with the same sample person, a real scan of our demo's sample photos, with "sandbox": true. The height and photos you send are checked but not used: the measurements are always the sample person's (174 cm), in the unit you ask for.

Every output works, including sizes with two example size charts. Add "simulate": "no_person_detected" or "busy" to test your error handling.

  • For building, not for accuracy. To see how the scan measures your own people, use the live demo or ask us for an evaluation key.
  • A server key. It is refused from web pages; try the capture SDK with it through proxyUrl.
  • Shared by every developer, so its limits are low: about 30 requests a minute, and about 300 a day from one IP address. Not for load testing.
  • Standard measurements only. Your measurement set comes with your own key, and then nothing else in your code changes.

Request

Two fields required. Everything else is optional.

A JSON body sent with Content-Type: application/json.

POST/v1/measurements
Photos go inside the JSON, as base64 text

Send each photo's JPEG, PNG or WebP bytes as a base64 string (a data:image/jpeg;base64, prefix is fine), not as a multipart/form-data file. Up to 30 MB and 100 megapixels per photo, 80 MB per request. Phone photos are turned the right way up from their EXIF orientation.

FieldTypeDescription
heightRequiredstring | number"174cm" or "68.5in", or a number with "height_unit": "cm" or "in". The body is scaled to it, so every measurement is at real size.
imagesRequiredarray2–4 photos of one person, front first, then side; a back or second side view helps. Each is a base64 string or {"data": "…"}. Whole body in frame, head to feet.
includeOptionalarrayExtra outputs: weight, body_composition, obj, glb, geometry, faces, viewer, heights_above_floor, sizes (see Outputs). Without it you get your account's default outputs.
profileOptionalstringYour measurement set, built in the measurement builder. Keys with a default set use it automatically.
unitOptionalstringcm, mm or in. Default: your account's setting, or the height's unit.
weight_unitOptionalstringkg or lb, for the estimated weight and body composition's masses. Default: lb when the measurements are in inches, otherwise kg.
sexFor body compositionstringmale or female. Needed for body_composition, used for nothing else.
age, weightOptionalnumber | stringFor body composition: age in years (18 or over), and the weighed weight as "72.5kg" or "160lb" (or a number with weight_unit). Each makes it a little closer; without a weight, the estimated one is used.
poseOptionalstring | objectPose of the 3D files: a_pose (default), t_pose, or your own angles such as {"arms": 45, "legs": 6}. See 3D files.
handsOptionalstringHow the hands look in the viewer and 3D files: relaxed (default, fingers gently curled) or flat (fingers straight). Measurements are the same either way.
watertightOptionalbooleantrue: the OBJ and glTF are one closed surface, for cloth simulation, physics and 3D printing.
mesh_unitsOptionalstringOBJ units: m (default), cm or mm. glTF and geometry are always meters.
viewer_styleOptionalstringstudio (every measurement, custom measurements) or showcase (the body large, with the key measurements on it).
referenceOptionalstringYour own identifier, up to 128 characters, returned as sent. We don't store or log it.
simulateSandboxstringSandbox key only: no_person_detected or busy, to test your handling of those answers.

No names, emails or account ids are needed. To join a result to your own record, keep your id on your side, or pass it as reference.

Measurement builder

Define your own measurements. No scan needed.

Open a default 3D body, click where each girth or length goes, and save it as your measurement set. Every scan through your integration then returns exactly those measurements, with your names and units.

  • Any girth or length on the body
  • Your field names and units
  • Measured the same way on every scan

Outputs

Measurements, the full 3D body, or both.

Every scan builds a complete 3D body. Take the measurements only, or add any of these, per request or as your account's default.

Body measurements Core

18 standard girths and lengths: chest, waist, hips, neck, upper arm, forearm, wrist, thigh, calf, ankle, head, shoulder width, back to shoulder, arm length, inseam, torso length, foot length and width. In centimeters, millimeters or inches. Add your own in the measurement builder.

Your measurement set Core

Define any girth or length on the body in the demo's measurement studio (Custom Measure) and save it as a profile. Every scan then returns exactly that set, in your field names, units and rounding.

3D body Core

The body at real size, in the same topology for every scan: OBJ, glTF 2.0 (each measurement as a named line), or raw geometry with named landmarks and joint centers.

Embeddable 3D viewer Optional

A self-contained interactive viewer page for an iframe or web view, in your colors and with your logo or none. It loads nothing from third parties.

Heights above the floor Optional

For each girth, its height above the floor at heel level: the format compression-garment and medical-fit makers specify garments in.

Your size charts Optional

Set up your charts once (one per garment, if you like). Each scan returns the size in each chart, and whether each measurement sits below, within or above it.

Estimated weight Optional

The body weight estimated from the scan's height and girths, so your users needn't type it in. Fitted on public surveys in which people were both tape-measured and weighed (NHANES and ANSUR II, over 33,000 adults). No extra input needed. An estimate for recommendations, not a weighing.

Body composition Optional

Body fat %, fat mass, fat-free mass and visceral fat, from the scan plus the person's sex (age and weight optional). Fitted on whole-body DXA scans, the clinical reference, of about 29,700 adults in the US national health survey (NHANES), so values are on the DXA scale. For fitness and wellness, not diagnosis.

Person check Built in

Every photo is checked for a person before it is measured. Photos without one are left out and listed in photos.unused, so your app can ask for that photo again; with fewer than two usable photos the answer is 422 no_person_detected.

See it in the demo →

Extensions on request

On request

Body shape code

A compact code for the body (a few hundred bytes) to store and later rebuild the 3D body, or take new measurements, without new photos.

On request

Hosted capture page

A guided capture page under your brand, linked from an email, SMS, QR code or your portal, for teams without their own capture screen.

include options

ValueYou get
weightweight: estimated body weight, {"value", "unit"}, in kg or lb
body_compositionbody_composition: {"body_fat_percent", "fat_mass", "fat_free_mass", "visceral_fat", "unit", "inputs"}; needs sex
objobj: Wavefront OBJ text, for CAD, pattern-making and 3D tools
glbglb: glTF 2.0 binary (base64), for three.js, Babylon.js, Unity, Blender
geometrygeometry: vertices, measurement outlines, landmarks and joints, for your own viewer
facesgeometry.faces: the triangles, the same for every scan
viewerviewer_html: the embeddable 3D viewer page
heights_above_floorheights_above_floor: each girth's height above the floor
sizessizes: the size in each of your size charts

Also in every response: request_id, model_version, unit, photos and, with a profile, missing for any measurement that couldn't be taken on this body.

GET /v1/catalog · what your key returns
{
  "measurements": [
    { "name": "waist circumf", "kind": "girth",
      "definition": "Round the waist at the level of the navel, square to the torso. …" },
    // …every measurement your key returns, with how it is taken
  ],
  "outputs":    ["geometry", "glb", "obj", "viewer"],
  "poses":      ["measure", "a_pose", "t_pose"],
  "hands":      ["relaxed", "flat"], "default_hands": "relaxed",
  "pose_angles": { "arms": { "min": 0, "max": 70 }, "legs": { "min": 0, "max": 20 } },
  "units":      ["cm", "mm", "in"],
  "size_charts": {},
  "model_version": "2026.10"
}

Measurement definitions are our own, written out in the catalog; they are not certified to a published standard such as ISO 8559-1. A custom measurement set can add measurements to any standard's definitions.

3D files

The same body, in the pose your pipeline needs.

Measurements are always taken in the same pose, so these options change only the 3D files (obj, glb, geometry; hands also the viewer), never the numbers.

OptionValuesUse it for
posea_pose (default, also called measure): arms about 66° below horizontal, the pose measurements are taken inComparing scans, a natural standing body
poset_pose: arms level, legs straightGame engines, avatars, auto-rigging tools
pose{"arms": 45, "legs": 6}: arms 0–70° below horizontal, each leg 0–20° outCloth simulation, matching the avatar your garments were made on
handsrelaxed (default): fingers gently curled, thumb resting in, as hands hang when standingViewers, apps, avatars: anything people look at
handsflat: fingers straight and spreadTools that expect the straight-finger pose, such as retargeting onto a rig built on it
watertighttrue: one closed surfaceCloth collision, physics, volume, 3D printing
mesh_unitsm, cm, mm (OBJ)CAD and cloth tools that expect cm or mm

One topology for every scan

Every body has the same vertices in the same order and the same triangles, whatever the person's shape. Vertex i is the same point on the body in every scan, so two scans of a person compare point by point with no extra processing.

Coordinates

  • Meters; +y is up and the body faces +z (its left side at +x).
  • The floor is at y = 0 and the origin is between the heels.
  • Geometry arrays are little-endian base64 (float32 vertices, uint16 faces).
  • No skeleton or skinning weights: rig the watertight A-pose or T-pose body in your own tool; geometry.joints gives the joint centers.

Errors

Stable codes you can act on.

Every error has the same shape, a code that never changes meaning, and a request id. Error messages never repeat the content you sent.

400 Bad Request
{ "error": { "code": "invalid_height", "message": "Height must be a number with cm or in, e.g. 174cm or 68.5in." },
  "request_id": "3f9a1c0d2b7e4a51" }
HTTPCodeWhat to do
400invalid_json, missing_images, too_few_images, too_many_images, invalid_image, invalid_height, invalid_option, unknown_profileFix the request; the message says which check failed.
401missing_api_key, invalid_api_keySend a valid key in X-API-Key.
403key_disabled, origin_not_allowed, ip_not_allowed, profile_not_allowed, output_not_allowed, sandbox_unsupportedUse the right key for where you call from, or contact us.
408request_timeoutThe upload took over 60 seconds: send smaller photos.
413image_too_large, request_too_largeSend smaller photos.
415unsupported_media_typeSend JSON with Content-Type: application/json.
422no_person_detectedAsk for new photos: whole body in frame, head to feet, one person.
429rate_limited, too_many_concurrent_requests, too_many_failed_attemptsWait the seconds in Retry-After, then retry.
429monthly_limit_reachedThis month's scans are used: your key's own, or those its account shares (the message says which). They renew on the date in X-Scans-Renew; contact us to raise the limit.
503busy, startingRetry after Retry-After seconds; capacity is being added.
500internal_errorRetry once. If it persists, send us the request_id.

Limits & retries

Built for production traffic.

Rate-limit headers

Every response carries the standard headers for your key's per-minute limit, and errors that ask you to wait carry Retry-After.

X-Request-Id:        3f9a1c0d2b7e4a51
RateLimit-Limit:     120
RateLimit-Remaining: 117
RateLimit-Reset:     42

Plans with a monthly number of scans also carry X-Scans-Limit, X-Scans-Remaining and X-Scans-Renew. Only measured scans count, and the month runs from the day your key was issued. For a key that shares its account's scans, X-Scans-Remaining is the lower of what's left on the key and on the account.

Client guidance

  • Retry safely. Retry 429 and 503 after Retry-After seconds, and 500 once. A scan changes nothing on our side, so a retry never double-counts state.
  • Pace concurrency. Send a few scans at once per key (your agreement says how many) and queue the rest; each takes a few seconds.
  • Time out at 120 seconds. Uploads must finish within 60.
  • Quote the request id. It's in every response, header and body, and is all we need to look into a request.
  • Check readiness with GET /health, which needs no key.

Usage this month

GET /v1/usage returns your key's measured scans this month: used, limit, remaining and the renewal date. It costs no scan.

Platforms with keys for their own customers

If you give each of your customers (shops, stores, clinics) a key of its own, those keys share your plan's monthly scans, on one invoice to you. A key can also have a cap, so you can split the scans between customers or let them share freely.

Your platform key sees the shared total and every key's count, which is what you bill your customers by. Their keys see only their own. We add keys and change caps on request, usually the same day.

GET /v1/usage · platform key
{
  "period": { "start": "2026-12-01",
              "renews": "2027-01-01" },
  "key":  { "id": "platform", "used": 112,
            "limit": null, "remaining": 788 },
  "pool": { "id": "account", "used": 512,
            "limit": 1300, "remaining": 788 },
  "keys": [
    { "id": "platform", "used": 112,
      "limit": null, "active": true },
    { "id": "shop-north", "used": 41,
      "limit": 300, "active": true },
    // …every key sharing the scans
  ]
}

Security & data handling

Built so there's nothing to leak.

The simplest way to protect body photos is never to keep them. Here is what happens to the data in a scan, end to end.

Photos are never stored

Photos and heights are processed in memory only, on a read-only file system. They are never written to disk, logged or used for training.

No personal data in logs

Photos, heights, measurements and IP addresses are never written to logs, not even briefly. Logs hold only technical details (status, duration, error type) and are kept for a short time for troubleshooting. For billing we keep a count of scans per customer, and nothing else.

Encrypted and filtered

TLS 1.2 or higher on every connection, a web application firewall in front of the service, API keys stored only as hashes, and per-key and per-visitor rate limits.

Ready for your review

A Data Processing Agreement, a security overview for your IT review, and a dedicated instance with private networking when your policies need it. The 3D viewer contacts no third parties.

Your appPhotos and height, captured with the user's consent
SnapMeasureAIProcessed in memory · returned · never saved
Your systemResults stored against your record, under your retention

Regions & deployment

Your data stays in the region you choose.

Photos sent to a region are processed in that region only. Your agreement names your region and your keys.

DeploymentBase URLFor
United Stateshttps://api.snapmeasureai.comShared service, US customers
European Union (Frankfurt)https://eu.api.snapmeasureai.comShared service, processing in the EU
Dedicated instancehttps://<company>.api.snapmeasureai.comYour own environment in the cloud region you choose, with its own network, keys and data-handling terms

Core

REST API

Your own capture screen calls the API from your back end, website or app.

Visual

Embedded 3D viewer

Show the body and measurements inside your product without building a 3D renderer.

Core

Capture SDK

The guided camera flow inside your own web page, in your design, with one script.

Enterprise

Dedicated instance

Your own environment, private networking, and the region and terms your policies require.

Versioning

Stable to build on.

  • /v1 is stable. Anything that would break an integration comes with a new version path and advance notice, as set out in your agreement.
  • Additions arrive without notice. New optional fields and outputs can appear at any time, so ignore fields you don't recognize.
  • model_version changes only when the measurement models change. Store it with each result, so you know which model measured it.
  • Existing integrations on the original POST /body/analyze contract keep working; new integrations should use /v1/measurements.

FAQ

Developer questions

Which languages and platforms are supported?

Anything that can make an HTTPS request with a JSON body: any back-end language, web, iOS or Android. For websites there is the capture SDK, one script with the whole guided camera flow; for everything else, the OpenAPI 3.1 file imports into Postman and generates a typed client for most languages.

Can the scan give the person's weight?

Yes, as an estimate: add "weight" to include. It is computed from the scan's height and girths with formulas fitted on public survey data (NHANES and ANSUR II, over 33,000 adults who were both measured and weighed), and we can calibrate it to your own users' scale weights. It is meant for recommendations, not for medical use.

Does the API give body fat and body composition?

Yes: add "body_composition" to include and send the person's sex (and, if you have them, age and weight). You get body fat %, fat mass, fat-free mass and visceral fat, estimated from the scan's height and girths with models fitted on whole-body DXA scans of about 29,700 adults (NHANES). Sex, age and weight are used for that answer only, never stored. It is meant for fitness and wellness, not for medical use.

Can two people be measured in one visit?

Yes, one after the other: each scan is one person, with their own height and their own result. With the SDK, call capture() once for each.

Can we call the API from our website or mobile app?

Yes. Browser keys work only from the website addresses registered for them, and app keys carry per-device limits. Server keys stay on your back end: requests made with a server key from a web page are refused.

How can we try it before signing?

The live demo runs the same scan, free, in any browser, including the measurement studio for defining your own measurements. API keys are issued with an agreement and set up for your use case: your measurement set, your outputs and your region.

Can we get only the measurements, or only the 3D body?

Yes. Choose per request with include, or set your account's default outputs. Many integrations take the measurements for sizing and the OBJ or glTF body for their pattern, CAD or visualization tools.

How do we define our own measurements?

Open our measurement builder (a default 3D body, no scan needed), use Custom Measure to define any girth or length on the body, and save it as a measurement set. We attach it to your keys, and every scan returns exactly that set, with your field names, units and rounding.

Are photos or results stored?

No. Photos and heights are processed in memory only. They are never written to disk, logged or used for training, and results go back to your system rather than being kept by SnapMeasureAI.

How fast is a scan?

Processing takes about five seconds; the upload adds to that, so send photos of 1,000–2,000 px on the long side. When many scans arrive at once, capacity is added automatically, and a busy answer tells you when to retry.

Will the API change under us?

No. /v1 is stable. New optional fields and outputs can be added at any time, so ignore fields you don't recognize. A change that would break an integration comes with a new version path and advance notice, as set out in your agreement.

Ready to build it in?

Tell us what you're building. We'll set up your keys, measurement set and region, and walk your team through the first integration.

Or write to us directly: info@snapmeasureai.com