face-lock docs
Overview
face-lock is a FastAPI service that detects a primary subject, makes a square crop, and returns both a crop and an annotated preview.
Endpoints
GET /healthGET /POST /api/focusPOST /api/focus/imageGET /docs
Detectors
facefor human facesanimalfor pets / animals, with a contour fallbackpersonfor full-body person detectionsubjectfor general foreground subjects
Test UI
Set FACE_LOCK_TEST_UI=false to disable the / test UI.
Authentication
Set FACE_LOCK_AUTH_TOKEN to require a header token.
Supported headers:
X-API-Key: <token>Authorization: Bearer <token>
Optional override:
FACE_LOCK_AUTH_HEADERchanges the expected header name.
Example
curl -H 'X-API-Key: your-token' \
-F 'file=@image.jpg' \
-F 'detector=animal' \
http://localhost:8000/api/focus