Skip to main content
SDK 2.0.0. Headers live in facebetter/*.h. Makeup / reshape / style enums: Parameter enums. Auth: Auth & License.
On Windows, Facebetter is a C++ library (facebetter.lib + facebetter.dll). This guide follows the C++ desktop demo (demo/cpp).

Include headers

Integration flow

There is no type-enable step. Setting an intensity above 0 turns that effect on.

1. Configure logging (optional)

Call this before Create so initialization logs are captured.
Levels (low → high): Trace / Debug / Info / Warn / Error / Critical.

2. Create the engine

Desktop must set resource_path to the resource.fbd file. Auth priority: if license_token is non-empty, the SDK validates that token (license token string, {token} JSON, or offline .lic) and does not call the network with app_id / app_key. Otherwise it uses app_id + app_key against /facebetter/v2/auth.
resource_path must be the resource.fbd file, not a folder. Relative paths are resolved from the process working directory. Prefer an absolute path in production.

3. Set beauty parameters

Skin / makeup / body-reshape intensities are [0.0, 1.0]. 0 is off. Face reshape is [-1.0, 1.0]. Full enum lists: Parameter enums.

Skin

Face reshape

Body reshape

Range [0.0, 1.0]. 0 is off. Place resource_body.fbd next to resource.fbd or call AddResourcePack. See Parameter enums and Optional resource packs.

Makeup

Intensity, shape, and color are separate setters. Lipstick is color-only; pupil is color-only; contour is style-only.
Same pattern for eyeliner, eyebrow, eyelash, and pupil (SetEyeLiner / SetEyebrow / SetEyelash / SetPupil plus Style / Color where applicable).

4. Filters, stickers, and virtual background

Pass a file path or encoded bytes.
LUT / sticker textures are created on the next ProcessImage call (the active GL thread). For 3D stickers see Optional resource packs.

5. Callbacks and stats


6. Process frames

Set ImageFrame::type to FrameType::Video (realtime, default) or FrameType::Image (single photo).
File (photo mode):
The engine keeps output format aligned with input when possible (RGBA in → RGBA out, I420 in → I420 out). Use Convert(Format::BGRA) if you need another layout.

Upload to OpenGL (preview)

Keep facebetter.dll next to the executable (the demo CMake copies it after build).

7. Minimal loop

When you are done, drop the shared_ptr (engine.reset()). BeautyEffectEngine is not a singleton. For TRTC / Agora / LiveKit: Third-party Integration.

Third-party Integration

TRTC / Agora / LiveKit

API reference

All C++ methods and types

Error handling

Return codes and Windows DLL issues

Best practices

Performance and threading