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
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Feature type identifier. Must be BACKGROUND_REPLACER |
model | string | Yes | AI model identifier. Must be recraft |
promptObject | object | Yes | Configuration object containing parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
imageUrl | string | Yes | Path to the source image | - |
prompt | string | Yes | Description of the desired background | - |
n | number | No | Number of images to generate | 1 |
style | string | No | Style for the background (e.g., vector_illustration) | - |
substyle | string | No | Subtle style of the image | - |
negative_prompt | string | No | What to exclude from the background | - |
task_type | string | No | The specific Recraft model version to use | recraftv3 |
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
| Field | Value |
|---|---|
| API-KEY | <api-key> |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskType | string | Yes | Model 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
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/recraft/styles?taskType=recraftv3' \
--header 'API-KEY: <api-key>'
fetch('https://api.1min.ai/api/recraft/styles?taskType=recraftv3', {
method: 'GET',
headers: {
'API-KEY': 'YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));
import requests
url = "https://api.1min.ai/api/recraft/styles"
headers = {
"API-KEY": "YOUR_API_KEY"
}
params = {
"taskType": "recraftv3"
}
response = requests.get(url, headers=headers, params=params)
styles = response.json()
Interactive Playground
API Playground
https://api.1min.ai/api/recraft/stylesChoose 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
- JavaScript
- Python
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"
}
}'
const body = JSON.stringify({
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'
}
});
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'API-KEY': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: body
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"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"
}
}
response = requests.post(url, headers=headers, json=payload)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresPath 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.