Tasks description
Along with the file for processing, a payload is received - a description of what needs to be done.
Mode
This documentation only covers the "professional" mode. This parameter is required.
Tasks
For mode=professional, you must specify a list of tasks - which plugins should be applied and their settings.
Each task is a plugin name, the parameters for using this plugin, and a marker for whether to save the task result in a separate layer. Each plugin has no more than two main parameters. In API parameters they are mapped to "Alpha1" and "Alpha2" fields. The correspondence table with value ranges and parameter name mapping is given here.
- Plugin - plugin name.
- Alpha1 — first plugin parameter.
- Alpha2 — second plugin parameter.
- Scale — scale of the person in the photo, also can be interpreted as resolution.
For Clean Backdrop plugin, Scale defines dirt size.
- 0 - auto detection
- 1 - close-up of the face
- 2 - half-body portrait
- 3 - full-body portrait
- Automask — Protects the person so changes apply only to the background. Available only for Clean Backdrop.
- Layer — flag to save task result or not.
- 0 - Layer will not be saved, next Layer will be computed relatively to this one. If all tasks have Layer 0, the output is a retouched image.
- 1 - Layer will be saved in separate file. The final result is a ZIP archive with layers.
It is highly recommended to order tasks list by plugin name in same way as in the table below.
The numerical value of 1 corresponds to 100% value in the plugin.
| Plugin | Alpha1 | Alpha1 range | Alpha2 | Alpha2 range | |
|---|---|---|---|---|---|
| Skin Mask | Sensitivity | [0, 2] | - | - | - |
| Clean Backdrop | Blend | [0, 1] | - | - | |
| Heal | Sensitivity | [0, 1] | - | - | |
| Fabric | Blend | [0, 2] | - | - | |
| Eye Vessels | Blend | [0, 1] | - | - | |
| Eye Brilliance | Blend | [0, 2] | - | - | |
| White Teeth | Whiten | [0, 1] | Brighten | [0, 1] | |
| Mattifier | Blend | [0, 1] | - | - | |
| Dodge Burn | Blend | [0, 2] | Warmth | [0, 1] | |
| Skin Tone | Blend | [0, 2] | - | - | |
| Portrait Volumes | Blend | [0, 2] | - | - |
💡
{
"mode": "professional",
"tasks": [
{
"Plugin": "Clean Backdrop",
"Scale": 0,
"Layer": 1,
"Alpha1": 1,
"Automask": true,
},
{
"Plugin": "White Teeth",
"Scale": 0,
"Layer": 1,
"Alpha1": 0.3,
"Alpha2": 0.3
},
{
"Plugin": "Mattifier",
"Scale": 0,
"Layer": 1,
"Alpha1": 0.7,
"Alpha2": 0
},
{
"Plugin": "Dodge Burn",
"Scale": 0,
"Layer": 1,
"Alpha1": 2,
"Alpha2": 0
},
{
"Plugin": "Skin Tone",
"Scale": 0,
"Layer": 1,
"Alpha1": 2,
"Alpha2": 0
},
{
"Plugin": "Portrait Volumes",
"Scale": 0,
"Layer": 1,
"Alpha1": 1,
"Alpha2": 0
}
]
}