Face Swap avatar

Face Swap

Pricing

$2.50/month + usage

Go to Apify Store
Face Swap

Face Swap

Swap faces between images using advanced AI deep learning for natural, high-resolution results. Ideal for dev teams, automated workflows, creators, influencers, and marketers.

Pricing

$2.50/month + usage

Rating

5.0

(2)

Developer

Akash Kumar Naik

Akash Kumar Naik

Maintained by Community

Actor stats

2

Bookmarked

44

Total users

3

Monthly active users

5 days ago

Last modified

Share

AI Face Swap

Swap faces between two images using AI-powered deep learning technology. Simply provide a source image (the face you want to use) and a target image (where you want the face to appear), and get a realistic face-swapped result in seconds.

What does AI Face Swap do?

AI Face Swap uses InsightFace deep learning models to detect faces in both source and target images, then seamlessly swaps the face from the source onto the target. The Actor handles everything: image downloading from URLs, face detection, face swapping, and result delivery.

No coding required - Just paste two image URLs
Cloud storage support - Works with Google Drive, Dropbox, OneDrive, and more
High-quality output - Choose PNG for lossless quality or JPEG for smaller files
Fast processing - Results in 10-30 seconds on average

What can this AI Face Swap do?

This Actor is perfect for:

  • 🎨 Content creators - Generate engaging social media content and thumbnails
  • 📈 Marketers - Create personalized ads and creative campaigns
  • 🎬 Entertainment - Produce memes, fun photos, and creative projects
  • 🖼️ Digital artists - Experiment with face manipulation in artwork

Platform advantages:

  • API access for automation and integration
  • Scheduling for batch processing
  • Webhook support for async workflows
  • SDK support for JavaScript and Python

How much does AI Face Swap cost?

This Actor uses pay-per-event pricing:

EventPrice
Successful face swap result$0.025

You only pay when a face swap completes successfully. Failed operations are not charged.

Cost examples:

  • 10 face swaps = $0.25
  • 100 face swaps = $2.50
  • 1,000 face swaps = $25.00

Platform usage costs (compute units) may apply. The Actor requires minimum 1GB RAM and processes most images within 30 seconds.

How to use AI Face Swap

Using this Actor is simple:

  1. Prepare your images - Get the URLs for your source face and target image
  2. Enter the URLs - Paste the source URL (face to use) and target URL (image to modify)
  3. Select format - Choose PNG for quality or JPEG for smaller files
  4. Run the Actor - Click Start and wait for processing
  5. Download result - Get your face-swapped image from the Output tab

Via Apify Console

The easiest way is to use the web interface. Just fill in the two URL fields and click Start.

Via API

curl -X POST https://api.apify.com/v2/acts/akash9078~ai-face-swap/runs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-d '{
"sourceUrl": "https://example.com/source-face.jpg",
"targetUrl": "https://example.com/target-image.jpg",
"outputFormat": "PNG"
}'

Via JavaScript/Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('akash9078/ai-face-swap').call({
sourceUrl: 'https://example.com/source-face.jpg',
targetUrl: 'https://example.com/target-image.jpg',
outputFormat: 'PNG'
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log('Result URL:', items[0].resultUrl);

Via Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("akash9078/ai-face-swap").call(
run_input={
"sourceUrl": "https://example.com/source-face.jpg",
"targetUrl": "https://example.com/target-image.jpg",
"outputFormat": "PNG"
}
)
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(f"Result URL: {items[0]['resultUrl']}")

Input

The Actor accepts the following input parameters:

FieldTypeRequiredDefaultDescription
sourceUrlstringYes-URL of the image containing the face to use for swapping
targetUrlstringYes-URL of the image where the face will be swapped
outputFormatstringNoPNGOutput format: PNG (lossless) or JPEG (smaller)

Input Example

{
"sourceUrl": "https://example.com/source-face.jpg",
"targetUrl": "https://example.com/target-image.jpg",
"outputFormat": "PNG"
}

Output

The Actor outputs results to the dataset with these fields:

FieldTypeDescription
successbooleanWhether the face swap completed successfully
sourceUrlstringURL of the source image
targetUrlstringURL of the target image
processingTimenumberTotal processing time in seconds
fileSizenumberSize of the output file in bytes
outputFormatstringOutput image format
resultUrlstringDownload URL for the result image
timestampnumberUnix timestamp of completion

Output Example

{
"success": true,
"sourceUrl": "https://example.com/source-face.jpg",
"targetUrl": "https://example.com/target-image.jpg",
"processingTime": 12.5,
"fileSize": 245760,
"outputFormat": "PNG",
"resultUrl": "https://api.apify.com/v2/key-value-stores/abc123/records/result.png",
"timestamp": 1700000000
}

The result image is also available in the key-value store for direct download.

Supported image sources

The Actor automatically converts sharing links to direct download URLs:

  • ✅ Direct HTTP/HTTPS URLs
  • ✅ Google Drive (sharing links)
  • ✅ Dropbox (sharing links)
  • ✅ OneDrive (sharing links)
  • ✅ iCloud Drive
  • ✅ Box
  • ✅ MediaFire

Technical specifications

SpecificationValue
AI ModelInsightFace buffalo_l + inswapper_128
Max Image Size15MB per image
Max Resolution2048px (larger auto-resized)
Supported FormatsJPEG, PNG, WebP
Min Memory1GB RAM
Processing Time10-30 seconds average

Limitations

  • Requires clear, visible faces in both images
  • Best results with front-facing, well-lit faces
  • Extreme angles or obstructed faces may not be detected
  • Processes the largest detected face in each image

Tips for best results

💡 Use high-quality source images - Clear, well-lit faces produce better swaps
💡 Match lighting when possible - Similar lighting between source and target improves realism
💡 Front-facing faces work best - Extreme angles reduce quality
💡 PNG for quality, JPEG for size - Choose based on your needs

FAQ

What if no face is detected?

The Actor returns success: false with an error message. Ensure both images contain clearly visible, front-facing faces.

Can I swap multiple faces?

The Actor processes the largest detected face in each image. For multiple face swaps, run the Actor multiple times with different source images.

What image quality should I use?

Higher quality source images produce better results. Use PNG output to preserve quality, or JPEG for smaller file sizes.

How long does processing take?

Most images process in 10-30 seconds. Larger images or complex faces may take longer.

Is there a free trial?

Yes! You can try the Actor with the Apify free plan. Check the Apify pricing page for current free tier limits.

Can I use this via API?

Absolutely! The Actor supports full API access with JSON responses, webhooks, and SDK integration for JavaScript and Python.

Need help?

If you encounter issues:

  1. Verify your image URLs are publicly accessible
  2. Ensure images contain clearly visible faces
  3. Try PNG format for best quality
  4. Check the Actor logs for detailed error messages

For feature requests or bug reports, use the Issues tab on the Actor page. We're responsive to feedback and continuously improving the Actor.