For the complete documentation index, see llms.txt. This page is also available as Markdown.

Face swap

Face swapping API can be used for replacing the face on the original image with another one.

{
    "url": "original_image",
    "background": {
        "generate": {
            "adapter_type": "face",
            "avatar_generation_type": "creative_img2img",
            "ip_image2": "replacement_face_url"
        }
    }
}

Whole head swap

By default, face swap replaces the face area only.

To swap the whole head, set background.generate.generation_type to "head_swap".

This works well when hairstyle, head shape, or head position should also change.

{
    "url": "original_image",
    "background": {
        "generate": {
            "adapter_type": "face",
            "avatar_generation_type": "creative_img2img",
            "generation_type": "head_swap",
            "ip_image2": "replacement_face_url"
        }
    }
}

Let's swap a head from this photo to another:

Last updated