Bodygram
Playground

Body2Fit Playground

Experience the full Body2Fit size recommendation flow live — product check, scanning, estimation, and size recommendation in one place.

See Body2Fit in action

Body2Fit maps a shopper's body measurements to a garment size. Under the hood, it runs a guided two-photo scan (or takes body stats directly), estimates measurements using Bodygram's computer vision engine, and returns the size label the shopper should pick. You own every pixel of the experience — the SDK handles the scanner iframe, the estimation calls, and the recommendation API.

This page lets you run the complete integration flow against Bodygram's demo garments. Use it to understand what each step does before wiring it into your own product page.

For the full integration guide, see Body2Fit Integration.


Integration pattern

Every Body2Fit integration follows four sequential steps. The playground below runs all four live:

  1. Check support — call sdk.getBody2FitIsProductSupported() on page load. Only show the size-finding UI if it returns true.
  2. Collect measurements — guide the shopper through a two-photo scan, or let them enter height, weight, age, and gender directly.
  3. Estimate — call getBody2FitPhotoEstimation or getBody2FitStatsEstimation to get an estimation token representing the shopper's body.
  4. Recommend — pass the token and garment SKU to getBody2FitSizeRecommendation. Show the result.

Interactive Demo

1Configure

Garments

sku
display name
sku
display name
2Check Product Support

Before showing a "Find my size" button, confirm Bodygram has garment data for this product. Only render the size-finding experience when supported === true.

3User Stats

Collect the shopper's stats first. Gender is used both by the estimation call and to pick the correct scanner silhouette in the next step.

years
cm
kg
4Scan & Size

Camera scanning gives more accurate measurements. Stats-only works without a camera and is quicker for returning users.

5Size Recommendation
CODE
const sdk = new BodygramSDK({
  clientKey: '001b093acb89b8e6ee7995abcd5dda24d66aebef1afa28ff8283dd95af236ec4',
  locale: 'en',
});

API reference

Full signatures, parameters, response shapes, and error codes for every method used in the playground above live in the Headless SDK API reference.

Methods

Types

  • Avatar — shape of the optional 3D avatar returned by photo estimation.
  • Measurements — full list of estimationType keys returned by Body2Fit estimation methods.
  • Fitting Points — fitting-point keys used in getBody2FitSizeFitting responses, with their display names.

On this page