1. Create Task
  • Get Started
  • API Reference
    • Create Task
      • Image To Video
        POST
      • Instruct Edit
        POST
      • Try-On (Apparel)
        POST
      • Try-On (Accessories)
        POST
      • Lifestyle Scene
        POST
      • Swap Fashion Model
        POST
      • Background Replacer
        POST
      • Segment image by prompt
        POST
    • Get Upload URL
      GET
    • Upload File
      PUT
    • List Preset Materials
      GET
    • Retrieve Generation Task Status
      GET
    • Download Generated Result
      GET
    • Retrieve API Credit Usage
      GET
  • Help
    • Download File Samples
    • Error Codes
    • FAQ
  1. Create Task

Swap Fashion Model

POST
https://api.sellerpic.ai/v1/api/generate/swapModel
Before creating a task, please ensure all required resources have been uploaded.
1.
Request Upload File URL
2.
Upload File
How to get preset materials:
1.
Retrieve the preset model materials list (type: SWAP_MODEL) Retrieve Preset Model List
2.
Access the preset scene materials (type: SWAP_MODEL_SCENE) Retrieve Preset Scene List
Upload file limit:
Supported formats: JPG/JPEG/PNG/WEBP (no animations)
Max file size: 10MB
Max image resolution: 4096px
Mask Image: Must be black background and white subject, matching original dimensions
1-original (3).pngModel Image
0cf08a2a8724446d80569d9faf16054d_mask_output.pngModel Mask
Credit Cost
This task costs 4 credits, Since AI-generated content involves randomness, each request produces 4 images for selection, and each successful image costs 1 credit
Concurrency Limits: 10
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.sellerpic.ai/v1/api/generate/swapModel' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "modelImageKey": "string",
    "modelMaskKey": "string",
    "modelId": "string",
    "sceneId": "string",
    "expression": "string",
    "bodyType": "string"
}'
Response Response Example
200 - Example 1
{
  "code": 0,
  "data": {
    "id": "string"
  },
  "msg": "string",
  "success": true,
  "traceId": "string"
}

Request

Header Params
Authorization
string 
required
Example:
Bearer YOUR_API_KEY
Content-Type
string 
required
Example:
application/json
Body Params application/json
modelImageKey
string 
required
Original model image storage key
modelMaskKey
string 
optional
Original model mask image storage key
System will perform automatic masking if not provided. For best results, uploading a custom mask is recommended.
modelId
string 
required
Preset model ID (for type: SWAP_MODEL) Retrieve Preset Model List
sceneId
string 
optional
Preset Scene ID (for type: SWAP_MODEL_SCENE) Retrieve Preset Model List
expression
string 
optional
Facial expression, options: [SMILE, LAUGH]
bodyType
string 
optional
Body type, options: [SLIM, FAT]
Examples

Responses

🟢200OK
*/*
OK
Body
code
integer <int32>
required
Result code, where 0 indicates success and non-0 indicates an error.
Please refer to Error Codes
data
object (IdData«string») 
optional
id
string 
required
Task Id
msg
string 
optional
Description of the result, providing additional context or information about the operation outcome.
success
boolean 
required
traceId
string 
required
Trace ID for tracking the request across distributed systems.
🟢201Created
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
Previous
Lifestyle Scene
Next
Background Replacer
Built with