Face Swap API for Developers

Face Swap API

Integrate AI face swap into your app in minutes. Swap faces in photos, videos, and GIFs with a simple REST API. SDKs for Python, Node.js, Go, and Rust.

Free credits on signup
Transparent per-credit pricing
No watermarks with paid plans or credit packs
Subscriptions, credit packs, or usage-based billing
Auto-scaling
Iron Man
Film Noir
Home Drama
Action Thriller
Sunset Romance
Horror Moment
Office Western

Trusted by teams at

Everything You Need to Ship Face Swap

One API for photos, videos, and GIFs. Fully managed infrastructure, multi-language SDKs, and commercial-ready outputs.

Photo Face Swap
Swap faces in any photo with a single API call. Supports JPG, PNG, and WebP with automatic face detection and natural blending.
Video Face Swap
Process full videos frame-by-frame. Handles motion, angles, and lighting changes. Trim to specific segments with start/end timestamps.
Multi-Face Swap
Detect and swap multiple faces in one request. Map each face to a different identity or apply the same face to all.
Fast Processing
Photos in 1–5 seconds. Videos optimized for speed with async processing and webhook notifications on completion.
Auto-Scaling Infrastructure
Scales compute to match demand — handles traffic spikes automatically. Scales to zero when idle. No GPU provisioning.
Commercial-Ready
Paid subscriptions and credit-pack purchases support non-watermarked outputs with commercial licensing. Suitable for marketing, SaaS products, entertainment apps, and client work.

Integrate in 3 Steps

From zero to face-swapping in production — no GPU setup; no model deployment; no infrastructure headaches.

1
Get Your API Key
Sign up free and generate an API key from the Developer dashboard. You get free credits to start.
2
Make Your First Request
Install an SDK or call the REST API directly. Send a face image and original photo/video to the face swap endpoint.
3
Get Results & Scale
Save the returned project ID, wait for completion using polling or webhooks, then download the finished result.
Get Started Free

Loading Face Swap example…

Estimate Your API Costs

Choose your settings and volume to estimate the credits and cost.

API Calculator

How will you use the API?
For projects with recurring generation needs.
≈ 100 videos of 5 seconds each
Estimated monthly usage

12,000 Credits

≈ 100 videos (5 sec each) · $0.0380/sec
Based on your selected model, resolution, and usage volume. Rate assumes you use all included credits.
Best plan for your usage

Creator

For social content and everyday creation
$19
/ month
Billed monthly
-37%
$19
$12
/ month · $144 billed yearly
Save $84 compared to monthly
12,000 credits per month
Up to 8.3 min of video
Up to 2,400 images
OR
All payment options
Estimates in USD. Final price and currency shown at checkout.

Face Swap API Pricing

Subscription plans for standard usage.

Need usage-based billing?

Email us or message us in Intercom for monthly billing with graduated volume discounts.

Built for Builders

See how developers use the Face Swap API to power real products.

Social & Entertainment Apps
Add face swap features to social platforms, meme generators, dating apps, and entertainment products. Drive engagement and virality with personalized content.
E-Commerce & Virtual Try-On
Let customers see themselves wearing products. Swap faces onto model photos for personalized shopping experiences that increase conversion.
Marketing & Ad Personalization
Create localized ad variations at scale. Swap talent faces for different markets, generate UGC-style content, and A/B test creative without reshoots.
Content Creation Platforms
Power video editing tools, thumbnail generators, and content automation workflows. Let creators produce more variants without manual editing.
Gaming & Avatars
Generate personalized game characters, avatars, and in-game content by swapping player faces onto character models.
Education & Training
Create personalized training videos, educational content with character customization, and interactive learning materials.
Try before integrating

Try Face Swap Free — No Code Required

Test quality first with the free tool, then plug the same output quality into your app with the API when you are ready.

Face Swap API — Frequently Asked Questions

Magic Hour's Face Swap API is a RESTful API that lets developers integrate AI-powered face swapping into any application. It supports photo, video, and GIF face swaps with realistic results. You authenticate with an API key and make simple HTTP requests — or use our official SDKs for Python, Node.js, Go, and Rust.

The Face Swap API supports photos (JPG, PNG, WebP), videos (MP4, MOV), and GIFs. For video, you can specify start and end timestamps to process specific segments. Multi-face detection and swapping is supported across all formats.

Sign up at magichour.ai, navigate to the Developer page to generate your API key, and start making requests. You get free credits on signup to test the API. Install an SDK (pip install magic-hour, npm install magic-hour, etc.) or call the REST endpoints directly. Full documentation and code examples are available at docs.magichour.ai.

Magic Hour offers subscription plans starting at $19/month (Creator), $39/month (Pro), and $99/month (Business), each including a monthly credit allotment. For video face swap, a 10-second result at 24 fps uses 240 credits. On Creator monthly, that works out to about $0.38 per video if you use all the included credits. One-time credit packs add credits without a subscription. Usage-based billing with graduated volume discounts is available by request. A free tier with credits is available on signup — no credit card required.

Magic Hour provides official SDKs for Python, Node.js (TypeScript), Go, and Rust. All SDKs are open source on GitHub and support the full API surface including face swap, image-to-video, text-to-video, animation, and more. You can also call the REST API directly from any language that supports HTTP.

Yes. For different replacements, detect target faces first, then use individual-faces with up to five face_mappings. Pair each detected path with an uploaded portrait. all-faces applies one portrait to every detected face.

Photo face swaps typically complete in 1–5 seconds. Video processing time depends on duration and resolution but is optimized for speed. The API is asynchronous for video — you submit a job and poll for completion or receive a webhook callback when done.

Yes. Magic Hour's infrastructure scales compute up automatically to handle demand spikes, with no API rate limits or concurrency limits. When you have zero traffic, it scales to zero, so you do not pay for idle GPUs.

Paid API plans and credit-pack purchases support non-watermarked outputs. Free or trial usage may include watermarks depending on plan settings, so teams usually purchase a plan or credit pack for production and commercial delivery.

Uploaded inputs and generated outputs have different storage rules. In our API docs, open Integration, then Handling Inputs and Outputs for current guidance. If an output is still available but its download URL has expired, retrieve the existing image or video project again to get a fresh URL without creating another generation.

Yes. Magic Hour offers a free face swap tool at magichour.ai/products/face-swap where you can test the quality with your own photos and videos — no sign up required. Once you're satisfied with the results, integrate the same technology via the API.

Magic Hour is the only face swap API backed by a full consumer product with millions of users, proving the technology works at scale. Key differentiators: (1) free try-before-you-buy via the web tool, (2) SDKs in 4 languages, (3) photo + video + GIF in one API, (4) fully managed infrastructure with auto-scaling, (5) Y Combinator-backed company with dedicated support.

Sign up at magichour.ai/developer — no credit card required. You'll receive free credits and an API key immediately. The key works across all Magic Hour API endpoints including Face Swap. Start making API calls in minutes using our Python, Node.js, Go, or Rust SDKs.

New accounts get free credits to test supported free-tier API endpoints. Some models and resolutions require a paid plan; check the current endpoint page and pricing before integrating.

Start Building with the Magic Hour Face Swap API

Free credits on signup. SDKs for Python, Node.js, Go, and Rust. Production-ready in minutes.