API Reference
Mannequin image conversion to real person image.

Mannequin image conversion to real person image.

Action GenerateFromMannequin

Introduction

This interface is used to convert the mannequin in the picture into a real person image.

Request

Parameter NameTypeDescriptionRequired
ActionStringThe corresponding API command name, the current API is GenerateFromMannequin
PublicKeyStringUser's public key, can be obtained from User Center (opens in a new tab)
SignatureStringUser signature generated based on public key and API command, see Signature
request_uuidStringRequest uuid, randomly generated using uuid generation method, used for troubleshooting
MainModelModelGenerate Image Main Model,default: PICPIK Portrait
SubModelList[]ModelGenerate Image Sub Model
PositivePrompts[]StringPositive Prompts
NegativePrompts[]StringNegative Prompts
TranslatePromptsBoolTranslate other language to English, default value: true
Image2ImageImage2ImageParamgraph parameters
MannequinMannequinParammannequin image parameters
SeedIntRandom seed number (-1~2147483647), default value: -1
WidthIntWidth (64~2560), default value: 1024
HeightIntHeight (64~2560), default value: 1024
UseMainModelVAEBoolWhether to use the VAE that comes with the main model, default value: false
BatchSizeIntBatch image size (1~16), default value: 1
ImageAndMaskList[]StringBase64 list of reference images List

Model

Parameter NameTypeDescriptionRequired
ModelCodeStringModel Code
InferenceParamsInferenceParamInference Params

InferenceParam

Parameter NameTypeDescriptionRequired
StepsIntSteps(6~100),default: 10
LoraWeightFloatLora weight (only valid when the model is lora),default: 1

BackgroundImageParam

Parameter NameTypeDescriptionRequired
ImageIndexIntThe image is indexed in ImageList, starting from 0
ReferStrengthFloatReference strength (0~1) Default value: 0.3
ResizeModeStringScaling mode, reference values: JustResize, CropAndResize, ResizeAndFill, default value: ResizeAndFill

MannequinParam

Parameter NameTypeDescriptionRequired
**ImageIndexIntModel original image, filled in the ImageAndMaskList index, starting from 0
**ClothesMaskIndexIntMask the mask image, where the white part is the redrawn part. Masks can be independently drawn or obtained through background removal and content extraction APIs. Fill in the ImageAndMaskList index, starting from 0
InvertMaskBoolInvert the mask, default value: false
ResizeModeStringScaling mode, reference values: JustResize, CropAndResize, ResizeAndFill, default value: ResizeAndFill

Request Example

{
    "Action": "GenerateFromMannequin",
    "PublicKey": "ALLak9M4cNdHXKOJAJJ4k8Hh1hZS2EgJF1D0FlPwfl",
    "Signature": "7e61f1f16321a1cdeef1395adc12437eae77005c",
    "request_uuid": "d893b720-15a5-4f60-8c37-c87343079ca5",
    "BatchSize": 2,
    "Image2Image": {
        "ImageIndex": 0,
        "ReferStrength": 0.3,
        "ResizeMode": "ResizeAndFill"
    },
    "ImageAndMaskList": [
        "data:image/jpeg;base64,xxxx",
        "data:image/jpeg;base64,xxxx"
    ],
    "Mannequin": {
        "ImageIndex": 0,
        "ClothesMaskIndex": 1
    },
    "NegativePrompts": [],
    "PositivePrompts": [
        "girl",
        "smile"
    ],
    "TranslatePrompts": true
 
}

Response

Parameter NameTypeDescriptionRequired
RetCodeIntReturn status code, 0 for successful return, non-zero for failure
ActionStringOperation command name
MessageStringReturn error message, provide detailed description when RetCode is non-zero
request_uuidStringReturns the requested uuid
TaskUIDStringTask UID , used to query task details and get results

Response Example

{
	"Action": "GenerateFromMannequin",
	"RetCode": 0,
	"Message": "",
	"request_uuid": "5ae03609-451b-44d7-a351-c72904df881b",
	"TaskUID": "ckt3uqacrh4miq8mr9lgg"
}