Actions9
Overview
The node integrates with the Recraft v3 AI service to perform various image-related operations, including vectorizing raster images into SVG format. The Vectorize operation specifically converts a raster input image (e.g., PNG or JPEG) into a scalable vector graphic (SVG), which is useful for designers and developers who need clean, resolution-independent graphics for logos, icons, or illustrations.
Common scenarios where this node is beneficial include:
- Converting hand-drawn sketches or photos into vector art for use in design software.
- Preparing images for printing or web use where scalability without quality loss is required.
- Automating batch conversion of multiple raster images into vectors within an n8n workflow.
Example: A user uploads a PNG logo and uses the Vectorize operation to generate an SVG version that can be resized freely without pixelation.
Properties
| Name | Meaning |
|---|---|
| Input Image | Name of the binary property containing the image file to be vectorized. |
| Response Format | Format of the response returned by the API: - URL: Returns a URL pointing to the vectorized image.- Base64 JSON: Returns the vectorized image as base64 encoded JSON data. |
Output
The output contains a JSON object representing the vectorized image result from the Recraft API. Depending on the selected Response Format, the output will include either:
- A URL string linking to the generated SVG image.
- A base64-encoded JSON string containing the SVG image data.
This allows downstream nodes to either download the SVG via URL or process the base64 data directly.
If the node supports binary data output (not explicitly shown here), it would represent the SVG file content suitable for saving or further processing.
Dependencies
- Requires an active connection to the Recraft API service.
- Needs an API authentication credential configured in n8n (referred generically as "an API key credential").
- The node expects the input image to be provided as binary data in the specified input property.
- No additional environment variables are indicated.
Troubleshooting
- Invalid or missing input image: Ensure the binary property name specified in "Input Image" exists and contains valid image data.
- Unsupported image formats: The input should be a common raster image format supported by Recraft (e.g., PNG, JPEG).
- API errors: Network issues or invalid credentials may cause request failures. Verify API key validity and network connectivity.
- Response format issues: If selecting Base64 JSON, downstream nodes must handle decoding properly.
- Large images: Very large images might cause timeouts or memory issues; consider resizing before vectorization.
Common error messages:
"Invalid JSON format"— usually related to other operations but not typical for vectorize."At least one reference image is required"— relevant only for style creation, not vectorize.- General HTTP errors with status codes indicating authentication or request problems.
Links and References
- Recraft AI official website (for more details about the API and capabilities)
- SVG format specification (to understand the output format)
- n8n documentation on working with binary data
This summary focuses exclusively on the Image > Vectorize operation as requested, based on static analysis of the provided source code and property definitions.