Avalta docs

Avalta adds live beauty filters to your streaming app. This page covers how it fits into your app and how licensing works. The SDK package itself comes with your trial key.

Getting started

  1. Request a trial and tell us your app ID: the Android package name (for example com.yourapp.live) or your website's domain.
  2. We send a 14-day trial key and the SDK package for your platform.
  3. Add the SDK, give it the key and the camera, and publish its output with your streaming SDK.
  4. When you go live, pick a plan. Your key keeps working and the trial becomes a paid licence.

How it fits your app

Avalta sits between the camera and your streaming SDK. It takes the camera picture, applies beauty, makeup and a colour filter on the phone's GPU, and gives you a video track to publish instead.

camera  →  Avalta (on the phone)  →  your streaming SDK  →  viewers
import { Avalta } from "@avalta/beauty";

const beauty = await Avalta.start({
  key: "AVL-XXXXX-XXXXX-XXXXX-XXXXX",
  appId: "com.yourapp.live",
  camera: cameraStream,        // a MediaStream from getUserMedia
});

streamingSdk.publish(beauty.track);   // a normal video track
beauty.openPanel();                    // Studio and Network: the built-in panel
beauty.set({ smooth: 0.4, whiten: 0.5, look: "rose-tint" });   // or drive it yourself
On native Android streaming SDKs (Agora, ZEGO and similar) the frame hand-off depends on the SDK. We check your setup during the trial, and on the Studio plan we do the integration with your developer.

Licence keys

A key looks like AVL-7KQ2M-X9PDA-4HRTC-WN3EZ. Each key is tied to your app IDs, so a key copied into someone else's app does not work. We store only a hash of it, so if you lose it we issue a new one rather than look it up.

Verify API

The SDK calls this for you. It is documented here so your developers know what leaves the app.

POST https://avalta.online/api/v1/licenses/verify
Content-Type: application/json

{
  "key": "AVL-7KQ2M-X9PDA-4HRTC-WN3EZ",
  "appId": "com.yourapp.live",
  "device": "a random id created on install"
}

A licence that can run returns 200:

{ "ok": true, "token": "eyJhbGciOiJFUzI1NiIs…", "expiresAt": 1767225600 }

One that cannot returns 403 with a reason, listed under Errors. The endpoint allows 60 checks a minute from one address; the SDK makes about one a day per install.

The token

The token is a standard JWT signed with ES256. The SDK checks the signature on the phone against our public key, which is built into the SDK and published at /api/v1/keys. An edited token fails the check.

ClaimMeaning
appThe app ID this token is for
planstarter, studio, network or trial
grantsThe features switched on, listed below
expWhen the token stops working: 7 days after it was issued, or when the licence ends, whichever is sooner
lic_expWhen the licence itself ends

Features by plan

GrantWhat it switches onStarterStudioNetworkTrial
beautySkin sliders: smoothing, whitening, ruddy, glow, contour, clarity, dark circles, smile lines, teeth, bright eyesYesYesYesYes
filtersThe 13 colour filtersYesYesYesYes
looks:basic20 makeup looksYes
looks:allAll 74 makeup looks, including looks for menYesYesYes
reshapeFace, eye, nose and mouth reshape slidersYesYesYes
panelThe ready-made beauty panel UIYesYesYes
custom-looksLooks made for your appYes

Offline and cancellation

  • The SDK refreshes the token about once a day.
  • With no network it keeps running on the saved token until the token expires, up to 7 days. A streamer on a weak connection is never cut off mid-stream by a licence check.
  • When a licence is paused, cancelled or ends, the next check fails and the beauty features turn off. The camera and the rest of your app keep working.

Errors

CodeWhat it meansWhat to do
unknown_keyNo licence has this keyCheck the key was copied in full
app_not_allowedThe key is not registered for this app IDAsk us to add the app ID
suspendedThe licence is paused, usually for an unpaid invoiceContact us
expiredThe licence or trial has endedRenew or pick a plan
revokedThe licence was cancelledContact us for a new one
rate_limitedToo many checks from one addressWait a minute. The SDK backs off by itself

What we collect

No video, no images and no face data ever leave the phone. Each licence check sends the key, the app ID and a random install ID. We keep a hashed install ID, the IP address and the time of each check, to count active installs on your licence and to stop keys being guessed. See the privacy policy.