Create business photo or avatar from face image

This API function generates a custom avatar based on a single input image, ideal for creating high-quality avatars from a provided reference. Users can customize the avatar's dimensions, background, and style to suit various use cases.

When creating images, there are several model types available. However, these two are preferred for optimal results:

  • google-gemini-image-flash

  • qwen

{
    "url": "https://deep-image.ai/api-example3.jpg",
    "width": 1024,
    "height": 1024,
    "background": {
        "generate": {
            "description": "Woman in a beige pantsuit, arms in pockets, looking professional, standing near a bookshelf. Outfit:  beige linen pantsuit and white blouse.",
            "adapter_type": "face",
            "model_type": "google-gemini-image-flash",
            "avatar_generation_type": "regular"
        }
    }
}

Also face swap can be used to ensure the face will be as close to source face as possible.

It can be done by specifying avatar_generation_type = "accurate"

Description of older models

Parameter Breakdown:

  • url: URL of the input image that will serve as the base for avatar generation.

  • width and height: Dimensions of the output avatar image, specified in pixels. Here, the output will be a 1024x1024 square.

  • background:

    • generate: Details for the AI-generated image.

      • description: Text description

      • adapter_type: it has to be "face" for avatar generation

      • face_id: if true it turns on algorithm that changes hair, etc.

When creating images, there are several model types available. However, these two are preferred for optimal results:

  • google-gemini-image-flash

  • qwen

Last updated