Authentication
Base URL: https://cloudface.online. Free accounts include 100 requests/month (UTC).
Authorization: Bearer YOUR_TOKEN
Do not put tokens in URLs. A token is shown only once when created or rotated. Manage API keys.
Endpoints
Homepage demo: 5 requests/IP/hour shared by detection and comparison. GET requests do not count towards inference quota. Detection POST uses multipart: image, consent=yes, profile (default fast). Successful processing costs one request; processing failures are refunded. Rate limit: 60 inference requests/minute/account.
Detection profiles
Unavailable profiles return 503 without automatically switching models.
Integration examples
cURL
curl "https://cloudface.online/v2/detect" \
-H "Authorization: Bearer $FACECLOUD_TOKEN" \
-F "[email protected]" -F "consent=yes" \
-F "profile=fast"
cURL · 1:1 comparison
curl "https://cloudface.online/v2/compare" \
-H "Authorization: Bearer $FACECLOUD_TOKEN" \
-F "[email protected]" -F "[email protected]" \
-F "consent=yes"
Returns data.similarity (cosine similarity), data.images and data.elapsed_ms. Cosine similarity is not a calibrated probability.
1:1 comparison uses 640 × 640 landmarks, AuraFace and two-view TTA. Response metadata: embedding_version, detector_size, tta_views. Scores may differ from earlier releases.
Python
import os, requests
with open("face.jpg", "rb") as image:
r = requests.post(
"https://cloudface.online/v2/detect",
headers={"Authorization": "Bearer " + os.environ["FACECLOUD_TOKEN"]},
files={"image": image},
data={"consent": "yes", "profile": "fast"},
timeout=30,
)
r.raise_for_status()
print(r.json())JavaScript (Node.js 20+)
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("image", new Blob([await readFile("face.jpg")]), "face.jpg");
form.append("consent", "yes");
form.append("profile", "fast");
const r = await fetch("https://cloudface.online/v2/detect", {
method: "POST", headers: {
Authorization: "Bearer " + process.env.FACECLOUD_TOKEN
}, body: form
});
if (!r.ok) throw new Error(await r.text());
console.log(await r.json());Example response
{
"api_version": "2",
"request_id": "example",
"data": {
"profile": "fast",
"engine": "SCRFD-500M",
"image": {"width": 640, "height": 480,
"coordinate_format": "xyxy_pixels"},
"face_count": 1,
"detections": [
{"bbox": [180, 90, 410, 365], "score": 0.92,
"score_type": "detector_confidence"}
],
"elapsed_ms": 46.2
}
}bbox = [x_min, y_min, x_max, y_max] in pixels after EXIF orientation. Consensus returns score_type=vote_fraction and votes/views. Scores are not calibrated probabilities.
People counting and video analytics
Video: MP4, AVI, MOV, MKV, WMV, FLV (16 MiB, 30 seconds). Optional normalized line [[0.1,0.5],[0.9,0.5]], in_direction=positive or negative, initial_inside=0; sample_fps=1–5. Counts are estimates; no identity tracking. Images: JPEG, PNG, WebP.
POST /v2/person-count/image
POST /v2/person-count
curl https://cloudface.online/v2/person-count/image -H "Authorization: Bearer $FACECLOUD_TOKEN" -F "[email protected]" -F "consent=yes"
curl https://cloudface.online/v2/person-count -H "Authorization: Bearer $FACECLOUD_TOKEN" -F "[email protected]" -F "consent=yes" -F 'line=[[0.1,0.5],[0.9,0.5]]' -F "initial_inside=0"
H.264 people-count videos use Rockchip MPP decoding when available and retry once on the CPU on decoder failure within the existing time budget. Other codecs use CPU. Response fields: decoder, codec, and decoder_fallback (when retried).
Asynchronous video counting jobs (pilot)
Authenticated accounts only. Raw video body (application/octet-stream), format and consent query parameters. 64 MiB, 10 minutes, 1080p pixel budget, 1–2 sampled FPS. Maximum one active job per account, three globally; one worker. A successful job costs one request; failed or cancelled jobs are refunded. Poll the returned job ID; results expire after 24 hours. Video files are deleted after completion, failure or cancellation. Not available to the anonymous demo.
curl -X POST "https://cloudface.online/v2/person-count/jobs?format=mp4&consent=yes&sample_fps=1" \
-H "Authorization: Bearer $FACECLOUD_TOKEN" \
-H "Content-Type: application/octet-stream" \
--data-binary @clip.mp4
GET /v2/person-count/jobs/JOB_ID
DELETE /v2/person-count/jobs/JOB_ID
Video reference search jobs (private)
Administrator access only, with explicit permission for the reference image and video. Shared video queue: 64 MiB video, 8 MiB reference image, 10 minutes, 1–2 sampled FPS. Submit raw application/octet-stream consisting of reference image bytes followed by video bytes; reference_bytes specifies the exact length of the image prefix. Query parameters: format, consent=yes, reference_bytes, sample_fps. The result contains candidate timestamps and similarity, not verified identity. The reference image is deleted after decoding; video is deleted when processing ends. Aggregate results expire after 24 hours. One active job per account and three globally, shared with people-count jobs. Failed or cancelled jobs refund quota.
POST /v2/video/reference-search/jobs
GET /v2/video/reference-search/jobs/JOB_ID
DELETE /v2/video/reference-search/jobs/JOB_ID
Private video reference search (administrator access)
Administrator-only; requires explicit permission for the reference subject and the video. Upload video, reference and consent=yes using the administrator Bearer token. The response contains candidate similarity scores and source-frame timestamps, not verified identities. Maximum 2 sampled frames per second, 30 seconds, 16 MiB video and 17 MiB total request. Images and video are not retained by the preview.
POST /v2/video/reference-search
Error codes
400: input/profile/consent · 401: token · 403: permission · 413: payload size · 422: missing fields · 429: rate/quota · 503: unavailable.
{"api_version":"2","request_id":"example",
"error":{"code":"forbidden","message":"Permission denied"}}