Skip to main content

Stable Image - Image Mask Editor

Edit specific parts of images using masks and AI inpainting with Stable Image model.

Endpoint

Request Body

The request must include the following parameters:

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

Prompt Object Parameters

ParameterTypeRequiredDescription
imageUrlstringYesPath to the image
maskUrlstringYesPath to the mask image
promptstringYesDescription for inpainting
output_formatstringYesOutput format. Must be jpeg

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: 'IMAGE_INPAINTER',
model: 'stable-image',
promptObject: {
imageUrl: 'development/images/2025_02_16_15_35_49_260_banana.jpg',
maskUrl: 'development/images/2025_02_16_15_36_38_743_image.png',
prompt: 'replace a red banana',
output_format: 'jpeg'
}
})
})

Responses

Success Response (200)

Successful response contains the generated image with inpainted areas based on the mask.

{}