# 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.

Let's use this image as input:

<figure><img src="https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2F3ZPNRnkh7l5I3fYYItS2%2Fimage.png?alt=media&#x26;token=9a33c220-0680-4eb0-9ceb-e3d29b5aabe5" alt=""><figcaption></figcaption></figure>

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

* see-dream-4.5
* qwen
* gemini-3-pro-image-preview
* flux2-klein9b

```json
{
    "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": "see-dream-4.5",
            "avatar_generation_type": "regular"
        }
    }
}
```

### see-dream-4.5

<figure><img src="https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FlcXuI6gsoZZDn63ojbk1%2Fseedream.png?alt=media&#x26;token=dac9abc6-5265-4690-9a83-0800f6173dc0" alt=""><figcaption></figcaption></figure>

### qwen

<figure><img src="https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2Fl0ycGgugZ1nNkQKOWPMt%2Fapi-example3-width%3D1024_height%3D1024_face_generated.jpg?alt=media&#x26;token=ec8f2b21-6d18-4301-8051-060b89a14326" alt=""><figcaption></figcaption></figure>

### gemini-3-pro-image-preview

<figure><img src="https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FYVVwqCdPfK63XEF1hlxP%2Fgenerated_image-pro.png?alt=media&#x26;token=6c9c8509-e672-4b01-8a35-c2ef31d68f45" alt=""><figcaption></figcaption></figure>

### flux2-klein9b

<figure><img src="https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FAVWJf6VXnCBssIBSvRUu%2Fapi-example3-width%3D1024_height%3D1024_face_generated%20(1).jpg?alt=media&#x26;token=78999f39-6bd5-4f68-bdf8-9e09fd8702dc" alt=""><figcaption></figcaption></figure>

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"

```json
{
    "url": "https://deep-image.ai/api-example3.jpg",
    "width": 1024,
    "height": 1024,
    "background": {
        "generate": {
            "description": " a woman sitting behind a desk in a modern office environment. her smiling face is seen from behind her computer screen, with only the top of her head and a portion of her shoulders visible. The office space around her is bright and airy, illuminated by soft, natural light streaming in from large windows.",
            "adapter_type": "face",
            "model_type": "google-gemini-image-flash",
            "avatar_generation_type": "accurate"
        }
    }
}
```

**Description of older models**

```json
{
    "url": "https://deep-image.ai/api-example3.jpg",
    "width": 1024,
    "height": 1024,
    "background": {
        "generate": {
            "description": " a woman sitting behind a desk in a modern office environment. her smiling face is seen from behind her computer screen, with only the top of her head and a portion of her shoulders visible. The office space around her is bright and airy, illuminated by soft, natural light streaming in from large windows.",
            "adapter_type": "face",
            "face_id": true
        }
    }
}
```

**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.

<figure><img src="https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FhYHDLpHqeJbBJuypsXx8%2Fapi-example3-width%3D1024_height%3D1024_face_generated%20(1).jpg?alt=media&#x26;token=459c5f3e-3170-46f9-b345-6ec34e888bdf" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.deep-image.ai/common-usecases/create-business-photo-or-avatar-from-face-image.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
