Skip to main content

Recraft - Background Replacer

Replace image backgrounds with high-quality AI-generated content using Recraft's advanced technology. This tool allows you to describe a new background and seamlessly integrate your subject into the generated scene.

Endpoint

Request Headers

FieldValue
API-KEY<api-key>
Content-Typeapplication/json

Parameters

ParameterTypeRequiredDescription
typestringYesFeature type identifier. Must be BACKGROUND_REPLACER
modelstringYesAI model identifier. Must be recraft
promptObjectobjectYesConfiguration object containing parameters

Prompt Object Parameters

ParameterTypeRequiredDescriptionDefault
imageUrlstringYesPath to the source image-
promptstringYesDescription of the desired background-
nnumberNoNumber of images to generate1
stylestringNoStyle for the background (e.g., vector_illustration)-
substylestringNoSubtle style of the image-
negative_promptstringNoWhat to exclude from the background-
task_typestringNoThe specific Recraft model version to userecraftv3

Use the Get Recraft Style List API to retrieve all available styles and substyles dynamically.

Get Recraft Style List API

Before replacing backgrounds, you can retrieve the complete list of available styles and substyles for each Recraft model version.

Endpoint

Request Headers

FieldValue
API-KEY<api-key>

Query Parameters

ParameterTypeRequiredDescription
taskTypestringYesModel version: recraftv3

Response Format

{
"styleList": [
{
"model": "recraftv3",
"style": "digital_illustration",
"substyle": "2d_art_poster"
},
{
"model": "recraftv3",
"style": "digital_illustration",
"substyle": "2d_art_poster_2"
},
],
"total": 2
}

Example Request

curl --location 'https://api.1min.ai/api/recraft/styles?taskType=recraftv3' \
--header 'API-KEY: <api-key>'

Interactive Playground

API Playground

https://api.1min.ai/api/recraft/styles
Choose which Recraft model styles to retrieve

Generated cURL Command:

curl -X GET "https://api.1min.ai/api/recraft/styles?taskType=recraftv3" \
-H "API-KEY: <your-api-key>"

Code Examples

curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "BACKGROUND_REPLACER",
"model": "recraft",
"promptObject": {
"imageUrl": "images/2026_01_07_09_33_18_380_room.png",
"prompt": "a beautiful tropical beach with palm trees and sunset",
"n": 1,
"style": "vector_illustration",
"substyle": "bold_stroke"
}
}'

Interactive Playground

API Playground

https://api.1min.ai/api/features
Path to the source image
Describe the new background
Choose which Recraft model to use
Number of images to generate
Style for the background
Subtle style identifier (e.g., 'bold_stroke')

Generated cURL Command:

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "BACKGROUND_REPLACER",
"model": "recraft",
"promptObject": {
"imageUrl": "images/2026_01_07_09_33_18_380_room.png",
"prompt": "a beautiful tropical beach with palm trees and sunset",
"n": 1,
"style": "vector_illustration",
"substyle": "bold_stroke",
"task_type": "recraftv3"
}
}'

Response Format

{
"aiRecord": {
"uuid": "r1e2c3r4-a5f6-7890-abcd-ef1234567892",
"userId": "user-12345",
"teamId": "team-67890",
"teamUser": {
"teamId": "team-67890",
"userId": "user-12345",
"userName": "John Doe",
"userAvatar": "https://example.com/avatar.jpg",
"status": "ACTIVE",
"role": "ADMIN",
"creditLimit": 100000000,
"usedCredit": 50000,
"createdAt": "2025-01-01T00:00:00.000Z",
"createdBy": "SYSTEM",
"updatedAt": "2026-01-02T13:13:31.000Z",
"updatedBy": "SYSTEM"
},
"model": "recraft",
"type": "BACKGROUND_REPLACER",
"metadata": null,
"rating": null,
"feedback": null,
"conversationId": null,
"status": "SUCCESS",
"createdAt": "2026-01-02T13:13:31.000Z",
"aiRecordDetail": {
"promptObject": {
"imageUrl": "images/2026_01_07_09_33_18_380_room.png",
"prompt": "a beautiful tropical beach with palm trees and sunset",
"n": 1,
"style": "vector_illustration",
"substyle": "bold_stroke"
},
"resultObject": [
"images/2026_01_02_13_13_31_002_replaced_background.png"
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/images/2026_01_02_13_13_31_002_replaced_background.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=EXAMPLE_CREDENTIAL&X-Amz-Date=20260102T131331Z&X-Amz-Expires=604800&X-Amz-Signature=example_signature&X-Amz-SignedHeaders=host&x-id=GetObject"
}
}

Use Cases

Advertising

  • Product placement: Place products in various environments without expensive photoshoots.
  • Dynamic ads: Generate background variations for localized or targeted advertisements.

Content Creation

  • Thematic content: Create consistent backgrounds for social media series or blog posts.
  • Video thumbnails: Generate eye-catching backgrounds for YouTube thumbnails.

Professional Editing

  • Portrait enhancement: Replace distracting backgrounds with professional studio or environmental scenes.
  • Graphic design: Quickly create base images for composites and creative projects.