MaIA Scan

skin analysis API integration

Skin Analysis API Integration: From First Call to Production

A practical walkthrough of skin analysis API integration for beauty teams: what the response contains, how to plan capture and consent, where the call belongs in your stack, and how to handle low confidence before launch.

5 min readMaIA team · B4A

Most beauty teams discover that the hard part of a skin analysis API integration is not the HTTP request. The request is a photo in and JSON out. The hard part is everything around it: how the selfie gets captured, who owns the consent text, where the beauty profile is stored, and what the experience does when the photo is not good enough. This article walks through the whole path, in the order a product or engineering team usually hits it.

What the response actually gives you

MaIA Scan takes a selfie and returns a beauty profile as JSON: skin tone and undertone, skin type and condition, hair attributes, and a confidence value per field. The model was trained on Brazilian skin, which matters if your audience sits across a wide tone range and you have been frustrated by tools calibrated elsewhere.

Two things to internalise before you design anything:

  • The API describes visible attributes of a photo. It is not a diagnosis, it does not treat anything, and it does not replace a dermatologist or a trained consultant. Your copy should say the same.
  • Confidence is per field, not per request. A photo can return a reliable skin tone and a weak reading on another attribute. Your logic should branch field by field, not throw away the whole profile.

That second point is the one most teams retrofit after launch. Build it in from the start.

Skin analysis API integration in four steps

1. Account, credits and key

MaIA Scan is self-serve. You create an account, buy credits and get an API key from the API documentation. No sales cycle is required to make your first call, which means a developer can validate the response shape against your real use case in an afternoon, before anyone writes a brief.

Keep the key server-side. The capture happens in the browser or the app, but the call to the API should go through your backend so the key is never shipped to a client.

2. A first call with your own photos

Do not evaluate on stock images. Collect a small set of selfies that look like your actual traffic: phone cameras, mixed lighting, different tones, hair up and hair down, with and without makeup. Run them through and read the confidence values alongside the attributes.

This is your baseline. It tells you what share of your real-world photos will be usable, and it tells you where to invest in the capture screen instead of in the model.

3. The capture layer

The capture screen does more for quality than any parameter you can send. Give the user a face guide, ask for even front lighting, no strong backlight, hair off the face, and a neutral expression. Allow a retake before submitting. If you let people upload an old photo from the gallery, expect a wider spread of results than a guided live capture.

Also decide what happens on mobile web versus app. Most beauty traffic is mobile browser, so test on mid-range Android devices and on slow connections, not only on the newest phone in the office.

A selfie is personal data. Before you go live, settle three questions with legal: what the user is told at the moment of capture, how long the image is retained, and whether the beauty profile is stored against a customer record. A common and defensible pattern is to keep the profile — the structured attributes — and discard the image once the analysis returns. Make the consent text short, specific and present on the capture screen itself, not buried in a footer.

Where the call belongs in your stack

Product page or diagnostic quiz

The most direct placement. The user takes a selfie, you return a shortlist of shades or routines, and you keep the profile in session so the recommendation persists while they browse. If you already run a quiz, the API replaces the self-declared questions people answer badly — skin type, undertone — and keeps the preference questions a photo cannot answer.

WhatsApp and conversational channels

The user sends a photo in the thread, your backend calls the API and the reply comes back as a recommendation. This is where MaIA Beauty Advisor fits: it reads the beauty profile and recommends your own catalog on WhatsApp, product pages and chat. Unlike the Scan API, it is delivered as a project with the B4A team, because it has to be wired to your catalog, your shade data and your tone of voice.

CRM and lifecycle

The profile is a durable attribute. Written into your CRM, it becomes a segment: undertone for shade-matching campaigns, hair attributes for a haircare launch. Store the confidence alongside the attribute so low-confidence records can be excluded from a campaign instead of polluting it.

Alongside try-on

Analysis narrows the choice, try-on confirms it. A natural sequence is scan, shortlist, then preview the top shades. MaIA Try-On is a separate product with its own integration path — photo-based through the API, and a browser SDK in early access for live camera mode — so plan it as a second phase, not as a toggle on the same endpoint.

Handling low confidence without breaking the flow

Define a threshold per field and three behaviours. High confidence: use the attribute silently. Medium: use it but offer a confirmation step — "we read your undertone as neutral, is that right?". Low: fall back to a question, or ask for a retake with a specific reason ("too dark, try facing a window").

Never show a blank screen or a raw error. A user who took a selfie and got nothing back will not take a second one.

Before you call it done

Instrument the funnel: capture started, photo submitted, profile returned, recommendation shown, product added to cart. Without those events you cannot tell whether a weak result is a model problem, a capture problem or a merchandising problem. And log the confidence distribution weekly — it is the earliest signal that something changed in your capture screen or your traffic mix.

Ready to test the response against your own photos? Create an account and get an API key, or talk to the B4A team about a catalog-integrated project.

Frequently asked questions

How long does a skin analysis API integration take?

The call itself is a photo in and JSON out, so a developer can validate the response against real photos quickly. The timeline is usually driven by the capture screen, the consent text and the recommendation logic, not by the API.

Should the API key live in the browser or on my server?

On your server. The selfie can be captured in the browser or app, but the request to MaIA Scan should be proxied through your backend so the key is never exposed to a client.

What does the skin analysis API return?

A beauty profile as JSON: skin tone and undertone, skin type and condition, hair attributes, and a confidence value for each field. It describes visible attributes of a photo and does not diagnose or treat anything.

Do I have to store the selfie?

No. A common pattern is to keep the structured beauty profile against the customer record and discard the image once the analysis returns. Settle retention and consent wording with your legal team before launch.

Can I combine skin analysis with makeup try-on?

Yes, as two integrations. MaIA Scan narrows the shortlist from a selfie and MaIA Try-On previews the shades — photo-based through its API, or in live camera mode through the browser SDK, which is in early access and granted per account.

Skin analysis APIIntegrationBeauty techAPIE-commerce

← All articles