Actions9
Overview
The "Image to Image" operation of the Recraft v3 node transforms an input image based on a text prompt and various parameters. It uses AI to modify or enhance images by applying styles, changing content, or generating variations while preserving some aspects of the original image. This operation is useful for creative editing tasks such as turning a photo into a digital illustration, adding seasonal effects (e.g., winter snow), or creating multiple stylistic variations of an image.
Practical examples include:
- Transforming a landscape photo into a painting-like style.
- Generating several artistic versions of a product image for marketing.
- Enhancing or altering images for social media posts with specific themes or moods.
Properties
| Name | Meaning |
|---|---|
| Input Image | The binary property name containing the image file to transform. |
| Prompt | Text description guiding how to transform the input image (max 1000 bytes). |
| Strength | Degree of change applied to the input image (0 = no change, 1 = complete transformation). |
| Number of Images | Number of image variations to generate (between 1 and 6). |
| Style | Style category for the transformation: Any, Realistic Image, Digital Illustration, Vector Illustration. |
| Negative Prompt | Description of unwanted elements in the transformed image (e.g., blurry, low quality, artifacts). |
| Response Format | Format of the output image: URL or Base64 encoded JSON data. |
Output
The node outputs JSON data containing the generated image(s) according to the selected response format:
- If "URL" is chosen, the output includes URLs pointing to the generated images.
- If "Base64 JSON" is chosen, the output contains base64-encoded image data embedded directly in the JSON.
The output structure typically includes an array of images matching the requested number of variations, each represented either by a URL or base64 string depending on the response format.
Dependencies
- Requires an API key credential for the Recraft v3 AI service.
- The node depends on the Recraft API endpoints for image transformations.
- Binary image data must be provided in a supported format (e.g., PNG, JPEG).
- Proper configuration of the API authentication in n8n credentials is necessary.
Troubleshooting
- Prompt length error: If the prompt exceeds 1000 bytes, the node throws an error. Solution: shorten the prompt text.
- Invalid binary data: If the input image binary property is missing or invalid, the node will fail. Ensure the binary data exists and is correctly referenced.
- Invalid JSON in properties: For advanced options (not used in this operation but present in the node), malformed JSON strings cause errors. Validate JSON formatting carefully.
- API request failures: Network issues or invalid API keys can cause request errors. Verify API credentials and network connectivity.
- Number of images out of range: Values outside 1-6 for number of images will cause errors. Use valid values within this range.