API for Swap One from Two Face Swapper
Authentication
An API key is required for all requests. You can generate an API key from the developers tab in your dashboard.
Header Attributes
| Parameter | Value |
|---|---|
| X-source | web |
| X-api-key | YOUR_API_KEY |
Swap One from Two
Request URL
| Method | URL |
|---|---|
| POST | http://aiapi.aiphotocraft.com/api/faceswap/swap1from2 (opens in a new tab) |
Body Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| srcimage | file | Source image for swap having 2 faces | Yes* |
| targetimage1 | file | First target image for swap having 1 face | Yes* |
| targetimage2 | file | Second target image for swap having 1 face | Yes* |
*Required parameters
Response
The API returns the processed image with two faces from the source image swapped with the faces from the two target images.
Response Content Type
application/json
Response Codes
| Code | Description |
|---|---|
| 201 | Swap successful |
| 400 | Bad request |
Example
curl -X POST \
http://aiapi.aiphotocraft.com/api/faceswap/swap1from2 \
-H 'X-source: web' \
-H 'X-api-key: YOUR_API_KEY' \
-F 'srcimage=@/path/to/source.jpg' \
-F 'targetimage1=@/path/to/target1.jpg' \
-F 'targetimage2=@/path/to/target2.jpg'