# Enhance Image V2

**Action ID:** `enhance_image_v2`

## Description

Image enhancement version 2.0 utilizes artificial intelligence to improve the quality of your photos. It can increase resolution, sharpen details, and correct colors, all while preserving the original content of your image. This can be especially helpful for restoring old photos or enlarging low-resolution images.

## Connection

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

## Input Parameters

| Name       | Type                | Required | Default | Description                                                                 |
| ---------- | ------------------- | :------: | ------- | --------------------------------------------------------------------------- |
| image\_url | string (media\_url) |     ✓    | -       | The URL of the image to enhance. Supports PNG, JPEG, JPG, and WebP formats. |

<details>

<summary>View JSON Schema</summary>

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

</details>

## Output Parameters

| Name  | Type                | Description               |
| ----- | ------------------- | ------------------------- |
| image | string (media\_url) | URL of the enhanced image |

<details>

<summary>View JSON Schema</summary>

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

</details>

## How It Works

This node sends your image to the PixelML AI service, which analyzes the image quality and applies machine learning models to enhance it. The AI automatically upscales resolution, sharpens details, reduces noise, and adjusts colors to produce a higher-quality version. The enhanced image is then uploaded to a storage service and returned as a URL for use in your workflow.

## Usage Examples

### Example 1: Enhance Low-Resolution Product Photo

**Input:**

```
image_url: "https://example.com/product-photo-low-res.jpg"
```

**Output:**

```
image: "https://storage.example.com/enhanced-product-photo.jpg"
```

### Example 2: Restore Old Family Photo

**Input:**

```
image_url: "https://example.com/old-family-photo-1950.png"
```

**Output:**

```
image: "https://storage.example.com/restored-family-photo.png"
```

### Example 3: Upscale Social Media Image

**Input:**

```
image_url: "https://example.com/social-media-post.webp"
```

**Output:**

```
image: "https://storage.example.com/upscaled-social-media-post.webp"
```

## Common Use Cases

* **E-Commerce Product Images**: Enhance low-quality product photos for better presentation in online stores
* **Photo Restoration**: Restore and enhance old, faded, or damaged photographs
* **Social Media Content**: Improve image quality for professional-looking social media posts
* **Print Materials**: Upscale images for high-resolution printing on marketing materials
* **Real Estate Listings**: Enhance property photos to make listings more attractive
* **Profile Pictures**: Improve the quality of profile photos for professional networks
* **Digital Art**: Enhance digital artwork and illustrations for better clarity and detail

## Error Handling

| Error Type           | Cause                                                 | Solution                                                        |
| -------------------- | ----------------------------------------------------- | --------------------------------------------------------------- |
| Invalid Image URL    | Image URL is not accessible or returns an error       | Verify the URL is publicly accessible and returns a valid image |
| Unsupported Format   | Image format is not PNG, JPEG, JPG, or WebP           | Convert the image to a supported format before enhancement      |
| Connection Failed    | PixelML connection credentials are invalid or missing | Check your PixelML connection configuration and API key         |
| Image Too Large      | Image file size or dimensions exceed service limits   | Resize the image to smaller dimensions before processing        |
| Processing Timeout   | Enhancement took too long to complete                 | Try again with a smaller image or check PixelML service status  |
| Insufficient Credits | PixelML account has insufficient credits or quota     | Check your PixelML account balance and add credits if needed    |
| Network Error        | Unable to download the source image or upload result  | Verify network connectivity and that URLs are accessible        |

## Notes

* **API Key Required**: You must configure a PixelML connection with a valid API key before using this node.
* **Supported Formats**: Accepts PNG, JPEG, JPG, and WebP image formats for input.
* **Image Quality**: Best results are achieved with images that have some existing quality—severely degraded images may have limited improvement.
* **Processing Time**: Enhancement can take several seconds depending on image size and complexity.
* **Resolution Increase**: The AI can upscale images by 2x or 4x while maintaining quality and sharpness.
* **URL Accessibility**: Input image URLs must be publicly accessible for the service to download and process them.
* **Cost Considerations**: PixelML API usage may incur costs based on your plan and the number of enhancements performed.
* **Batch Processing**: For multiple images, use this node in a loop or workflow to process images sequentially.


---

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