Integrate our API into your application, website, or workflow to quickly generate high-quality face swap images.
Just follow our documentation and you can use it quickly in a few minutes.
Log in to our website via Google Account.
Click the avatar in the upper right corner to open the API Manage page and create an API Key.
Check out the API documentation, and use the key to call the API we provide for face swapping.
Our API efficiently simplifies the developer's workflow and makes your product even better.
It only takes a few minutes to quickly integrate the API into your product.
No need to wait for a long time. It only takes about 3 seconds to generate a picture.
Uses the top large model. Has a delicate and perfect face-swapping effect.
Private and secure, visible only to you.
Comprehensive documentation for the faceswapai.com API.
All API requests require authentication. You need to include your API key in the headers of your request.
// Example: Including API key in headers X-API-Key: YOUR_API_KEY
All API endpoints are relative to the base URL:
https://api.faceswapai.com/v1
This endpoint swaps faces in images.
Parameter | Type | Required | Description |
---|---|---|---|
source_image | file or base64 | Yes | The image containing the face to swap from. |
target_image | file or base64 | Yes | The image containing the face to swap to. |
swap_mode | string | No | Mode of face swapping. Options: 'single', 'multiple'. Default: 'single'. |
curl -X POST \ https://api.faceswapai.com/v1/face-swap \ -H 'X-API-Key: YOUR_API_KEY' \ -H 'Content-Type: multipart/form-data' \ -F 'source_image=@/path/to/source.jpg' \ -F 'target_image=@/path/to/target.jpg'
Status Code | Description |
---|---|
200 | Successful operation |
400 | Invalid parameters |
401 | Unauthorized (Invalid API key) |
{ "status": "success", "result": { "image": "base64_encoded_image_data...", "processing_time": "2.5s" } }
This endpoint swaps faces in videos.
Parameter | Type | Required | Description |
---|---|---|---|
source_image | file or base64 | Yes | The image containing the face to swap from. |
target_video | file or url | Yes | The video containing the face to swap to. |
face_index | integer | No | Index of the face to swap in the target video. Default: 0 (main face). |
Got a question? We've got answers. If you have some other questions, see our support center.
Our API is available to all registered users. You need to create an account and generate an API key to start using it. Different subscription plans offer varying levels of API access and usage limits.
The API supports all the core features available on our website, including single face swap, multiple face swap, video face swap, and batch processing. Check the documentation for the complete list of endpoints and capabilities.
Yes, API calls consume credits just like using the web interface. The credit consumption follows the same rules - for example, single face swaps cost 1 credit, video face swaps are calculated based on duration and number of faces.
We offer comprehensive documentation and code examples in multiple programming languages to make integration easy. Additionally, we provide SDKs for popular languages like JavaScript, Python, and PHP to simplify the integration process even further.
Yes, we take security and privacy seriously. All API communications are encrypted using HTTPS. We do not store your images or videos beyond the processing time needed. Your API key is also secured and you can revoke it at any time. We adhere to strict data protection guidelines and do not share your data with third parties.
Get started with faceswapai.com API in minutes and offer your users amazing face swap capabilities.