--- 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) ```bash docker-compose up --build ``` The API will be available at `http://localhost:8000` See [API Documentation](api/README.md) 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 image - `POST /api/target-video` - Upload target video - `POST /api/face-swap` - Start face swap processing - `GET /api/job/{job_id}` - Get job status - `GET /api/result-video/{result_video_id}` - Download result video - `GET /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