Amigo AIAmigo AI
Back to Home

Face Swap SDK for Video Call Apps

Amigo AI SDK adds real-time face swap to iOS video call apps built on WebRTC or custom pipelines. The per-frame API takes a raw video frame and returns a face-swapped frame in under 33ms, fast enough for 30fps video conferencing. All processing happens on-device via CoreML — no frames are sent to a server, so call privacy is fully preserved. Works with Twilio, Daily, Vonage, LiveKit, or any SFU. $0.01 per session with 1,000 free per month.

How do I add face swap to a WebRTC video call?

Insert processFrame() between your local video capture and the WebRTC encoder. Each frame is swapped on-device before it reaches the peer connection.

WebRTCSwap.swift
import AmigoFaceSwapSDK
import WebRTC

// In your RTCVideoCapturer delegate:
func capturer(_ capturer: RTCVideoCapturer,
    didCapture frame: RTCVideoFrame) {
  guard let buffer = frame.buffer as? RTCCVPixelBuffer else { return }

  if let swapped = try? AmigoFaceSwap.processFrame(
    buffer.pixelBuffer, using: latent
  ) {
    // Send swapped frame to peer connection
    localVideoSource.capturer(capturer,
      didCapture: swapped.toRTCFrame())
  }
}

Why on-device face swap for video calls?

Video calls are latency-sensitive. Cloud-based face swap APIs add 100-500ms per frame — visible as lag or stutter to the other participant. They also require sending raw camera frames to a server, which is unacceptable for enterprise, healthcare, or legal video calls.

Amigo AI SDK processes each frame in under 33ms on the device GPU. No frames leave the device. The remote participant receives the swapped video with no additional latency beyond the per-frame processing time. Call quality and privacy are both preserved.

The processFrame() API is synchronous and designed for sustained 30fps use on a serial background queue. It works with any WebRTC stack where you can intercept the local capture buffer — Twilio, Daily, Vonage, LiveKit, or a raw libwebrtc integration.

What about call privacy?

All face detection and face swap processing happens on-device. No video frames, face embeddings, or biometric data are transmitted to any Amigo AI server. The only network call is the initial API key validation at initialize().

This architecture is critical for compliance-heavy industries. Healthcare apps (HIPAA), legal apps, and enterprise conferencing can use face swap without adding any new data processing agreements or privacy disclosures.

Frequently asked questions

Ready to add face swap to your app?

1,000 free sessions every month. No credit card required. $0.01/session after that. Integrate in minutes, not days.