Reading classification results
A completed asset's classification groups its findings by capability. classification.moderation holds category scores, qualifiers, the policy assessment and the decision. Optional detections you requested sit alongside it. Use Category definitions to interpret the findings and Policies and actions to understand the decision.
Reading reports safely
Check each category's status before reading its score: an unevaluated category is unknown, not safe.
const violence = asset.classification.moderation.raw?.categories.violence;
if (violence?.status === "evaluated" || violence?.status === "partial") {
console.log(violence.score, violence.likelihood);
} else if (violence) {
console.log(`Violence was not evaluated: ${violence.reason}`);
}
Report shape
Every report contains all eight parent categories: the top-level categories described in Category definitions, such as Violence or Hate. Evidence about narrower forms within a category, such as graphic detail or a historical setting, is nested under that category's qualifiers. These are not additional top-level categories. A category your policy doesn't moderate can still have raw findings; see preset defaults. Reports made before a category was added show it as not assessed rather than inventing a zero score.
The moderation result puts the current outcome in moderation.status. Policy-adjusted category results live in moderation.categories; detection findings before policy evaluation live in moderation.raw.categories. A manual review can change the current status without changing the automated assessment.
Field in classification | Meaning |
|---|---|
status | queued, processing, completed or failed. |
failureReason | Why processing failed, while status is failed; otherwise null. See Failure reasons. |
updatedAt | When the classification state last changed, in Unix milliseconds. |
completedAt | When classification completed, in Unix milliseconds. null until completion; unchanged by manual reviews. |
testInput | true when the results came from one of the project's test inputs, submitted as the whole upload, rather than from analysing the content. Never use test results, such as declared age ranges, for real decisions. |
moderation.raw.categories | Detection findings for all eight parent categories. moderation.raw is null until the asset is analysed. |
moderation.status | pending, allowed, limited, age-restricted, blocked or purged; a reviewer's decision takes precedence. |
moderation.automatedStatus | The status automated moderation decided: allowed, limited, age-restricted, blocked or purged. null until moderation decides. |
moderation.flaggedCategories | Categories acted on by the automated decision; an empty array when none were acted on. Manual reviews do not change them. |
moderation.categories | Saved policy-adjusted category scores, actions, deciding rules and settings snapshots, null until moderation decides. Changing a policy later does not update them. |
moderation.source | What determined the automated action, null until moderation decides. |
moderation.rule | The mandatory rule that determined the action when source is mandatory-rule; otherwise null. |
moderation.regions | Stricter outcomes for the project's served jurisdictions; an empty array when none apply. |
moderation.explanationComplete | Whether questions needed for a complete explanation have been answered, null until moderation decides. Actions are final even when this is false. |
moderation.timeline Preview | For audio and video, segmentCount: how many segments the findings timeline holds. null for other assets. |
moderation.raw.hashMatches | Matches against your hash lists, each with its list, entry, distance and the action it took; an empty array when nothing matched. |
moderation.manualReviews | Review history, oldest first. Each entry records the decision (allowed, limited, age-restricted, blocked or purged), note, time, who decided and whether it was applied to the asset; see Moderation. |
linkDetection | QR codes and web links found when link detection is on; null when it didn't run. |
ocr | OCR's result: textRegions, where it found text in the image, including boxes marked as personal information. null when OCR didn't run. |
personDetection and faceDetection hold optional detections requested through processingOptions.features, and are null when they didn't run. They do not affect the moderation decision.
OCR text and transcripts live in content.extractedText, so their retention follows the source content. OCR safety findings contribute to classification.moderation.raw.categories.
For example, a saved category includes the rules needed to explain its decision without loading the current policy:
{
"score": 0.81,
"action": "block",
"source": { "kind": "restriction", "indexes": [0] },
"settings": {
"action": "block",
"allowances": [{ "name": "Historical context", "when": ["violence-historical"], "action": "allow" }],
"restrictions": [{ "name": "Graphic detail", "when": ["violence-graphic"], "action": "block" }]
}
}A category's source says what decided its action: its default action, a policy score below-threshold, or the allowance or restriction rules listed by their positions in settings in indexes, the decisive rule first.
Complete policy evidence
To decide quickly, moderation skips questions whose answers couldn't change any action under your policy. Every action is final, but moderation.explanationComplete is then false: a category's policy score and the rules credited in its source can differ from a complete explanation. POST / answers the skipped questions for the same content and sets explanationComplete to true, keeping every action unchanged. The portal's Explain decision button does the same. This describes the explanation of the saved decision; it does not mean every category was assessed.
A decision can only be explained under the policy settings it was made with. If a decided category's action or rules have changed since, the request returns 409 asset/policy-changed; send rerun: true to moderate the asset again with the current policy, answering every question. The request records an asset.rerun-requested event, whose actor is the user or API key that asked, and returns the asset unchanged. It keeps its decision until the re-run stores the new one, reported by asset.classified and the matching status event; the new decision can differ from the old one. If the re-run fails, the asset keeps its decision.
Re-running needs the assets:update permission, and is refused when:
| Condition | Error |
|---|---|
| The asset isn't an uploaded image, plain text, audio or video, or is audio or video over 50 MiB or 120 seconds | 409 asset/not-retryable |
CalmLens no longer holds its content, for example without keepContentAfterProcessing | 409 asset/content-unavailable |
| A reviewer has decided it | 409 asset/reviewed |
| A reviewer decides it while the request is made | 409 asset/review-changed |
| It is under a safety hold, which also blocks explaining it | 423 asset/held |
Category and qualifier results
Each parent category nests its evidence under qualifiers. Qualifier IDs are category-specific; the current sets and their definitions are listed in Category definitions. Use the documented qualifier IDs for each category.
| Qualifier field | Meaning |
|---|---|
status | evaluated or not-evaluated; see Evaluation status. |
someScore | Evidence that the qualifier is present in some of the category's qualifying content. See Some and All. |
allScore | Evidence that the qualifier covers all qualifying content in the category. It never exceeds someScore. |
likelihood | The likelihood label for someScore; see Scores and likelihoods. Only on evaluated qualifiers. |
reason | Why the qualifier wasn't evaluated. Only on not-evaluated qualifiers. |
CalmLens assesses only the qualifiers your policy's rules use, and only in categories scoring at least 50%, since below that no rule can act. A report can therefore lack evidence for other qualifiers and for every qualifier of a category below 50%. Qualifiers that mandatory rules use, including the regional rules your project opts into, are assessed whenever their category's score reaches 50%, whatever your policy's settings. Likewise, text is not assessed for a category your policy doesn't moderate and no mandatory rule uses, such as Profanity on General and Learning and support. That category is not-evaluated with reason not-supported.
Text and images both get separate checks for someScore and allScore. A qualifier without an allScore gives an allowance no coverage, and a qualifier that wasn't evaluated gives neither an allowance nor a restriction any evidence.
For how those fields affect a decision, see Policy score.
Qualifiers have their own evaluation status and do not change the parent category's score, with one exception: in text, the Hate category score is raised to at least the Offensive slurs qualifier's someScore. Qualifier scores are diagnostic evidence, not probabilities of correctness.
Evaluation status
| Status | Meaning | Score fields |
|---|---|---|
| evaluated | The parent category was directly evaluated. Individual qualifiers may still be unavailable. | Includes score and likelihood. |
| partial | Only evidence about a narrower form within the category was evaluated, not the complete parent category. | Includes the strongest available qualifying signal and its likelihood. |
| not-evaluated | No usable score exists for this category, so it has no policy score. | Includes reason; omits score and likelihood. |
Qualifiers use evaluated or not-evaluated; they do not use partial.
Possible not-evaluated reasons are:
| Reason | Meaning |
|---|---|
| not-supported | The processing path used for this asset cannot assess this category or qualifier, or your policy doesn't use it. |
| unavailable | Assessment was attempted but produced no usable result. A complete moderation failure normally sets the asset's classification.status to failed instead of returning a successful report. |
Coverage varies by input type and processing availability, and a parent result does not guarantee that every qualifier was evaluated.
Do not convert not-evaluated into a zero score. Zero means the signal was evaluated and received its lowest score; not-evaluated means CalmLens has no result.
Scores and likelihoods
Scores are normalized to the range 0–1. Likelihood labels use these boundaries:
| Score | Likelihood |
|---|---|
< 0.2 | very-unlikely |
0.2–< 0.4 | unlikely |
0.4–< 0.6 | possible |
0.6–< 0.8 | likely |
>= 0.8 | very-likely |
The parent category score retains the strongest supported category evidence, including directly evaluated checks for a narrower form within the category. Apart from the Offensive slurs exception above, qualifiers do not change this score. Scores are normalized into the same shape, but are not calibrated probabilities of correctness.
OCR and merged image reports
Enable OCR when written content in images matters. See OCR and image reports for setup, image-owned extracted text, combined scores and usage.
Report an incorrect result
If you think a decision is wrong, report it from the asset's page in Portal › Assets. This opens a support request already filled in with the asset and project IDs, its moderation status and each category's status, score and action; add what the result should be and why. The report goes to CalmLens support and does not change the asset's decision; to change it, review the asset or adjust your policy.
Audio and video reports
See Audio and video moderation for supported formats, sampling limits, timelines and usage.
Example report
This example includes findings for all eight categories, selected qualifiers and the policy section a Learning and support project records. The policy section lists every assessed category, here including profanity, which Learning and support doesn't moderate; unassessed categories are left out of it. Violence is wholly historical, so the Historical allowance covers it, but its graphic detail is a restricted form: Learning and support age-restricts graphic violence in history, reporting or teaching, so the policy score stays high and the asset is age-restricted rather than allowed. Each policy category also records the source and settings shown above; they're left out here.
{
"status": "completed",
"failureReason": null,
"updatedAt": 1788364800000,
"completedAt": 1788364800000,
"progress": null,
"testInput": false,
"moderation": {
"status": "age-restricted",
"manualReviews": [],
"timeline": null,
"categories": {
"sexual": {
"score": 0.02,
"action": "allow"
},
"violence": {
"score": 0.81,
"action": "age-restrict"
},
"self-harm": {
"score": 0,
"action": "allow"
},
"harassment": {
"score": 0.02,
"action": "allow"
},
"hate": {
"score": 0.04,
"action": "allow"
},
"criminal-activity": {
"score": 0.02,
"action": "allow"
},
"personal-information": {
"score": 0,
"action": "allow"
},
"profanity": {
"score": 0,
"action": "allow"
}
},
"explanationComplete": true,
"source": "policy",
"rule": null,
"flaggedCategories": [
"violence"
],
"regions": [],
"linkSafety": null,
"automatedStatus": "age-restricted",
"raw": {
"categories": {
"sexual": {
"status": "evaluated",
"score": 0.02,
"likelihood": "very-unlikely"
},
"violence": {
"status": "evaluated",
"score": 0.9,
"likelihood": "very-likely",
"qualifiers": {
"violence-attack": {
"status": "evaluated",
"someScore": 0.98,
"allScore": 0.95,
"likelihood": "very-likely"
},
"violence-historical": {
"status": "evaluated",
"someScore": 0.97,
"allScore": 0.97,
"likelihood": "very-likely"
},
"violence-graphic": {
"status": "evaluated",
"someScore": 0.9,
"allScore": 0.9,
"likelihood": "very-likely"
}
}
},
"self-harm": {
"status": "evaluated",
"score": 0,
"likelihood": "very-unlikely"
},
"harassment": {
"status": "evaluated",
"score": 0.02,
"likelihood": "very-unlikely"
},
"hate": {
"status": "evaluated",
"score": 0.04,
"likelihood": "very-unlikely"
},
"criminal-activity": {
"status": "evaluated",
"score": 0.02,
"likelihood": "very-unlikely"
},
"personal-information": {
"status": "evaluated",
"score": 0.03,
"likelihood": "very-unlikely"
},
"profanity": {
"status": "evaluated",
"score": 0.04,
"likelihood": "very-unlikely"
}
},
"hashMatches": []
}
},
"ocr": null,
"personDetection": null,
"faceDetection": null,
"linkDetection": null,
"linkSafety": null,
"aiGeneratedDetection": null
}Mandatory and regional decisions
moderation.source says what decided the base action in moderation.automatedStatus:
source | Decided by |
|---|---|
| policy | Your policy's category actions, allowances and restrictions. |
| hash-list | A match on one of your block hash lists, which raised the action to block. |
| mandatory-rule | A global mandatory rule at least as strong as the policy's action. The stable rule key names it. |
| children | The asset's child assets, such as the text and images extracted from a document or website. |
| link-safety Preview | A link's verdict, through the policy's link safety section. |
regions lists only the served jurisdictions whose matching rule raises the base action. For example:
{
"source": "policy",
"flaggedCategories": [],
"regions": [
{
"region": "DE",
"status": "blocked",
"rule": "de-unconstitutional-symbols",
"category": "hate"
}
],
"automatedStatus": "allowed"
}The asset response contains the stored moderation decisions. The CDN applies each viewer's regional and age outcome when it serves the file; see Viewer region for the claims it reads and what to do when you proxy or serve files yourself.