Amigo AI SDK lets video editing apps on iOS swap faces in recorded footage entirely on-device. Feed each video frame through the per-frame API and get a face-swapped result at 512px resolution. CoreML inference runs locally, so users never upload sensitive video to a server. The SDK handles detection, alignment, and blending in a single call. It processes at 30fps on modern iPhones. $0.01 per session with 1,000 free monthly.
Use AVAssetReader to extract frames from the video file, pass each frame through processFrame(), and write the result with AVAssetWriter. The pipeline runs entirely on-device.
VideoProcessor.swift
importAmigoFaceSwapSDKimportAVFoundationlet latent = try await AmigoFaceSwap.enrollFace(from: targetPhoto)
// Read frames from videowhile let sampleBuffer = readerOutput.copyNextSampleBuffer() {
guard let pixelBuffer = sampleBuffer.imageBuffer else { continue }
if let swapped = try AmigoFaceSwap.processFrame(
pixelBuffer, using: latent, lipMode: .innerLips
) {
writerInput.append(swapped) // Write to output
}
}
Why on-device face swap for video editing?
Cloud-based video face swap requires uploading the entire video file — slow on mobile networks, expensive in bandwidth, and a privacy risk. Users have to wait minutes for server-side processing.
With Amigo AI SDK, the video file stays on the phone. Processing happens in real-time using the device GPU. A 30-second clip at 30fps (900 frames) processes in about 30 seconds on iPhone 12 — real-time speed. Users see progress immediately, not an upload bar.
The FaceLatent embedding is reusable. Enroll a face once and apply it to multiple clips without re-enrollment. Users can swap to different faces by switching the latent at any point in the timeline.
Frequently asked questions
How do I add face swap to a video editing app on iOS?
Does the SDK process video files on-device?
Can users swap faces in already-recorded videos?
What video formats are supported?
How does LipMode work for video editing?
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.