# Face Consistency

The "Consistent Face Model" allows you to generate a series of images where the face maintains a consistent appearance across the generated outputs.

To use this feature, you provide an initial facial image as a reference. The model then uses this reference to create new images while keeping the facial features aligned with the original picture. This ensures that the face structure and characteristics remain faithful to your initial prompt.

For a more detailed explanation of how the Consistent Face Model works, please refer to the [face-consistent](https://docs.qolaba.ai/image-to-image/face-consistent "mention") page.

## Face consistency API

<mark style="color:green;">`POST`</mark> `/getImagetoImage`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

| Name                  | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                |
| --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| app\_id               | string | -> Each model is uniquely characterized by its own `app_id`.                                                                                                                                                                                                                                                                                                                                                                               |
| image                 | string | <p>-> The <code>image</code> parameter specifies the URL of an existing image that will be used as a reference for the generation process. </p><p>-> If the original image dimensions exceed 1536x1536 pixels, the image will be adjusted to fit within this size while preserving the original aspect ratio.</p>                                                                                                                          |
| prompt                | string | -> The `prompt` parameter is the textual input that guides the image generation process. This prompt serves as an artistic compass, shaping the visual output.                                                                                                                                                                                                                                                                             |
| batch                 | int    | <p>-> The <code>batch</code> parameter allows you to specify the number of images to generate at once. </p><p>-> The valid range for this parameter is between 1 and 8.</p>                                                                                                                                                                                                                                                                |
| height                | int    | <p>-> The <code>height</code> parameter represents the vertical dimension of an image. </p><p>-> The valid range for the parameter is between 256 and 1536 pixels. </p>                                                                                                                                                                                                                                                                    |
| width                 | int    | <p>-> The <code>width</code> parameter represents the horizontal dimension of an image. </p><p>-> The valid range for the parameter is between 256 and 1536 pixels. </p>                                                                                                                                                                                                                                                                   |
| num\_inference\_steps | int    | <p>-> The <code>num\_inference\_steps</code> parameter represents the number of denoising iterations to perform during the image generation process. Generally, more iterations can result in higher-quality images, but they also increase the time required for generation.</p><p>-> The valid range for the <code>num\_inference\_steps</code> parameter is between 1 and 50.</p>                                                       |
| guidance\_scale       | float  | <p>-> The <code>guidance\_scale</code> parameter determines how closely the generated image adheres to the provided prompt. Higher values result in the model following the prompt more closely, while lower values allow for more creative deviation.</p><p>-> The valid range for the <code>guidance\_scale</code> parameter is between 1 and 30.</p>                                                                                    |
| negative\_prompt      | string | -> The `negative_prompt` parameter allows you to specify content that you want the image generation model to avoid or minimize in the output. This can be useful for excluding certain visual elements or styles that you do not want to be present in the generated image.                                                                                                                                                                |
| strength              | float  | <p>-> The <code>strength</code> parameter specifies the degree of transformation applied to the reference image. </p><p>-> A higher <code>strength</code> value (up to 1) results in the generated image closely following the reference image.</p>                                                                                                                                                                                        |
| celery                | bool   | -> The `celery` parameter is used for queuing tasks that require extended processing time. When you enqueue a task, you receive a unique `task_id`. This `task_id` allows you to check the task's status later using the task status API, which is useful for managing and tracking long-running tasks.                                                                                                                                    |
| inference\_type       | string | <p>-> The <code>inference\_type</code> parameter allows you to specify the GPU to be used for the image generation task. The supported values are:</p><ul><li><code>a10g</code></li><li><code>a100</code></li><li><code>h100</code></li></ul><p>The different GPU options provide varying levels of performance and capabilities, allowing you to choose the most suitable GPU based on your requirements and the demand for the task.</p> |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "time_required": "",
  "error": "",
  "error_data": "",
  "input": "",
  "output": "",
  "app_id": "",
  "task_id": "",
  "status": ""
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "time_required": "",
  "error": "",
  "error_data": "",
  "input": "",
  "output": "",
  "app_id": "",
  "task_id": "",
  "status": ""
}
```

{% endtab %}
{% endtabs %}

## Run the API

To test this API, please use the following link:

{% embed url="<https://app.theneo.io/api-runner/qolaba/ml-apis/api-reference/face-consistency>" %}
