マスク画像の内容に基づき、指定された領域をインテリジェントに塗りつぶしたり、画像を置き換えたりします。
Request
Body Params application/json
{
"prompt": "a photo of a cat",
"negative_prompt": "",
"image_url": "",
"mask_url": "",
"model_name": "diffusers/stable-diffusion-xl-1.0-inpainting-0.1"
}
Request Code Samples
curl --location --request POST 'https://api.302.ai/302/submit/inpaint' \
--header 'Accept: image/*' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "a photo of a cat",
"negative_prompt": "",
"image_url": "",
"mask_url": "",
"model_name": "diffusers/stable-diffusion-xl-1.0-inpainting-0.1"
}'
Responses
application/json {
"image": {
"url": "https://file.302.ai/gpt/imgs/20260113/e6efe49439f081c613ae6e113d8f3466.png",
"content_type": "image/png",
"file_size": 1436430,
"width": 1024,
"height": 1024
}
}
Modified at 2026-01-13 10:35:29