Real-time Face Swap API Documentation
Parameter | Value | Description |
---|---|---|
Content-Type | application/json | Request content type |
Parameter | Type | Description |
---|---|---|
clientId | String | Client ID |
clientSecret | String | Client secret |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer token | API key for request authorization |
Content-Type | application/json | Request content type |
Parameter | Type | Description |
---|---|---|
single_face | Boolean | Whether to detect single face only |
image_url | String | Image URL for face detection |
img | String | Base64 encoded image (optional) |
Parameter | Type | Description |
---|---|---|
error_code | int | Error code (0: success) |
error_msg | String | Error message |
landmarks | Array | Facial landmarks coordinates array |
landmarks_str | Array | Facial landmarks coordinates string array |
region | Array | Face region coordinates |
seconds | float | Processing time in seconds |
trx_id | String | Transaction ID |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer token | API key for request authorization |
Content-Type | application/json | Request content type |
Parameter | Type | Description |
---|---|---|
sourceImage | Array | Source image information array, each element contains path and opts properties |
Parameter | Type | Description |
---|---|---|
code | int | API response business status code (1000: success) |
msg | String | API response status information |
data | Object | Response data object |
faceswap_status
:
Parameter | Value | Description |
---|---|---|
Authorization | Bearer token | API key for request authorization |
Content-Type | application/json | Request content type |
Parameter | Type | Description |
---|---|---|
_id | String | Session ID |
sourceImage | Array | Source image information array, each element contains path and opts properties |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer token | API key for request authorization |
Content-Type | application/json | Request content type |
Parameter | Type | Description |
---|---|---|
_id | String | Session ID |
Note: If thecode
value in the response is not1000
, the request has failed or is incorrect.
Parameter | Value | Description |
---|---|---|
code | 1000 | Success |
code | 1003 | Parameter error or parameter cannot be empty |
code | 1101 | Invalid authorization or the request token has expired |
code | 1102 | Authorization cannot be empty |
code | 1104 | Insufficient quota |
faceswap_status
statuschannel_id
, front_user_id
, and front_rtc_token
correspond to the Channel, User ID, and Token input fields on the page respectively.
These parameters can be obtained after creating a session through the Live Face Swap API. After filling them in, you can experience push/pull streaming and real-time face swap effects.
music_standard
encoder for better audio quality