Skip to main content

Stable Image Core - Search and Replace

Search for objects in images and replace them using Stable Image Core AI model.

Endpoint

Request Body

The request must include the following parameters:

ParameterTypeRequiredDescription
typestringYesFeature type identifier. Must be SEARCH_AND_REPLACE
modelstringYesAI model identifier. Must be stable-image
promptObjectobjectYesFeature-specific parameters

Prompt Object Parameters

ParameterTypeRequiredDescription
imageUrlstringYesPath to the image
search_promptstringYesObject to search for
promptstringYesReplacement 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: 'SEARCH_AND_REPLACE',
model: 'stable-image',
promptObject: {
imageUrl: 'development/images/2025_02_16_15_00_19_886_banana.jpg',
search_prompt: 'banana',
prompt: "Let's turn the banana purple"
}
})
})

Responses

Success Response (200)

Successful response contains the generated image with objects searched and replaced.

{}