A2E
  1. Quickly Preview Face Swap
A2E
  • AI Avatar API
  • Get Tokens
    • Obtain Login Token
      POST
    • Get API token
      POST
    • Delete API token
      POST
    • List api tokens
      GET
    • Getting API Tokens (2025 version)
      GET
  • TTS and Voice Clone
    • List Public TTS Options
      POST
    • List Voice Clone Options
      GET
    • Train TTS Model of The User's Voice (Voice Clone)
      POST
    • List Ongoing Voice Clone Tasks
      GET
    • Generate TTS Audio (Text-to-Speech)
      POST
    • Get Details of a Voice
      GET
    • Delete a User Voice
      DELETE
  • Generate Avatar Videos
    • Generate AI Avatar Videos
      POST
    • List of Result Videos
      POST
    • List One or All Avatars
      POST
    • Obtain the Status of One Avatar Video Task
      POST
    • Obtain the List of Personalized Lip-Sync Models
      GET
    • Delete or Cancel a Video
      DELETE
    • Auto Language Detect
      POST
    • Auto Swith to Public Computing Pool
      POST
  • Create Avatars and Train Lip-sync Models
    • Create A Custom Avatar by a Video or an Image
    • Train a Personalized Lip-sync Model (Optional) a.k.a. Continue Training 💠
    • Remove A Customized Avatar
    • Get Status of All Tasks
    • Get All Ongoing "Training" Tasks
    • Status of One Task
    • Clone Voice from a Video
  • Background Matting and Replacement
    • Obtain the List of Background Images
    • Add Custom Background Image
    • Delete Custom Image
  • Face Swap
    • Manage Face Swap Resource
      • Add Face Swap Image
      • Get Records of Face Swap Images
      • Delete User Face Swap Image
    • Quickly Preview Face Swap
      • Add User Face Swap Preview
        POST
      • Get Status of Face Swap Preview Process
        GET
    • Face Swap Tasks
      • Add User Face Swap Task
      • Get Status of Face Swap Task
      • Get Face Swap Task Records
      • Get Details of Face Swap
      • Delete Record
  • AI Dubbing
    • Start dubbing
    • List Dubbing Tasks
    • List All Processing Dubbing Tasks
    • Get Details
    • Delete Record
  • Image to Video
    • Start Image-to-Video
    • Check Status of One Task
    • List Status of All Tasks
    • Delete Record
  • Caption Removal
    • Start Caption Removal
    • Get Records of All Tasks
    • Get Status of All Tasks in Processing
    • Get Details of One Task
    • Delete a Task
  • Streaming Avatar
    • Get All avatars
    • Get a Streaming Avatar Token
    • Set QA Context
    • Get QA Context
    • Ask a Question to the Avatar
    • Let the Avatar Speak Directly
    • Leave the Room
  • Miscellaneous
    • Add a User
    • Get User Remaining Credits
    • Exchange Diamonds
    • List Available Languages
    • Save URL to A2E's storage
  1. Quickly Preview Face Swap

Add User Face Swap Preview

Global Server
https://video.a2e.ai
Global Server
https://video.a2e.ai
POST
/api/v1/userFaceSwapPreview/add
This endpoint allows you to add a user face swap preview by providing the URL of the face and the video.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
face_url
string 
optional
The URL of the face to be swapped. Provide this or video_url.
video_url
string 
optional
The URL of the video for face swapping. Provide this or face_url.
Example
{
  "face_url": "https://dh24as48lv9ce.cloudfront.net/adam2eve/beta/face_swap/ab2fca41-90e5-41a6-aa66-08a960b035e4.jpg",
  "video_url": "https://dh24as48lv9ce.cloudfront.net/marvel/test_case/FS/b197b5a6-2ceb-46ff-b42f-d60e85ce1fea.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://video.a2e.ai/api/v1/userFaceSwapPreview/add' \
--header 'Content-Type: application/json' \
--data-raw '{
    "face_url":"https://dh24as48lv9ce.cloudfront.net/adam2eve/beta/face_swap/ab2fca41-90e5-41a6-aa66-08a960b035e4.jpg",
    "video_url":"https://dh24as48lv9ce.cloudfront.net/marvel/test_case/FS/b197b5a6-2ceb-46ff-b42f-d60e85ce1fea.jpeg"
}'

Responses

🟢200add
application/json
Body
code
integer 
required
data
object 
required
video_url
string 
required
The URL of the video
face_url
string 
required
The URL of the face
current_status
string 
required
The current status of the face swap process
result_url
string 
required
The URL of the resulting face swap
error_code
string 
optional
The error code, if any
faild_message
string 
optional
The failure message, if any
_id
string 
required
The ID of the preview
user_id
string 
required
The user ID associated with the data
Example
{
  "code": 0,
  "data": {
    "video_url": "https://dh24as48lv9ce.cloudfront.net/marvel/test_case/FS/b197b5a6-2ceb-46ff-b42f-d60e85ce1fea.jpeg",
    "face_url": "https://dh24as48lv9ce.cloudfront.net/adam2eve/beta/face_swap/ab2fca41-90e5-41a6-aa66-08a960b035e4.jpg",
    "current_status": "initialized",
    "result_url": "",
    "error_code": "",
    "faild_message": "",
    "_id": "6674f0380f25167e88672b7c",
    "createdAt": "2024-06-21T03:15:04.330Z",
    "updatedAt": "2024-06-21T03:15:04.330Z"
  }
}
Previous
Delete User Face Swap Image
Next
Get Status of Face Swap Preview Process
Built with