Skip to main content
This page matches SDK 2.0.0. Auth: License & Auth. Makeup / reshape enums: Parameter enums.

Requirements

  • Browser: Chrome 57+, Firefox 52+, Safari 11+, Edge 16+
  • Language: JavaScript (ES6+) or TypeScript
  • Context: HTTPS or localhost (required for camera)

Install SDK

Get the example

Clone the GitHub repository and open demo/web/react:
The demo is a Vite + React app. It depends on the in-repo SDK via file: during development.

Bind domain and get credentials

  1. In the Dashboard, bind your Web domain (for example example.com). See Subscribe.
  2. Copy appId / appKey from the Dashboard. Do not put them on EngineConfig. On Web they belong on your server, or only inside createDirectAuthFetcher for local debug.
Web has no offline .lic. Details: License & Auth.

Configure the demo

Open src/views/BeautyPreview.jsx. The sample uses direct auth for local debug:
createDirectAuthFetcher puts appKey in the browser bundle. Use it only on localhost. Production must use authProxyUrl or a server-issued licenseToken.
Serve resource.fbd at /resource.fbd (the default resourcePath). Copy the packed bundle into public/ so Vite can serve it.

Run

Open the URL Vite prints (usually http://localhost:5173).

Verify

  1. Open DevTools (F12) and watch the console.
  2. Allow camera if prompted.
  3. Drag beauty sliders — you should see skin smoothing / reshape on the preview.

Minimal production init

Your proxy holds app_id / app_key and forwards the SDK auth request. Example server code is on License & Auth.