Skip to content

Xylolabs Face API

Provides a face detection and masking REST API powered by SCRFD (SOTA on WIDER FACE).

What it does

Upload an image to get face locations with bounding boxes and 5-point landmarks. Or mask all faces with blur, pixelation, or solid fill and get the processed image back.

Quick start

# Detect faces
curl -X POST https://face-api.xylolabs.com/api/v1/detect \
  -H "X-API-Key: xyl_your_key" \
  -F "image=@photo.jpg"

# Mask faces
curl -X POST https://face-api.xylolabs.com/api/v1/mask \
  -H "X-API-Key: xyl_your_key" \
  -F "image=@photo.jpg" \
  -o masked.jpg
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "xyl_your_key");

using var detectContent = new MultipartFormDataContent();
detectContent.Add(new ByteArrayContent(File.ReadAllBytes("photo.jpg")), "image", "photo.jpg");
var detectResponse = await client.PostAsync("https://face-api.xylolabs.com/api/v1/detect", detectContent);
Console.WriteLine(await detectResponse.Content.ReadAsStringAsync());

using var maskContent = new MultipartFormDataContent();
maskContent.Add(new ByteArrayContent(File.ReadAllBytes("photo.jpg")), "image", "photo.jpg");
var maskResponse = await client.PostAsync("https://face-api.xylolabs.com/api/v1/mask", maskContent);
await using var output = File.Create("masked.jpg");
await maskResponse.Content.CopyToAsync(output);

Endpoints

Method Path Description
GET /health Return health status
POST /api/v1/detect Detect faces and return JSON
POST /api/v1/mask Mask faces and return an image

Admin endpoints at /api/v1/admin/* for image/job management and API key CRUD.

Documentation

한국어