Getting Started
Embed AI-powered size recommendations into your e-commerce experience with Body2Fit.
What is Body2Fit?
Body2Fit is a size recommendation widget by Bodygram. It lets shoppers find their best fit — without returns, without guesswork — by analyzing their body measurements against your garment size data.
Embed a single JavaScript SDK into your storefront. Shoppers interact with a guided flow and receive a size recommendation in seconds. Your team receives structured data to act on.
Body2Fit is designed for developers building integrations. This documentation covers everything you need to run a complete, working implementation.
Building a custom UI? If you need full control over the size recommendation experience, see the Headless SDK instead.
Prerequisites
Before writing any code, make sure you have:
- A Bodygram account — Contact us to get access.
- A Client Key — provided after your account is set up. This authenticates the widget on your domain.
- Registered garments — each garment must be uploaded to the Bodygram dashboard or API before it can be used in the widget. The widget references garments by their SKU.
The widget requires a valid Client Key and at least one registered garment to initialize. Set these up before proceeding.
Try it out
Configure the widget and click Apply & Embed to watch the lifecycle events fire in real time. The code panel shows a complete HTML file you can copy and run locally. The demo uses Bodygram's test brand — swap in your own clientKey, brandId, and garmentSKU to test against your catalogue.
Next: Integration Guide — plain HTML, React, Vue, and common patterns.
Interactive Demo
Configuration
Widget lifecycle
