metadata
title: Video Face Swap API
emoji: π
colorFrom: pink
colorTo: indigo
sdk: docker
sdk_version: latest
app_file: api_server.py
pinned: false
disable_embedding: false
short_description: GPU-accelerated face swap video processing API
license: mit
Face Swap Video API
GPU-accelerated FastAPI backend for face swap video processing with MongoDB storage.
π Quick Start
Docker Deployment (Recommended)
docker-compose up --build
The API will be available at http://localhost:8000
See API Documentation for detailed usage and endpoints.
Features
- β GPU acceleration with CUDA support
- β Asynchronous face swap processing
- β MongoDB Atlas integration
- β RESTful API with Swagger documentation
- β Result video download URLs
- β Job status tracking
API Endpoints
POST /api/source-image- Upload source imagePOST /api/target-video- Upload target videoPOST /api/face-swap- Start face swap processingGET /api/job/{job_id}- Get job statusGET /api/result-video/{result_video_id}- Download result videoGET /docs- Interactive API documentation
Requirements
- Docker with NVIDIA GPU support (nvidia-docker2)
- MongoDB Atlas account (or local MongoDB)
- CUDA 12.1+ compatible GPU
License
MIT License - Based on DeepFakeAI/facefusion Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference