Recraft v3 icon

Recraft v3

Generate and edit images using Recraft v3 AI - the #1 ranked text-to-image model

Overview

This node integrates with the Recraft v3 AI service to generate images from text prompts. It supports generating multiple images in various styles and sizes, including realistic photos, digital illustrations, vector graphics, and icons. Users can customize the generation by specifying sub-styles for digital illustrations, applying advanced options like color palettes, background colors, artistic tone, and precise text layout embedding.

Common scenarios include:

  • Creating unique artwork or concept visuals based on descriptive text.
  • Generating marketing images or social media content tailored to specific themes.
  • Producing styled illustrations or icons for design projects.
  • Experimenting with different artistic levels and color schemes programmatically.

Practical example:
Generate a set of 3 photo-realistic images of "a futuristic city skyline at dusk" in 1024x1024 resolution, excluding blurry or low-quality results, returning URLs for easy sharing.

Properties

Name Meaning
Prompt Text description of the desired image (max 1000 bytes). Example: "A majestic landscape with mountains and a lake at sunset".
Model Model to use for image generation. Options: "Recraft V3 (Recommended)", "Recraft V2 (20B)".
Style Style of the generated image. Options: "Realistic Image", "Digital Illustration", "Vector Illustration", "Icon", "Any" (model chooses best style).
Sub Style Sub-style for digital illustrations only. Options include "Hand Drawn", "Pixel Art", "Cartoon", "Anime", "3D Render", "Pop Art", "Street Art", etc. Default is none.
Image Size Size of the generated image. Multiple presets available such as "1024x1024 (Square)", "1365x1024 (Landscape)", "1024x1365 (Portrait)", up to ultra-wide and ultra-tall formats.
Number of Images Number of images to generate, between 1 and 6.
Custom Style ID Use a custom style ID instead of predefined styles; overrides the Style parameter.
Response Format Format of the response. Options: "URL" (returns image URL), "Base64 JSON" (returns base64 encoded image data).
Negative Prompt Text describing what should NOT appear in the image (max 1000 bytes). Example: "blurry, low quality, distorted".
Advanced Options Collection of optional advanced settings:
- Colors (JSON Array) JSON array specifying colors to use in the image. Each color is an object with an "rgb" array of three integers [r, g, b] (0-255). Example: [{"rgb": [255, 0, 0]}, {"rgb": [0, 255, 0]}].
- Background Color Background color as an RGB array [r, g, b]. Example: [255, 255, 255] for white.
- Artistic Level Artistic tone level from 0 (simple/static) to 5 (dynamic/eccentric).
- No Text Boolean flag to prevent embedding text layouts in the image.
- Text Layout Define multiple text elements and their bounding boxes (coordinates normalized 0-1) to place words precisely in the image (supported only by Recraft V3 model).

Output

The node outputs an array of JSON objects representing the generated images. Each object contains either:

  • A URL string pointing to the generated image if "Response Format" is set to "URL".
  • A base64-encoded string of the image data if "Response Format" is set to "Base64 JSON".

The output format depends on the user's choice and can be used directly for display, download, or further processing.

Dependencies

  • Requires an API key credential for authenticating with the Recraft API service.
  • The node calls Recraft's REST endpoints to perform image generation.
  • No additional external dependencies beyond the configured API credential and network access.

Troubleshooting

  • Prompt too long error: If the prompt exceeds 1000 bytes, the node throws an error. Solution: shorten the prompt text.
  • Invalid JSON in Colors or Background Color: If the JSON arrays for colors or background color are malformed, the node will throw an error. Solution: ensure valid JSON syntax and correct structure.
  • Invalid JSON in Text Layout bounding box: If bounding box coordinates are not valid JSON arrays of four points, an error occurs. Solution: verify the bounding box format matches [[x1,y1], [x2,y2], [x3,y3], [x4,y4]] with values between 0 and 1.
  • Too many reference images for style creation: When creating styles (not in this operation), max 5 images allowed.
  • Binary data validation errors: For operations requiring input images, ensure the binary property exists and contains valid image data.
  • API request failures: Network issues or invalid credentials will cause errors. Verify API key validity and network connectivity.

Links and References

Discussion