CloudFace
DEVELOPERS / V2

API reference

REST API · Bearer token · JSON

API keys

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

MethodRouteDescription
GET/v2/statusStatus and version (public)
GET/v2/profilesAvailable profiles
GET/v2/usageQuota and monthly usage (UTC)
POST/v2/detectFace bounding box detection
POST/v2/compare1:1 comparison; image, reference, consent=yes

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

ProfileModelAccess
fastSCRFD-500MStandard
balancedResNet50Standard (experimental)
accurateAdaptive 2 coreStandard (experimental)
ultraTTA 3 coreStandard (experimental)
detailed4-region tilingStandard (experimental)

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"}}
TECHNICAL SPECIFICATIONS

Technical specifications & measured performance

Face detection (bounding boxes) and anonymous people counting. The values below describe the implemented limits and historical detection tests.

12 × 12 px

Minimum face box filter

640 × 640

Face detector input

16 MP / 8 MiB

Image upload limit

30 / 60

Max face boxes · standard / tiled

12 × 12 pixels is the minimum accepted output box in original-image coordinates, not a guaranteed detectable face size. Lighting, pose, blur, occlusion and resizing affect detection. JPEG, PNG and WebP supported.

Historical face detection benchmark

ModelImages / annotated facesPrecisionRecallF1
SCRFD-500M (Fast)332 / 77895.48%78.79%86.34%
ResNet50 Adaptive 2-view100 / 13195.16%90.08%92.55%

Open Images, bounding-box IoU ≥ 0.5. SCRFD: 613 true positives, 29 false positives, 165 missed faces across 332 reused images; threshold 0.5. Adaptive: 118 true positives, 6 false positives, 13 misses on a reused 100-image development split. Historical configurations and datasets differ; this is not a fresh benchmark of the current release or a face identity recognition success rate.

Precision = correct detections / all detections. Recall = correct detections / annotated faces. F1 = harmonic mean of precision and recall.

People counting & video

416 × 416

YOLOX-Nano · COCO person

1–5 FPS

Short-video sampling

1080p / 30 s

Short video · max 16 MiB

0.35

Default person detection confidence threshold

MP4, AVI, MOV, MKV, WMV, FLV. Accuracy of count and directional crossing depends on the scene and line placement; no labeled aggregate-count validation is available yet.