Recraft
v0.2.1AI image generation, transformation, and style management via the Recraft API
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_image Generate Image
Generate images from a text prompt using Recraft AI. Supports multiple styles (realistic, illustration, vector, icon, logo), various sizes, and fine-tuning controls like color palette and artistic level. V4 models do not support style parameters — use the prompt to control style instead.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Text description of the image to generate. Max 1000 chars for V2/V3, 10000 for V4. |
artistic_level | integer | Artistic level from 0 (simple) to 5 (dynamic). |
image_format | string | Output format: webp or png. |
model | string | Model to use. Default: recraftv3. |
n | integer | Number of images to generate (1-6). Default: 1. |
negative_prompt | string | What to avoid in the generated image. |
no_text | boolean | Prevent text from appearing in the image. |
random_seed | integer | Seed for reproducible results. |
size | string | Image dimensions as WxH. Default: 1024x1024. |
style | string | Style category. Not supported for V4 models. Default: realistic_image. |
style_id | string | Custom style ID. Cannot be used together with style/substyle. |
substyle | string | Substyle to refine the style (e.g. 'b_and_w', 'pixel_art', 'watercolor'). |
image_to_image Image to Image
Transform an existing image based on a text prompt. The strength parameter controls how much the image changes (0.0 = minimal change, 1.0 = maximum change). Provide the image as a URL or base64-encoded string.
| Parameter | Type | Description |
|---|---|---|
image * | string | Source image as a URL or base64-encoded string. Max 5MB, <16MP, max 4096px per side. |
prompt * | string | Description of desired changes to the image. |
strength * | number | Change magnitude from 0.0 (minimal) to 1.0 (maximum). |
image_format | string | Output format. |
model | string | Model to use. |
n | integer | Number of output images (1-6). |
negative_prompt | string | What to avoid. |
random_seed | integer | Seed for reproducibility. |
style | string | Style category. Not supported for V4 models. |
style_id | string | Custom style ID. |
substyle | string | Substyle to refine the style. |
inpaint_image Inpaint Image
Inpaint (fill in) a masked region of an image based on a text prompt. Requires the original image and a grayscale mask (white = inpaint, black = preserve).
| Parameter | Type | Description |
|---|---|---|
image * | string | Source image as a URL or base64-encoded string. |
mask * | string | Grayscale PNG mask as a URL or base64-encoded string. White = areas to inpaint, black = areas to preserve. |
prompt * | string | Description of what to generate in the masked area. |
image_format | string | Output format. |
model | string | Model to use. |
n | integer | Number of output images (1-6). |
negative_prompt | string | What to avoid. |
random_seed | integer | Seed for reproducibility. |
style | string | Style category. |
style_id | string | Custom style ID. |
substyle | string | Substyle. |
replace_background Replace Background
Replace the background of an image while preserving the foreground subject. Provide a text prompt describing the new background.
| Parameter | Type | Description |
|---|---|---|
image * | string | Source image as a URL or base64-encoded string. |
prompt * | string | Description of the new background. |
image_format | string | Output format. |
model | string | Model to use. |
n | integer | Number of output images (1-6). |
negative_prompt | string | What to avoid. |
random_seed | integer | Seed for reproducibility. |
style | string | Style category. |
style_id | string | Custom style ID. |
substyle | string | Substyle. |
generate_background Generate Background
Generate a background for an image using a mask to define the background area. The mask indicates which areas should be filled with the generated background.
| Parameter | Type | Description |
|---|---|---|
image * | string | Source image as a URL or base64-encoded string. |
mask * | string | Mask defining the background area as a URL or base64-encoded string. |
prompt * | string | Description of the background to generate. |
image_format | string | Output format. |
model | string | Model to use. |
n | integer | Number of output images (1-6). |
negative_prompt | string | What to avoid. |
random_seed | integer | Seed for reproducibility. |
style | string | Style category. |
style_id | string | Custom style ID. |
substyle | string | Substyle. |
remove_background Remove Background
Remove the background from an image, leaving a transparent background. Provide the image as a URL or base64-encoded string.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image as a URL or base64-encoded string. |
image_format | string | Output format: webp or png. |
erase_region Erase Region
Erase a region from an image defined by a mask. The erased area is filled seamlessly. Provide the image and a grayscale mask (white = erase, black = preserve).
| Parameter | Type | Description |
|---|---|---|
image * | string | Source image as a URL or base64-encoded string. |
mask * | string | Grayscale mask as a URL or base64-encoded string. White = erase, black = preserve. |
image_format | string | Output format. |
vectorize_image Vectorize Image
Convert a raster image (PNG/JPG/WEBP) to a scalable vector SVG format. Useful for converting logos, icons, and illustrations to resolution-independent vectors.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image to vectorize as a URL or base64-encoded string. |
crisp_upscale Crisp Upscale
Upscale an image with crisp, sharp detail preservation. Best for images where sharpness is important. Input image must be max 5MB and <4MP.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image to upscale as a URL or base64-encoded string. Max 5MB, <4MP. |
image_format | string | Output format. |
creative_upscale Creative Upscale
Upscale an image with creative enhancement — adds detail and improves quality beyond simple scaling. Best for artistic images where added creative detail is desirable. Input image must be max 5MB and <16MP.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image to upscale as a URL or base64-encoded string. Max 5MB, <16MP. |
image_format | string | Output format. |
create_style Create Custom Style
Create a custom style from 1-5 reference images. The style can be used in subsequent image generation by passing the returned style_id. Reference images define the visual style that will be applied.
| Parameter | Type | Description |
|---|---|---|
images * | array | 1-5 reference images as URLs or base64-encoded strings. |
style * | string | Base style category for the custom style. |
get_style Get Style Details
Retrieve details of a custom style by its ID.
| Parameter | Type | Description |
|---|---|---|
style_id * | string | The style ID to retrieve. |
list_styles List Custom Styles
List all custom styles created by the authenticated user.
list_basic_styles List Basic Styles
List all available curated/basic styles provided by Recraft. These can be used as the style parameter in generation tools.
delete_style Delete Custom Style
Delete a custom style by its ID. This action is irreversible.
| Parameter | Type | Description |
|---|---|---|
style_id * | string | The style ID to delete. |
get_current_user Get Current User
Retrieve information about the authenticated user, including remaining credits.