Overview
This node enhances the resolution of images by using an external image upscaling API service. It supports inputting images either via a direct URL or as binary data from previous nodes. The node sends the image along with a chosen scale factor (2x or 4x) to the API, which processes the image to increase its resolution.
Common scenarios for this node include:
- Improving the quality of low-resolution images before further processing or display.
- Preparing images for printing or detailed inspection where higher resolution is required.
- Enhancing user-uploaded images in workflows that involve image manipulation or analysis.
For example, you might use this node to double the resolution of product photos fetched from URLs or to upscale images uploaded as binary data within an automation workflow.
Properties
| Name | Meaning |
|---|---|
| Image Input Method | Method to provide the image: either by "URL" or by "Binary Data". |
| Image Binary Property | (Shown if Binary Data selected) Name of the binary property containing the image data (default: "data"). |
| Image URL | (Shown if URL selected) URL of the image to upscale. |
| Image Requirements | Notice: The image should be JPEG or PNG format and must not exceed 10MB in size. |
| Scale Factor | Factor to upscale the image resolution: "2x" (double) or "4x" (quadruple). |
| Wait For Completion | Whether to wait for the upscaling process to finish before continuing the workflow (true/false). |
| Max Retries | (Shown if waiting for completion) Maximum number of retries to check task status (default: 20). |
| Retry Interval | (Shown if waiting for completion) Time interval between retries in milliseconds (default: 3000 ms). |
Output
The node outputs JSON data describing the status and result of the upscaling task:
When not waiting for completion, the output contains at least:
task_id: Identifier of the created upscaling task.status: Current status of the task (usually"pending").
When waiting for completion, the output includes the final task status and any additional data returned by the API upon completion.
If the node receives binary data as input, it encodes it as a base64 data URI before sending it to the API.
The node does not directly output the upscaled image binary data; instead, it provides task metadata and status information.
Dependencies
- Requires an API key credential for the external PiAPI image upscaling service.
- Uses the PiAPI endpoint
/api/v1/taskto create and monitor upscaling tasks. - The node relies on helper functions to handle binary data extraction and API requests.
- Configuration of the API credential in n8n is necessary for authentication.
Troubleshooting
Error: "The provided binary data is not an image"
Occurs if the binary input does not have an image MIME type. Ensure the binary data comes from a valid image file.Error: "Failed to get a valid task ID from the API"
Indicates the API did not return a proper task identifier. Check API credentials and network connectivity.Error related to invalid image input
If the API cannot process the image, verify that the image URL is accessible, the image format is JPEG or PNG, and the file size is under 10MB.Timeouts or long waits when "Wait For Completion" is enabled
Adjust the "Max Retries" and "Retry Interval" properties to balance between responsiveness and giving enough time for the API to complete processing.General API errors
If the node throws errors related to the API request, confirm that the API key is valid and has sufficient permissions.
Using the "Continue On Fail" option can help workflows proceed even if some items fail processing.
Links and References
- PiAPI Image Upscale Documentation (hypothetical link for reference)
- n8n Binary Data Handling
- Image Formats and Size Recommendations