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:
Parameter | Type | Required | Description |
---|---|---|---|
type | string | Yes | Feature type identifier. Must be SEARCH_AND_REPLACE |
model | string | Yes | AI model identifier. Must be stable-image |
promptObject | object | Yes | Feature-specific parameters |
Prompt Object Parameters
Parameter | Type | Required | Description |
---|---|---|---|
imageUrl | string | Yes | Path to the image |
search_prompt | string | Yes | Object to search for |
prompt | string | Yes | Replacement description |
Example Request
- JavaScript
- cURL
- Python
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"
}
})
})
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"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"
}
}'
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"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"
}
}
response = requests.post(url, headers=headers, json=data)
Responses
Success Response (200)
Successful response contains the generated image with objects searched and replaced.
{}