jpg
|jpeg
|png
|webp
(no animations)10MB
4096px
Replace Type | Description | Required Parameters | Output Images | Credit Cost |
---|---|---|---|---|
AI_BACKGROUND | Replaces the background using a preset style Retrieve available styles (type: AI_BACKGROUND ) | presetBackgroundId - ID of selected background style | 4 | 4 |
TEXT_TO_BACKGROUND | Generates backgrounds based on text prompts | customBackgroundPrompt - Descriptive text input | 4 | 4 |
PRESET_BACKGROUND_IMAGE | Applies a predefined image as background Retrieve available images (type: BACKGROUND ) | presetBackgroundId - ID of preset background image | 1 | 1 |
CUSTOM_BACKGROUND_IMAGE | Uses user-uploaded image as background Upload Process: Upload Asset File | backgroundImageKey - Key of uploaded image | 1 | 1 |
SOLID_COLOR_BACKGROUND | Sets background using HEX color code (e.g. #80c699 ) | backgroundColor - Valid HEX color string | 1 | 1 |
curl --location --request POST 'https://api.sellerpic.ai/v1/api/generate/replaceBackground' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"replaceType": "AI_BACKGROUND",
"productImageKey": "UPLOAD/MANAGE/SAMPLE/product/1-original.png",
"presetBackgroundId": "1"
}'
{
"code": 0,
"data": {
"id": "string"
},
"msg": "string",
"success": true,
"traceId": "string"
}