Linux
Faceplugin Face Liveness API for Linux Docker. On-premise anti-spoofing PAD. POST /api/liveness on port 8084. Score 0.5 or higher is Real.
Fully on-premise Face Liveness HTTP API for Linux / Docker. Image: faceplugin/face-liveness. Default port 8084.
Score one RGB JPEG. Score ≥ 0.5 → Real / pass true. Score < 0.5 → Spoof / pass false.
Need recognition as well? Run Face Recognition Linux SDK on port 8083 as a second container.
All processing stays on your server. No biometric data is sent to Faceplugin cloud.
Code
Setup
Sizing: Hosting requirements.
Run multiple containers with one license
You only need this section if you want to run multiple Face Liveness containers on the same Linux host.
On Linux, mount /etc/machine-id into each container so they use the same machine code. Each container must have a different container name and host port.
For example:
Activate each container with the same license key (POST /api/activate on each host port).
On Docker Desktop (macOS/Windows), omit the /etc/machine-id volume. Each container may require its own license.
Other ways to run
Option B — Docker Compose (local build)
Put the Google Drive runtime files directly in lib/cpu/, then:
Option C — Native Linux (no Docker)
Same lib/cpu/ layout:
Default port 8084. Gradio demo (demo.py) on 9004 (host only). The Docker Hub image is API-only.
POST /api/check_liveness is an alias of /api/liveness.
License
Licenses are offline. Request a License & Support.
APIs
GET /api/health
Process is listening (no license)
GET /api/machinecode
Machine code
GET /api/licenseStatus
License status
GET /api/backend
"cpu"
POST /api/activate
Activate and init_sdk()
POST /api/liveness
Passive face anti-spoofing
POST /api/check_liveness
Alias of /api/liveness
Full reference: Face Liveness HTTP API. Shared control routes: Shared endpoints.
Some routes wrap the result in a small JSON object (an envelope). POST /api/liveness returns engine JSON as the body. Score ≥ 0.5 → Real / pass true.
Python:
Try it
Postman: import postman/FaceLiveness-API.postman_collection.json from the repo. Base URL http://127.0.0.1:8084.
Gradio (host only):
Open http://127.0.0.1:9004. You do not need Gradio in production.
Request a License & Support · Contact us
FAQ
Face Liveness API? POST /api/liveness on port 8084. Score ≥ 0.5 → Real.
Machine code? GET /api/machinecode returns machine code. Docker and host codes differ.
Related documentation
Last updated