Img Open English
  1. image tool
Img Open English
  • AI image generation
    • sd text2image
      POST
    • sd Image to Image
      POST
    • sd controlnet
      POST
    • QueryModelList
      POST
    • QueryLoralList
      POST
    • QueryVaeList
      POST
    • queryEmbeddingList
      POST
  • task query
    • queryTaskInfoV1.0
      POST
    • queryTaskInfoV2.0
      POST
    • queryImageToolTaskInfo
      POST
  • train model
    • Submit training task
    • Training result query
  • image tool
    • Flux text2image
      POST
    • Single Face Swap V1.0
      POST
    • Single Face Swap V2.0
      POST
    • instantID
      POST
    • Face restoration
      POST
    • Super Resolution
      POST
    • image description
      POST
    • Multiple Face Swap
      POST
    • Face Detection
      POST
    • Prompt expansion
      POST
    • Hairstyle changer
      POST
    • Object Removal
      POST
    • Style recognition
      POST
    • Outpainting
      POST
    • CNT preview
      POST
    • background remove
      POST
    • image enlarge
      POST
    • image watermark
      POST
  1. image tool

Multiple Face Swap

POST
/AIGCImgOpenServ/saas/tool/face/fusion
Supports users to upload two original pictures and one target picture. The target picture is similar to a photo of two people. Based on this interface, the face of the original picture can be replaced into the target picture.

Request

Header Params
X-Request-req-accessKeyId
string 
optional
必填
Example:
accessKeyId
X-Request-req-accessKeySecret
string 
optional
必填
Example:
accessKeySecret
Body Params application/json
sourceUrl
array[string]
Source image
required
The image url address passed by the user to provide facial information
>= 1 items<= 2 items
targetUrl
string 
target image
required
The image url address passed by the user to accept facial information
faceIdx
integer 
optional
Used when changing one face among multiple faces
The faces in the source need to be replaced with the specific serial numbers of the multiple faces in the target.
The order of faces is from left to right according to their position in the image; if there are three faces in the tager image, the value range of face_idx is [1, 3]
businessTaskId
string 
required
callbackUrl
string 
optional
Some of the interfaces used to return drawing results from the server are asynchronous interfaces. Please check the remarks. Only when the json string code = 200 received in the response will we mark the request as successful, such as {"code":"200"} and the ladder interval to retry 3. , 5, 15, 30, 60, 600, 3600 seconds, retry up to 10 times
Example
{
    "businessTaskId": "10086996",
    "sourceUrl": ["https://aigcoss.zhiqiteai.cn/Output-Img2/zjy/pic3-1.png", "https://aigcoss.zhiqiteai.cn/Input-Img/superJ/8696fa0a-6dfc-4907-97fc-a4db0c24a04a.jpeg"],
    "targetUrl": "https://aigcoss.zhiqiteai.cn/Input-Img/superJ/151b18c7-7e2b-4313-8d21-65de676ef264.jpeg"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.zhiqite.com/AIGCImgOpenServ/saas/tool/face/fusion' \
--header 'X-Request-req-accessKeyId: accessKeyId' \
--header 'X-Request-req-accessKeySecret: accessKeySecret' \
--header 'Content-Type: application/json' \
--data-raw '{
    "businessTaskId": "10086996",
    "sourceUrl": ["https://aigcoss.zhiqiteai.cn/Output-Img2/zjy/pic3-1.png", "https://aigcoss.zhiqiteai.cn/Input-Img/superJ/8696fa0a-6dfc-4907-97fc-a4db0c24a04a.jpeg"],
    "targetUrl": "https://aigcoss.zhiqiteai.cn/Input-Img/superJ/151b18c7-7e2b-4313-8d21-65de676ef264.jpeg"
}'

Responses

🟢200成功
application/json
Body
code
string 
required
msg
string 
required
data
object 
required
taskId
string 
required
businessTaskId
string 
required
toolTask
string 
Task type
required
status
string 
Task status
required
outputImageUrl
string 
required
Example
{
    "code": "200",
    "msg": "success",
    "data": {
        "taskId": "pre1715827520336429778183",
        "businessTaskId": "10086996",
        "toolTask": "faceFusion",
        "status": 1,
        "outputImageUrl": "https://aigcoss.zhiqiteai.cn/Output-Img2/roop/pro1703734845555845969817.png"
    }
}
Modified at 2024-08-09 01:09:39
Previous
image description
Next
Face Detection
Built with