AI Inpainting
Replace or repair a selected area of an image with a text prompt. The mask image is optional; without one, the provider selects the editable area.
curl -X POST \
"https://www.fashiondiffusion.ai/api/public/v1/ai-inpainting/tasks" \
-H "Authorization: Bearer fd_live_xxx" \
-H "Content-Type: application/json" \
--data-raw '{
"originalImageUrl": "https://cdn.example.com/source.jpg",
"prompt": "Replace the jacket with a black leather jacket",
"model": "standard",
"resolution": "2K",
"ratio": "auto"
}'// Base64 input (use imageBase64 instead of originalImageUrl)
{
"imageBase64": "data:image/png;base64,iVBORw0KGgo...",
"prompt": "Remove the selected object",
"model": "standard"
}| Parameter | Supported values | Default |
|---|---|---|
| model | standard, pro | standard |
| resolution | 2K, 4K | 2K |
| ratio | auto, 1:1, 3:4, 4:3, 9:16, 16:9 | auto |
Provide originalImageUrl (or imageBase64) and prompt. Base64 data URLs must be JPEG, PNG, or WebP and no larger than 20 MB. Choose model as standard or pro. Use referenceImages for optional reference images.
The response is 202 Accepted with the same task object used by Virtual Try-On. Poll the task endpoint below for outputs.