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

Segment image by prompt

POST
https://api.sellerpic.ai/v1/api/generate/promptSegmentation
Before creating a task, please ensure all required resources have been uploaded.
1.
Request Upload File URL
2.
Upload File
Upload file limit:
Supported formats: JPG/JPEG/PNG/WEBP (no animations)
Max file size: 10MB
Max image resolution: 4096px
1-original.pngProduct Image
Credit Cost
This task requires 0 credits.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.sellerpic.ai/v1/api/generate/promptSegmentation' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "imageKey": "string",
    "prompt": "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
imageKey
string 
required
Image storage key
prompt
string 
required
Segmentation prompt (specifies the part of the image to segment, e.g., 'cup')
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
Background Replacer
Next
Get Upload URL
Built with