apihub
  1. generate
apihub
  • generate
    • Generate Liveportrait Video
      POST
    • Swap faces on image
      POST
    • Swap faces on video
      POST
    • Facesing
      POST
    • Image To Image
      POST
    • Text To Image
      POST
    • Identify stone
      POST
    • Identify bird
      POST
    • Identify insect
      POST
    • Identify plant
      POST
    • Identify mushroom
      POST
  • Get status
    • Get request status by request ID
      GET
    • Get credit balance
      GET
  • Schemas
    • Schemas
      • LivePortrait
      • GenerateResponse
      • RequestStatusResponse
      • RequestStatus
      • SwapFaceImage
      • Root Type for FacePairData
      • Root Type for CreditBalanceResponse
      • SwapFaceVideo
      • FaceSing
      • ImageToImage
      • TextToImage
      • Root Type for Identify
      • Root Type for Identify
      • Root Type for Identify
      • Root Type for Identify
      • Root Type for Identify
      • AIAvatar
  1. generate

Swap faces on image

POST
/generate/swap_face_image
Can swap one or more face has exist on image

Request

Authorization
Add parameter in header
apikey
Example:
apikey: ********************
Body Params application/json

Example
{
    "source_url": "https://apihub.today/sample-input/swap-face/source-input.jpg",
    "target_url": "https://apihub.today/sample-input/swap-face/target-input.jpg"
}

Request Code 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 '/generate/swap_face_image' \
--header 'apikey: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "source_url": "https://apihub.today/sample-input/swap-face/source-input.jpg",
    "target_url": "https://apihub.today/sample-input/swap-face/target-input.jpg"
}'

Responses

🟢200OK
application/json
Successful operation
Body

Example
{
    "success": true,
    "message": "string",
    "data": {
        "request_id": "string"
    }
}
Modified at 2025-02-04 01:28:25
Previous
Generate Liveportrait Video
Next
Swap faces on video
Built with