Skip to main content

Scoring Profiles

A scoring profile is a tuned scoring configuration — model weights, decision thresholds, and custom scoring logic — authored and tested by the Deepfaic team for your use case, and delivered to your edge deployment as a single signed file (a profile bundle, e.g. clip-jury_v3.dfprofile.json).

Profiles are strictly opt-in per job: importing a bundle changes nothing by itself. Jobs score with your CONFIG.yaml defaults unless a request explicitly selects a profile with profile_name (see Create Job).

Fully offline

Bundles are files — they reach your host however you move files today. The edge runtime never contacts Deepfaic cloud. Every bundle is cryptographically signed by Deepfaic; a file that was modified in transit, or that was not produced by Deepfaic, is rejected at import.


How it works​

  1. The Deepfaic team exports a profile bundle for you and sends you the file.
  2. You install it — either via the Import endpoint (no restart), or by placing the file in <runtime-root>/data/profiles/ and restarting the stack (imported on boot).
  3. API clients select it per job: "profile_name": "clip-jury" (latest installed version) or "clip-jury@3" (pinned version).
  4. The profile is frozen onto the job at creation — its results never change afterwards, even if the profile is later removed or a newer version is installed.

Import a profile bundle​

Installs one signed bundle. Re-importing a bundle that is already installed is a harmless no-op.

POST /v1/profiles/import

The request body is the raw bundle file, exactly as received.

curl -X POST http://<edge-host>:9123/v1/profiles/import \
-H "Authorization: Bearer df_..." \
-H "Content-Type: application/json" \
--data-binary @clip-jury_v3.dfprofile.json

Response​

{
"status": true,
"code": 200,
"message": "Profile clip-jury@3 imported",
"data": {
"name": "clip-jury",
"version": 3,
"reference": "clip-jury@3",
"scripts": ["volatility-guard@2"],
"already_installed": false
}
}
FieldTypeDescription
name / versionstring / number(int)The installed profile identity.
referencestringThe name@version selector to use at job creation.
scriptsstring[]Custom scoring logic the bundle carried, if any.
already_installedbooleantrue when this exact bundle content was already installed.

Errors​

CodeCondition
422The file is not a valid bundle, the signature does not verify (modified or not produced by Deepfaic), or the same name@version is already installed with different content.

List installed profiles​

GET /v1/profiles

data is an array of every installed profile, newest first.

FieldTypeDescription
name / version / referencestring / number(int) / stringThe profile identity.
statusstringactive (selectable by new jobs) or removed.
imported_attimestampWhen the bundle was installed.
scriptsstring[]Custom scoring logic used by the profile, if any.
curl http://<edge-host>:9123/v1/profiles \
-H "Authorization: Bearer df_..."

Remove a profile​

Removal is soft: new jobs can no longer select the profile, but every job that already used it keeps its results permanently. Re-importing the same bundle later reactivates it.

DELETE /v1/profiles/{name}/{version}
curl -X DELETE http://<edge-host>:9123/v1/profiles/clip-jury/3 \
-H "Authorization: Bearer df_..."

Errors​

CodeCondition
404No profile with that name@version is installed.

Using a profile​

Pass profile_name when creating a job — see Create Job:

{
"input_path": "/var/lib/deepfaic/uploads/sample.mp4",
"profile_name": "clip-jury"
}

The job's responses then report scores, thresholds, and the final verdict from that profile, and prediction_source identifies it (e.g. "clip-jury@3"). Jobs created without profile_name are completely unaffected and keep scoring with the CONFIG.yaml defaults (prediction_source: "default").