Choosing a face swap API depends more on billing, video support, and job handling than on one polished demo. WaveSpeedAI is the cleanest starting point for predictable image or video calls; Segmind offers more controls; Replicate offers more model choice.
The shortlist in one decision table
| API route | Best fit | Published pricing signal | Video | Useful controls | Main catch |
|---|---|---|---|---|---|
| WaveSpeedAI | A simple hosted image/video integration | Image face swap: $0.01/run; video: $0.01/billed second, 3-second minimum | Yes | Target selection, target gender; async prediction flow | Verify current model-specific limits and retention |
| Segmind FaceSwap v4 | Teams that want face/head modes and sync or async requests | Estimated about $0.15/run cost-efficient or $0.60 fast | No video endpoint shown in the reviewed FaceSwap v4 docs | Face vs. head, seed, base64, output format, hardware mode | GPU-second billing makes the final cost variable |
| Replicate face-swap collection | Developers comparing several public models | Model-dependent; examples range from about $0.00022 to $0.012 per image run | Some models support video | Model choice and standard prediction API | There is no single official Replicate face-swap product or universal price |
Prices are public-page snapshots checked September 27, 2026. Replicate’s figures are model-page estimates, not guaranteed rates; Segmind’s per-generation figures are estimates derived from GPU-time billing.
First decide what “face swap API” means for your product
A dedicated API exposes one provider’s contract, price unit, and job lifecycle. A marketplace such as Replicate standardizes model execution, but each author controls inputs, outputs, hardware, and estimated cost; therefore, “Replicate pricing” is not one meaningful number.
Before comparing visual quality, check these five contract details:
- Media unit: image-only, video, GIF, or live processing.
- Completion model: synchronous response, polling, webhook, or several options.
- Face selection: largest detected face, an index, explicit coordinates, or one source-to-one target mapping.
- Billing unit: per image, per second, per GPU-second, or model runtime.
- Result handling: URL lifetime, download requirements, and deletion policy.
Those details decide whether an API fits your application. A consumer tool may look convincing while exposing no developer contract. In a real-user Reddit thread, the requester rejected recommendations that did not offer an API and described tested outputs as a blended identity rather than a strong replacement.
Three face swap API routes worth considering
WaveSpeedAI: the simplest cost-per-output path
WaveSpeedAI’s image face-swap documentation describes a REST prediction flow with source and target image inputs, a prediction ID, and status polling. The published image price is $0.01 per run. Its video face-swap documentation adds a video input and reference face image, with target_index and target_gender parameters for target selection.
The video price is $0.01 per billed second with a three-second minimum. A five-second job starts near $0.05 and a 60-second job near $0.60 before account adjustments. WaveSpeedAI’s pricing API can calculate input-specific pricing before submission.
Choose WaveSpeedAI for a small, understandable integration: submit media, persist the prediction ID, poll, and download. Test real poses and occlusions because the unit price says nothing about identity preservation.
Segmind FaceSwap v4: controls and GPU-time billing
Segmind FaceSwap v4 accepts source_image and target_image and supports both face and head swapping through swap_type. The API offers synchronous and asynchronous routes, a seed parameter, JPEG/PNG/WEBP output, and an optional base64 response. A Python SDK is documented alongside the HTTP API.
Segmind lists about $0.0015 per GPU-second for Cost Efficient, estimated at $0.15 per generation, and $0.0072 per GPU-second for Fast, estimated at $0.60. Final charges follow runtime, so a flat per-image comparison is incomplete. Segmind’s billing documentation says failed requests are not charged; synchronous responses expose x-cost, while async metrics expose cost.
Choose Segmind when face-versus-head mode, reproducible seeds, or hardware choice matters more than a fixed per-image budget.
Replicate: the model marketplace route
Replicate’s face-swap collection groups models from different authors. The collection is not one face-swap endpoint with one quality level. The reviewed model pages included an image model estimated at about $0.00022 per run, another at about $0.0064, and another at about $0.012. A video model was listed at about $0.14 per run. Actual charges vary with runtime and inputs.
Replicate enables multi-model testing without provisioning a GPU, but each model requires separate checks for maintenance, licensing, inputs, outputs, and commercial use. Use it for prototyping when your team can pin and monitor a model version; use a dedicated provider for simpler forecasting and support.
A production-safe request pattern
Regardless of provider, the integration should be a job system rather than a blocking web request:
- Keep the API key on your server or serverless backend.
- Validate that the source and target media are accessible and within documented limits.
- Submit exactly one job and persist its task or prediction ID immediately.
- Poll with bounded exponential backoff, or use a documented webhook when available.
- Stop on a terminal state; do not resubmit just because a local timeout expired.
- Download the result into storage you control before the provider URL expires.
- Record provider, model/version, input metadata, cost, status, and failure reason.
Here is a minimal Segmind-style Python example using the documented synchronous endpoint. It demonstrates the request shape without placing a secret in browser code:
import os
import requests
url = "https://api.segmind.com/v1/faceswap-v4"
headers = {"x-api-key": os.environ["SEGMIND_API_KEY"]}
payload = {
"source_image": "https://example.com/source-face.jpg",
"target_image": "https://example.com/target-photo.jpg",
"swap_type": "face",
"output_format": "jpg",
}
response = requests.post(url, headers=headers, json=payload, timeout=90)
response.raise_for_status()
result = response.json()
print(result)
For a long-running video request or an async model, replace the final print with ID persistence and polling. Do not hard-code a result field until you have read that provider’s current response schema; marketplaces often expose different fields between models.
What the docs do not settle: quality, failures, and data
Public API pages are good at documenting fields and weak at answering whether a swap stays convincing across real inputs. Build a small acceptance set before choosing a provider:
- One well-lit, front-facing portrait.
- One three-quarter view.
- One low-light image.
- One face partly covered by glasses, hair, or a hand.
- One short video with head movement.
- One group image if your product needs face selection.
Score identity preservation, edge blending, expression, lighting consistency, and failure behavior separately. A blended result should be a failure for an identity-replacement feature even if the image is technically sharp.
A real-user report illustrates why stability belongs in the acceptance test, although it is not a benchmark of the three providers compared here:
“It only worked for a few seconds and then it stopped.” — u/willows80 in r/FaceFusion
Also check the provider’s policy pages for retention, deletion, consent, prohibited use, and commercial rights. Face images are identity-sensitive data even when a provider calls them ordinary media. Your application should obtain permission for every uploaded likeness, keep an audit record, and block impersonation, harassment, and fraud use cases. Add moderation before submission, not only after an output is generated.
FAQ: face swap API integration
Does a face swap API support video?
Yes, but not universally: WaveSpeedAI has a billed-per-second video endpoint, Replicate lists video-capable models, and Segmind FaceSwap v4’s reviewed contract is image-focused.
Is Replicate cheaper than a dedicated API?
Possibly, but Replicate has no universal price; compare completed outputs and actual charges for the same test set.
Should API calls come from the browser?
No. Keep the secret in a protected backend, submit media from there, and return your own job ID to the client. Browser-side keys can be copied and used against your account.
How should I test face swap quality?
Use the same source and target set across providers and score identity preservation, blending, pose, lighting, occlusion, latency, and terminal failure states. Include difficult inputs; a single front-facing portrait is not a production test.
What consent checks belong in the workflow?
Require the uploader to confirm permission for every face and the intended use, then retain that consent record with the job. Apply provider terms and local likeness, privacy, and deepfake rules before storing or publishing the result.
The practical choice
Pick WaveSpeedAI for straightforward image and video pricing, Segmind for face/head controls and hardware choice, or Replicate for model discovery. Before production, run one shared acceptance set through two candidates and compare completed-job cost, identity preservation, and failure rate.