setBeautify of the SDK to set beautification effects.type BeautifyOptions = {whiten?: number, // The brightening effect. Value range: 0-1.dermabrasion?: number // The smooth skin effect. Value range: 0-1.lift?: number // The slim face effect. Value range: 0-1.shave?: number // The face width. Value range: 0-1.eye?: number // The big eyes effect. Value range: 0-1.chin?: number // The chin effect. Value range: 0-1.// The following parameters are only available in version 1.0.11 and abovedarkCircle?: number; // The dark circle effect. Value range: 0-1.nasolabialFolds?: number; // The nasolabial folds effect. Value range: 0-1.cheekbone?: number; // The cheek bone effect. Value range: 0-1.head?: number; // The head effect. Value range: 0-1.eyeBrightness?: number; // The eye brightness effect. Value range: 0-1.lip?: number; // The lip effect. Value range: 0-1.forehead?: number; // The forehead effect. Value range: 0-1.nose?: number; // The nose effect. Value range: 0-1.usm?: number; // The distinct effect. Value range: 0-1.}
setBeautify of the SDK to set beautification effects:sdk.setBeautify({whiten: 0.2,dermabrasion: 0,lift: 0.3,shave:0.1,eye: 0.9,chin: 0,……})
const filterList = await sdk.getCommonFilter()
sdk.setFilter(filterList[0].EffectId, 0.5)
// Get the built-in effects// By default, both makeup effects and stickers are returned. You can also use the `Label` parameter to specify the category of materials to return.const presetEffectList = await sdk.getEffectList({Type: 'Preset'// Label: ['Sticker'] (Return only stickers)})// Get the custom effectsconst customEffectList = await sdk.getEffectList({Type: 'Custom'})// Pass in the request parameters of `getEffectList`const lipList = await sdk.getEffectList({PageNumber: 0,PageSize: 10,Name: '',Label: ['Lip makeup'], // Specify the specific type of materials to returnType: 'Custom'})const eyeList = await sdk.getEffectList({PageNumber: 0,PageSize: 10,Name: '',Label: ['Eye makeup'], // Specify the category of resources to returnType: 'Custom'})// Use an effectsdk.setEffect([lipList[0].EffectId, eyeList[0].EffectId])// Specify the effect to use and the strength of the effectsdk.setEffect([{id: lipList[0].EffectId,intensity: 0.5},{id: eyeList[0].EffectId,intensity: 0.7})// Set only the filter strengthsdk.setEffect([{id: lipList[0].EffectId,intensity: 0.5,filterIntensity: 0},{id: eyeList[0].EffectId,intensity: 0.7,filterIntensity: 1})
filterIntensity to adjust the strength of the filter separately.// Clear all effect settings to disable AI detectionsdk.setBeautify({whiten: 0,dermabrasion: 0,lift: 0,shave:0,eye: 0,chin: 0,…… // reset all parameters to 0})sdk.setEffect('')
Feedback