# Enhance Image

**Action ID:** `enhance`

## Description

Enhance image quality using AI-powered processing to improve clarity, sharpness, and overall visual quality.

## 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 to enhance. Supported formats: PNG, JPEG, JPG, WebP |

<details>

<summary>View JSON Schema</summary>

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

</details>

## Output Parameters

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

<details>

<summary>View JSON Schema</summary>

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

</details>

## How It Works

This node uses PixelML's AI-powered enhancement algorithms to automatically improve image quality. The system analyzes the input image for areas that need improvement, then applies advanced processing techniques to enhance sharpness, reduce noise, improve contrast, and optimize colors. The enhanced image maintains the original composition while improving overall visual fidelity.

## Usage Examples

### Example 1: Enhance Low-Quality Photo

**Input:**

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

**Output:**

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

### Example 2: Improve Product Image

**Input:**

```
image_url: "https://example.com/product-dark.png"
```

**Output:**

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

### Example 3: Restore Old Photo

**Input:**

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

**Output:**

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

## Common Use Cases

* **E-commerce Product Images**: Improve product photo quality for online stores and catalogs
* **Photo Restoration**: Enhance and restore old or damaged photographs
* **Social Media Content**: Improve image quality before posting to social platforms
* **Real Estate Photography**: Enhance property photos to make them more appealing
* **Portrait Enhancement**: Improve portrait photos by reducing noise and enhancing details
* **Document Scanning**: Clean up and sharpen scanned documents and images
* **Marketing Materials**: Improve image quality for presentations, brochures, and advertisements

## Error Handling

| Error Type         | Cause                                         | Solution                                              |
| ------------------ | --------------------------------------------- | ----------------------------------------------------- |
| 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 enhancement       |
| Connection Error   | Cannot connect to PixelML API                 | Check your PixelML connection settings and API key    |
| Processing Failed  | Enhancement algorithm failed to process image | Try with a different image or check image quality     |
| Corrupted Image    | Image file is corrupted or incomplete         | Verify the image file is valid and not corrupted      |

## Notes

* **Supported Formats**: The node supports PNG, JPEG, JPG, and WebP formats for both input and output.
* **Quality Improvement**: Enhancement works best on images with slight quality issues. Extremely low-quality images may show limited improvement.
* **Processing Time**: Enhancement may take several seconds depending on image size and complexity.
* **Original Preservation**: The original image is not modified; a new enhanced version is created.
* **Batch Processing**: For multiple images, create a loop workflow to process images sequentially.
* **API Limits**: Be aware of PixelML API rate limits when processing multiple images in succession.


---

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