Face Swap API
activeAI-powered face swapping tool. Replace faces in images with natural-looking results.
Quick Start
Send a request to the Face Swap API:
| 1 | curl -X POST https://apiin.one/api/v1/images/tools/face-swap \ |
| 2 | -H "Authorization: Bearer YOUR_API_KEY" \ |
| 3 | -H "Content-Type: application/json" \ |
| 4 | -d '{ |
| 5 | "model": "face-swap", |
| 6 | "image": "https://example.com/target-photo.jpg", |
| 7 | "face_image": "https://example.com/source-face.jpg", |
| 8 | "target_index": 0, |
| 9 | "output_format": "png" |
| 10 | }' |
API Endpoint
/api/v1/images/tools/face-swapSend a POST request with your API key to generate content using Face Swap.
Headers
Bearer YOUR_API_KEY
application/json
Body Parameters
Model identifier: face-swap
URL of the target image (the body/scene to modify)
URL of the source face image (the face to swap in)
Face index in target image if multiple faces (0–10) Defaults to 0.
Output format: png, jpg, or webp Defaults to png.
Example Request
| 1 | { |
| 2 | "model": "face-swap", |
| 3 | "image": "https://example.com/target-photo.jpg", |
| 4 | "face_image": "https://example.com/source-face.jpg", |
| 5 | "target_index": 0, |
| 6 | "output_format": "png" |
| 7 | } |
Example Response
Successful task creation response.
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "n33xxxx_faceswap", |
| 6 | "status": "IN_PROGRESS" |
| 7 | } |
| 8 | } |
Check Task Status
For asynchronous tasks, poll the status endpoint to check when your task is complete:
/api/v1/tasks/{task_id}Returns the current status of a generation task. Poll until status is 'completed' or 'failed'.
| 1 | curl https://apiin.one/api/v1/tasks/task_abc123 \ |
| 2 | -H "Authorization: Bearer aio_your_key" |
Use Cases
- ✓Create personalized marketing imagery
- ✓Build virtual try-on features for e-commerce
- ✓Generate personalized content at scale
- ✓Integrate face swap into photo editing apps
API Tester
Test the Face Swap API directly from your browser:
Error Codes
| 1 | { |
| 2 | "error": { |
| 3 | "code": 400, |
| 4 | "message": "Invalid parameters", |
| 5 | "type": "invalid_request" |
| 6 | } |
| 7 | } |
Frequently Asked Questions
How much does Face Swap cost?
Only 3 credits per swap (~$0.006). One of the cheapest tools available.
How natural are the results?
The AI produces seamless results with proper lighting, skin tone, and angle matching.
Why Use Face Swap Through API in One?
Ready to use Face Swap?
Get Your API Key →