Crop Face
Detect and crop a face region from an uploaded image. Server-side multipart POST with Bearer auth.
API reference
JWT Bearer token authentication. Obtain a token from the KwikID dashboard.
In: header
Optional correlation id for logs.
Response Body
curl -X POST "https://__mock__/crop/face" \ -F file="string""string"{
"msg": "string"
}{
"detail": {},
"message": "string"
}Overview
Call POST /crop/face with Authorization: Bearer <token> and multipart/form-data field file (image). Optional unique_id for tracing. 200 returns a JPEG face crop (binary). Use the cropped output in downstream facematch or storage pipelines.
Key features
- Normalization: Produces consistent face crops for comparison.
- Pairs with Facematch: Feed crops into Facematch.
Implementation
Step 1: Call from your backend
Post file as binary image per OpenAPI.
Error handling
| HTTP status | When |
|---|---|
| 400 | No detectable face or bad file. |
| 401 | Invalid token. |
Benefits
- Reduces bad matches caused by full-page document scans.
Next steps
Liveness Detection V2 POST
Same liveness flows as v1 with a structured multi-block JSON response (image, video, facematch, overall). POST /v2/liveness with Bearer auth.
Face Crop (v2 YOLO) POST
YOLO-based face crop returning JPEG bytes. Multipart POST /v2/yolocrop/face — required file; optional unique_id.