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

Instruct Edit

POST
https://api.sellerpic.ai/v1/api/generate/instructEdit
Before creating a task, please ensure all required resources have been uploaded.
1.
Request Upload File URL
2.
Upload File
Upload file limit:
Max file size: 2K
Credit Cost
This task costs 1 credit.
Concurrency Limits: 5
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.sellerpic.ai/v1/api/generate/instructEdit' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "imageKey": "string",
    "prompt": "string",
    "refImageKey": "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
Primary image storage key (required)
prompt
string 
required
Text instruction for image editing (required)
refImageKey
string 
optional
Reference image storage key (optional)
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
Image To Video
Next
Try-On (Apparel)
Built with