# Face Detailer

**Action ID:** `face_detailer`

## Description

Enhance and refine facial details in images using AI-powered face detection and enhancement technology.

## Connection

| Name               | Description                                 | Required | Category |
| ------------------ | ------------------------------------------- | :------: | -------- |
| PixelML Connection | The PixelML connection to call PixelML API. |     ✓    | pixelml  |

## Input Parameters

| Name       | Type   | Required | Default | Description                                                                               |
| ---------- | ------ | :------: | ------- | ----------------------------------------------------------------------------------------- |
| image\_url | string |     ✓    | -       | The URL of the image containing faces to enhance. Supported formats: PNG, JPEG, JPG, WebP |

<details>

<summary>View JSON Schema</summary>

```json
{
  "description": "Face Detailer action input.",
  "properties": {
    "image_url": {
      "title": "Image url",
      "type": "string"
    }
  },
  "required": [
    "image_url"
  ],
  "title": "FaceDetailerActionInput",
  "type": "object"
}
```

</details>

## Output Parameters

| Name  | Type   | Description                                       |
| ----- | ------ | ------------------------------------------------- |
| image | string | The URL of the image with enhanced facial details |

<details>

<summary>View JSON Schema</summary>

```json
{
  "description": "Face Detailer action output.",
  "properties": {
    "image": {
      "title": "Image output",
      "type": "string"
    }
  },
  "required": [
    "image"
  ],
  "title": "FaceDetailerActionOutput",
  "type": "object"
}
```

</details>

## How It Works

This node uses advanced AI algorithms to detect faces in the input image and apply targeted enhancements to facial features. The system automatically identifies faces, analyzes facial details such as skin texture, eyes, nose, and mouth, then applies sophisticated enhancement techniques to improve clarity, reduce blemishes, and enhance overall facial appearance while maintaining a natural look.

## Usage Examples

### Example 1: Enhance Portrait Photo

**Input:**

```
image_url: "https://example.com/portrait.jpg"
```

**Output:**

```
image: "https://pixelml.com/output/enhanced-portrait-abc123.jpg"
```

### Example 2: Improve Group Photo

**Input:**

```
image_url: "https://example.com/group-photo.png"
```

**Output:**

```
image: "https://pixelml.com/output/enhanced-group-def456.png"
```

### Example 3: Restore Old Photo Faces

**Input:**

```
image_url: "https://example.com/vintage-family-photo.jpg"
```

**Output:**

```
image: "https://pixelml.com/output/restored-faces-ghi789.jpg"
```

## Common Use Cases

* **Portrait Photography**: Enhance professional portrait photos for clients and portfolios
* **Profile Pictures**: Improve headshots and profile images for social media and professional networks
* **Wedding Photography**: Enhance facial details in wedding and event photos
* **E-commerce**: Improve model photos for fashion and beauty product listings
* **ID Photos**: Enhance passport and identification photos while maintaining accuracy
* **Photo Restoration**: Restore and enhance faces in old or damaged family photos
* **Content Creation**: Improve facial details in images for blogs, videos, and marketing materials

## Error Handling

| Error Type         | Cause                                   | Solution                                                   |
| ------------------ | --------------------------------------- | ---------------------------------------------------------- |
| No Face Detected   | Image contains no detectable faces      | Ensure the image contains at least one clear, visible face |
| Invalid Image URL  | URL is malformed or inaccessible        | Verify the image URL is valid and publicly accessible      |
| Unsupported Format | Image format is not supported           | Convert image to PNG, JPEG, JPG, or WebP format            |
| Image Too Large    | Image file size exceeds maximum allowed | Resize or compress the image before processing             |
| Face Too Small     | Faces in image are too small to enhance | Use a higher resolution image or crop closer to faces      |
| Connection Error   | Cannot connect to PixelML API           | Check your PixelML connection settings and API key         |

## Notes

* **Face Detection**: The node automatically detects all faces in the image and enhances them simultaneously.
* **Natural Results**: Enhancement algorithms are designed to maintain natural appearance while improving detail and clarity.
* **Multiple Faces**: Works with images containing multiple faces, enhancing each face independently.
* **Resolution Impact**: Higher resolution images produce better enhancement results with more visible improvements.
* **Processing Time**: Face detailing may take several seconds depending on image size and number of faces.
* **Privacy Considerations**: Be mindful of privacy and consent when processing images containing identifiable faces.


---

# 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://docs.agenticflow.ai/reference/nodes/face_detailer.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.
