Skip to main content

Stable Diffusion XL - Background Replacer

Replace the background of existing images using Stable Diffusion XL AI model.

Endpoint

Request Body

The request must include the following parameters:

ParameterTypeRequiredDescription
typestringYesFeature type identifier. Must be BACKGROUND_REPLACER
modelstringYesAI model identifier. Must be clipdrop
promptObjectobjectYesFeature-specific parameters

Prompt Object Parameters

ParameterTypeRequiredDescription
imageUrlstringYesPath to the image
promptstringYesBackground description

Example Request

fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'BACKGROUND_REPLACER',
model: 'clipdrop',
promptObject: {
imageUrl: 'development/images/2025_02_16_14_29_17_570_banana.jpg',
prompt: 'Change the background to pink'
}
})
})

Responses

Success Response (200)

Successful response contains the generated image with replaced background.

{}