Decisions
One logged decision and how the model reached it, found by your own id: a record to read, to file as a PDF, and to check by its fingerprint.
A decision is a logged prediction, known by the id it was logged under: yours (prediction_id), or the one Kaimei generated. Its record sets beside it the explanation stored under the same id, in sentences that can be filed: the outcome and the rule behind it, the starting point, each input's effect, what would have changed the outcome, how it was computed, and what a record cannot show. It is written for the people who answer for a decision; Decision records describes it for them.
Nothing is recomputed when a record is read. The sentences are built from the stored numbers, so the API, the PDF, the dashboard and the Python client say the same thing about the same decision.
#The Decision record object
Every block states stored facts. sentence fields are the same wording the PDF prints.
Attributes
The decision id: the prediction's id.
explained, or not_explained when the decision is logged and no explanation is stored for it. An unexplained record still has its outcome, inputs and fingerprint.Whether a prediction is logged under this id. false when the id was only ever sent with an explanation; the record is then built from the explanation alone.
When the prediction was logged.
{id, name, slug, version, task, framework, status}: the model that made the decision.What the model said. kind is binary (with label, positive_label, probability of the positive label, and threshold), class, number (value, unit) or other. sentence states it. output is the stored output.
Every input as recorded, in the model's order: {name, label, type, value, display, exact, unit, description}. exact is the stored value digit for digit; display is how a sentence states it. A picture, series or tensor has value: null and withheld; the fingerprint still covers it.
The explanation the record shows. See below.
Each input's effect, strongest first: {rank, feature, label, value, display, attribution, share, direction, sentence}, with stderr for a sampled method. direction is raises, lowers or none. For a picture they are its regions' effects, and for a text or a series its tokens' or steps', each with its order in reading order. negligible: true marks an effect too small to print, whose sentence says so.
{found, sentence, note, changes, frozen_features} when the explanation searched for one. Each change has from_display and to_display.Draft reasons in the wording of the model's reason table, for a decision that went against the person: the reasons, the inputs held for review, and the version they were drawn with. null when the model has no approved table. Not part of the fingerprint: approving wording does not rewrite a decision.
What was finally decided and the rules applied outside the model, as recorded beside the decision: {outcome, decided_by, rules, note, revision, recorded_by, recorded_at, amended_at, sentences, reasons, stated}. Each rule has the sentence that states it; reasons lists the reasons a rule, not the model, gave. null when nothing was recorded. Not part of the fingerprint: it can be amended, and the audit log keeps each amendment.
{id, scope, reason, matter, placed_by, placed_at}. scope is decision, or model for a hold on every record of the model.What has been done to this record, oldest first, from the audit log: {at, action, by, summary}. Explaining it, recording and amending what was decided, placing and releasing a hold.
For a picture, a text, a series or a tensor: what the model was looking at. kind, the feature explained, and sentences that say it in words. A text or a series adds parts in reading order, each {key, label, attribution, direction, strength, rank} with position or start and stop, so the input can be drawn with its effects; a series of up to 4,096 numbers adds series: {channels, unit, steps}. A picture adds focus (the region that holds half of the evidence) and evidence (the answer with that region hidden, and alone). null for a row of named values. The PDF draws the picture, the text or the series from it.
What a reader must know before relying on this record: that it is not explained yet, that the outcome logged is not the one the model gave when it was explained, that the explanation's input differs from the logged one.
{title, text}: what no record of this kind shows (causation, fairness, the data's correctness, rules outside the model).That the record supports a compliance process and is not legal advice.
{id, method, method_name, computed_at} for the other explanations stored under the same id.The real outcome, when one was attached later.
{algorithm: "sha256", value, covers}. Computed from the decision id, the model and its version, the logged input, output and time, and the explanation's method, options and numbers. Names and wording are left out, so renaming a model does not change it; any change to a stored number does.The explanation block
The method, as the API names it and as a record calls it (shap, KernelSHAP).
Whether explaining again gives the same numbers: true for an exact method, a set seed, Grad-CAM, and attributions you supplied. reproducible_sentence says why.
What the explanation is of: table (a row of named values), inputs (whole inputs of a model that reads several), image, text, sequence, tensor or audio.
What the effects are in: chance (percentage points of a probability), number (the prediction's unit), score, or evidence when the effects only rank (LIME, and a picture's map). The parts of a text or a series are measured by hiding them, so their effects are in the model's own unit whether or not they add up.
Whether base_value plus every effect equals value. summary states the sum when it does.
{source, source_words, rows, digest, available_rows, sentence}: the rows the case was compared with, and the starting point in a sentence. digest is a SHA-256 of the reference rows an explanation of a table was drawn from, so two explanations with the same digest were compared with the same rows; it is null for explanations made before it was stored. The record's fingerprint covers it.How it was run.
{user_id, name, role} when it was explained through this API from a session.True when the effects belong to regions of a picture, tokens of a text or stretches of a series, not to named inputs.
{
"object": "decision_record",
"id": "APP-2026-00417",
"status": "explained",
"logged": true,
"decided_at": "2026-10-31T22:40:23.512004Z",
"source": "api",
"model": {
"id": "mdl_390bd6d9568f626851ef",
"name": "Credit risk scorer",
"slug": "credit-risk-v3",
"version": "3",
"task": "binary_classification",
"framework": "sklearn",
"status": "active"
},
"outcome": {
"kind": "binary",
"name": "decision",
"output": …,
"sentence": "The model gave this case a 59.5% chance of decline. That is at or above the 50% threshold, so the outcome is decline.",
"label": "decline",
"positive_label": "decline",
"other_label": "approve",
"probability": 0.5946779284704223,
"threshold": 0.5
},
"inputs": [
{
"name": "income",
"label": "Annual gross income",
"type": "numeric",
"value": 72000,
"display": "72,000 USD/yr",
"exact": "72000",
"unit": "USD/yr",
"description": "Annual gross income",
"declared": true
},
{
"name": "credit_score",
"label": "Bureau credit score",
"type": "integer",
"value": 681,
"display": "681",
"exact": "681",
"unit": null,
"description": "Bureau credit score",
"declared": true
},
…
],
"actual": null,
"explanation": {
"id": "exp_7d7add16c796eafac087",
"method": "shap",
"method_name": "KernelSHAP",
"method_sentence": "Shapley values: each input's fair share of the difference between this case and the average case.",
"computed_at": "2026-10-31T22:40:23.801563Z",
"exact": true,
"seed": 0,
"reproducible": true,
"reproducible_sentence": "The method was exact: every combination of inputs was evaluated, so the same model version and reference data give the same numbers every time.",
"model_calls": 32868,
"reference": {
"source": "reference_data",
"source_words": "the model's reference data",
"rows": 64,
"digest": "5f2c9a71d0e84b3c6a1f7e92b4d8c05a3e6f1b9d7c2a4e8f0b5d3c6a9e1f7b24",
"available_rows": 600,
"sentence": "The starting point is 49.0%: the model's average chance of decline across 64 rows drawn from the model's reference data."
},
"kind": "table",
"explains": "the chance of decline",
"target_label": "decline",
"measure": "chance",
"unit": null,
"adds_up": true,
"base_value": 0.4904096039702106,
"value": 0.5946779284704223,
"total": 0.10426832450021173,
"summary": "Together the inputs raise the chance of decline by 10.4 percentage points, from the starting point of 49.0% to this case's 59.5%.",
"options": {
"seed": 0,
"counterfactual": true,
"frozen_features": ["age"],
"top_k": 100,
"exact": true,
"background_rows": 64,
"background_source": "reference_data"
},
"requested_by": {
"name": "Riley Counsel",
"role": "reviewer"
},
"parts": false
},
"factors": [
{
"rank": 1,
"feature": "debt_to_income",
"label": "Total monthly debt / monthly income",
"value": 0.38,
"display": "0.38",
"attribution": 0.07970604262568466,
"share": 0.2107,
"direction": "raises",
"sentence": "Total monthly debt / monthly income (0.38) raised the chance of decline by 8.0 percentage points."
},
{
"rank": 2,
"feature": "num_delinquencies",
"label": "Delinquencies in the last 24 months",
"value": 1,
"display": "1",
"attribution": 0.07483986997713922,
"share": 0.1978,
"direction": "raises",
"sentence": "Delinquencies in the last 24 months (1) raised the chance of decline by 7.5 percentage points."
},
…
],
"counterfactual": {
"found": true,
"changes": [
{
"feature": "credit_score",
"label": "Bureau credit score",
"from": 681,
"to": 850,
"from_display": "681",
"to_display": "850"
}
],
"frozen_features": ["age"],
"output_before": 0.5946779284704223,
"output_after": 0.08338468266207734,
"target": {"kind": "flip_decision", "threshold": 0.5},
"note": "This is a property of the model, not advice: the change found may be unrealistic, and the inputs held fixed are a choice.",
"label_after": "approve",
"sentence": "Changing bureau credit score from 681 to 850 would move the chance of decline from 59.5% to 8.3%, which makes the outcome approve. Held fixed in the search: applicant age."
},
"view": null,
"policy": {
"outcome": "declined",
"decided_by": "rule",
"rules": [
{
"name": "Score cut-off",
"kind": "cutoff",
"applied": true,
"detail": "Decline when the chance of decline is 50% or more",
"effect": "declined",
"kind_name": "Cut-off",
"sentence": "Cut-off “Score cut-off” applied: Decline when the chance of decline is 50% or more. Its effect: declined."
},
{
"name": "Recent bankruptcy",
"kind": "overlay",
"applied": false,
"kind_name": "Overlay rule",
"sentence": "Overlay rule “Recent bankruptcy” was checked and did not apply."
}
],
"note": null,
"revision": 1,
"recorded_by": {
"type": "user",
"name": "Dana Lee",
"role": "member"
},
"recorded_at": "2026-10-31T22:41:02.330118Z",
"amended_at": null,
"sentences": [
"The decision recorded for this case is “declined”. It was set by a rule applied outside the model.",
"Cut-off “Score cut-off” applied: Decline when the chance of decline is 50% or more. Its effect: declined.",
"Overlay rule “Recent bankruptcy” was checked and did not apply."
],
"reasons": [],
"stated": "These rules were applied outside Kaimei, which did not see or check them. They are stated as they were recorded. The effects in this record explain the model's answer, not the rules."
},
"holds": [],
"history": [
{
"at": "2026-10-31T22:40:23.801563Z",
"action": "decision.explained",
"by": "Riley Counsel ([email protected])",
"summary": "Had the decision “APP-2026-00417” explained."
},
{
"at": "2026-10-31T22:41:02.330118Z",
"action": "decision.policy_recorded",
"by": "Dana Lee ([email protected])",
"summary": "Recorded what was decided for “APP-2026-00417”: declined."
}
],
"notes": [],
"limits": [
{
"title": "It describes the model, not the world.",
"text": "It shows how the model reached its output. On its own it does not show that the decision was fair, lawful or correct."
},
…
],
"notice": "This record states what Kaimei stored and computed. It can support a compliance process; it does not make a decision, a notice or a filing compliant, and it is not legal advice.",
"other_explanations": [],
"logged_output": null,
"fingerprint": {
"algorithm": "sha256",
"value": "7a79a3b2e04d5f63ab18c34be10963bf138f5ef023c0e710c1309c04cc546fea",
"covers": "The decision id, the model and its version, the logged input, output and time, and the explanation's method, options and numbers."
}
}#Retrieve a decision record
/v1/decisions/{decision_id}API key or sessionThe record of one decision. It shows the newest explanation stored for the decision unless explanation names another. An id may hold slashes; escape anything else that a path would not carry.
format=pdf returns the same record as a document (application/pdf), with the fingerprint on every page and in the X-Kaimei-Fingerprint header. The document carries no time of printing: one release of Kaimei gives the same bytes for the same record. Documents are limited to 600 an hour on the free plan.
404 decision_not_found when nothing is logged or explained under the id in this workspace.
Path parameters
The id the prediction was logged under.
Query parameters
Draw the reasons with another version of the model's reason table: draft, to try wording before it is approved, or a version number. Default: the version in force when the decision was made.
An explanation id, when the decision has several. 404 explanation_not_found when it is not one of them.
json or pdf.letter or a4, for the PDF.Returns
record = client.decisions.retrieve("APP-2026-00417")
print(record.outcome.sentence)
for factor in record.factors[:4]:
print(factor.sentence)
print(record.counterfactual.sentence)
print(record.fingerprint.value)
# the same record as a document
client.decisions.save_pdf("APP-2026-00417", "records/", paper="a4")curl https://api.kaimei.ai/v1/decisions/APP-2026-00417 \
-H "Authorization: Bearer $KAIMEI_API_KEY"
# as a document
curl "https://api.kaimei.ai/v1/decisions/APP-2026-00417?format=pdf" \
-H "Authorization: Bearer $KAIMEI_API_KEY" \
-o decision-record-APP-2026-00417.pdf{
"object": "decision_record",
"id": "APP-2026-00417",
"status": "explained",
"logged": true,
"decided_at": "2026-10-31T22:40:23.512004Z",
"source": "api",
"model": {
"id": "mdl_390bd6d9568f626851ef",
"name": "Credit risk scorer",
"slug": "credit-risk-v3",
"version": "3",
"task": "binary_classification",
"framework": "sklearn",
"status": "active"
},
"outcome": {
"kind": "binary",
"name": "decision",
"output": …,
"sentence": "The model gave this case a 59.5% chance of decline. That is at or above the 50% threshold, so the outcome is decline.",
"label": "decline",
"positive_label": "decline",
"other_label": "approve",
"probability": 0.5946779284704223,
"threshold": 0.5
},
"inputs": [
{
"name": "income",
"label": "Annual gross income",
"type": "numeric",
"value": 72000,
"display": "72,000 USD/yr",
"exact": "72000",
"unit": "USD/yr",
"description": "Annual gross income",
"declared": true
},
{
"name": "credit_score",
"label": "Bureau credit score",
"type": "integer",
"value": 681,
"display": "681",
"exact": "681",
"unit": null,
"description": "Bureau credit score",
"declared": true
},
…
],
"actual": null,
"explanation": {
"id": "exp_7d7add16c796eafac087",
"method": "shap",
"method_name": "KernelSHAP",
"method_sentence": "Shapley values: each input's fair share of the difference between this case and the average case.",
"computed_at": "2026-10-31T22:40:23.801563Z",
"exact": true,
"seed": 0,
"reproducible": true,
"reproducible_sentence": "The method was exact: every combination of inputs was evaluated, so the same model version and reference data give the same numbers every time.",
"model_calls": 32868,
"reference": {
"source": "reference_data",
"source_words": "the model's reference data",
"rows": 64,
"digest": "5f2c9a71d0e84b3c6a1f7e92b4d8c05a3e6f1b9d7c2a4e8f0b5d3c6a9e1f7b24",
"available_rows": 600,
"sentence": "The starting point is 49.0%: the model's average chance of decline across 64 rows drawn from the model's reference data."
},
"kind": "table",
"explains": "the chance of decline",
"target_label": "decline",
"measure": "chance",
"unit": null,
"adds_up": true,
"base_value": 0.4904096039702106,
"value": 0.5946779284704223,
"total": 0.10426832450021173,
"summary": "Together the inputs raise the chance of decline by 10.4 percentage points, from the starting point of 49.0% to this case's 59.5%.",
"options": {
"seed": 0,
"counterfactual": true,
"frozen_features": ["age"],
"top_k": 100,
"exact": true,
"background_rows": 64,
"background_source": "reference_data"
},
"requested_by": {
"name": "Riley Counsel",
"role": "reviewer"
},
"parts": false
},
"factors": [
{
"rank": 1,
"feature": "debt_to_income",
"label": "Total monthly debt / monthly income",
"value": 0.38,
"display": "0.38",
"attribution": 0.07970604262568466,
"share": 0.2107,
"direction": "raises",
"sentence": "Total monthly debt / monthly income (0.38) raised the chance of decline by 8.0 percentage points."
},
{
"rank": 2,
"feature": "num_delinquencies",
"label": "Delinquencies in the last 24 months",
"value": 1,
"display": "1",
"attribution": 0.07483986997713922,
"share": 0.1978,
"direction": "raises",
"sentence": "Delinquencies in the last 24 months (1) raised the chance of decline by 7.5 percentage points."
},
…
],
"counterfactual": {
"found": true,
"changes": [
{
"feature": "credit_score",
"label": "Bureau credit score",
"from": 681,
"to": 850,
"from_display": "681",
"to_display": "850"
}
],
"frozen_features": ["age"],
"output_before": 0.5946779284704223,
"output_after": 0.08338468266207734,
"target": {"kind": "flip_decision", "threshold": 0.5},
"note": "This is a property of the model, not advice: the change found may be unrealistic, and the inputs held fixed are a choice.",
"label_after": "approve",
"sentence": "Changing bureau credit score from 681 to 850 would move the chance of decline from 59.5% to 8.3%, which makes the outcome approve. Held fixed in the search: applicant age."
},
"view": null,
"policy": {
"outcome": "declined",
"decided_by": "rule",
"rules": [
{
"name": "Score cut-off",
"kind": "cutoff",
"applied": true,
"detail": "Decline when the chance of decline is 50% or more",
"effect": "declined",
"kind_name": "Cut-off",
"sentence": "Cut-off “Score cut-off” applied: Decline when the chance of decline is 50% or more. Its effect: declined."
},
{
"name": "Recent bankruptcy",
"kind": "overlay",
"applied": false,
"kind_name": "Overlay rule",
"sentence": "Overlay rule “Recent bankruptcy” was checked and did not apply."
}
],
"note": null,
"revision": 1,
"recorded_by": {
"type": "user",
"name": "Dana Lee",
"role": "member"
},
"recorded_at": "2026-10-31T22:41:02.330118Z",
"amended_at": null,
"sentences": [
"The decision recorded for this case is “declined”. It was set by a rule applied outside the model.",
"Cut-off “Score cut-off” applied: Decline when the chance of decline is 50% or more. Its effect: declined.",
"Overlay rule “Recent bankruptcy” was checked and did not apply."
],
"reasons": [],
"stated": "These rules were applied outside Kaimei, which did not see or check them. They are stated as they were recorded. The effects in this record explain the model's answer, not the rules."
},
"holds": [],
"history": [
{
"at": "2026-10-31T22:40:23.801563Z",
"action": "decision.explained",
"by": "Riley Counsel ([email protected])",
"summary": "Had the decision “APP-2026-00417” explained."
},
{
"at": "2026-10-31T22:41:02.330118Z",
"action": "decision.policy_recorded",
"by": "Dana Lee ([email protected])",
"summary": "Recorded what was decided for “APP-2026-00417”: declined."
}
],
"notes": [],
"limits": [
{
"title": "It describes the model, not the world.",
"text": "It shows how the model reached its output. On its own it does not show that the decision was fair, lawful or correct."
},
…
],
"notice": "This record states what Kaimei stored and computed. It can support a compliance process; it does not make a decision, a notice or a filing compliant, and it is not legal advice.",
"other_explanations": [],
"logged_output": null,
"fingerprint": {
"algorithm": "sha256",
"value": "7a79a3b2e04d5f63ab18c34be10963bf138f5ef023c0e710c1309c04cc546fea",
"covers": "The decision id, the model and its version, the logged input, output and time, and the explanation's method, options and numbers."
}
}#Explain a logged decision
/v1/decisions/{decision_id}/explanationAPI key or sessionExplain a decision that is already logged, with the model and the input it was logged with, store the explanation under the decision's id, and return the record. The caller chooses neither the model nor the input, which is why a reviewer may call it.
With no body the decision is explained the way a record that may have to be defended should be: KernelSHAP where the model allows it (otherwise the model's first method), seed: 0, every input reported, and a counterfactual search when every input is a single value. Anything in options replaces that default.
Counts against the monthly explanations quota and the same hourly limit as explaining a prediction. 404 decision_not_found when no prediction is logged under the id: there is then no input to explain.
Path parameters
The id the prediction was logged under.
Body parameters
shap, shapley, lime, gradcam, occlusion or auto. Default: shap where it applies.An explanation's options, such as frozen_features, seed or counterfactual. log_prediction is ignored: the decision is logged already.
Returns
201.# hold age fixed in the search for what would have changed the outcome
record = client.decisions.explain("APP-2026-00417", options={"frozen_features": ["age"]})
print(record.explanation.method_name, record.explanation.reproducible)curl -X POST https://api.kaimei.ai/v1/decisions/APP-2026-00417/explanation \
-H "Authorization: Bearer $KAIMEI_API_KEY" \
-H "Content-Type: application/json" \
-d '{'options': {'frozen_features': ['age']}}'{
"object": "decision_record",
"id": "APP-2026-00417",
"status": "explained",
"logged": true,
"decided_at": "2026-10-31T22:40:23.512004Z",
"source": "api",
"model": {
"id": "mdl_390bd6d9568f626851ef",
"name": "Credit risk scorer",
"slug": "credit-risk-v3",
"version": "3",
"task": "binary_classification",
"framework": "sklearn",
"status": "active"
},
"outcome": {
"kind": "binary",
"name": "decision",
"output": …,
"sentence": "The model gave this case a 59.5% chance of decline. That is at or above the 50% threshold, so the outcome is decline.",
"label": "decline",
"positive_label": "decline",
"other_label": "approve",
"probability": 0.5946779284704223,
"threshold": 0.5
},
"inputs": [
{
"name": "income",
"label": "Annual gross income",
"type": "numeric",
"value": 72000,
"display": "72,000 USD/yr",
"exact": "72000",
"unit": "USD/yr",
"description": "Annual gross income",
"declared": true
},
{
"name": "credit_score",
"label": "Bureau credit score",
"type": "integer",
"value": 681,
"display": "681",
"exact": "681",
"unit": null,
"description": "Bureau credit score",
"declared": true
},
…
],
"actual": null,
"explanation": {
"id": "exp_7d7add16c796eafac087",
"method": "shap",
"method_name": "KernelSHAP",
"method_sentence": "Shapley values: each input's fair share of the difference between this case and the average case.",
"computed_at": "2026-10-31T22:40:23.801563Z",
"exact": true,
"seed": 0,
"reproducible": true,
"reproducible_sentence": "The method was exact: every combination of inputs was evaluated, so the same model version and reference data give the same numbers every time.",
"model_calls": 32868,
"reference": {
"source": "reference_data",
"source_words": "the model's reference data",
"rows": 64,
"digest": "5f2c9a71d0e84b3c6a1f7e92b4d8c05a3e6f1b9d7c2a4e8f0b5d3c6a9e1f7b24",
"available_rows": 600,
"sentence": "The starting point is 49.0%: the model's average chance of decline across 64 rows drawn from the model's reference data."
},
"kind": "table",
"explains": "the chance of decline",
"target_label": "decline",
"measure": "chance",
"unit": null,
"adds_up": true,
"base_value": 0.4904096039702106,
"value": 0.5946779284704223,
"total": 0.10426832450021173,
"summary": "Together the inputs raise the chance of decline by 10.4 percentage points, from the starting point of 49.0% to this case's 59.5%.",
"options": {
"seed": 0,
"counterfactual": true,
"frozen_features": ["age"],
"top_k": 100,
"exact": true,
"background_rows": 64,
"background_source": "reference_data"
},
"requested_by": {
"name": "Riley Counsel",
"role": "reviewer"
},
"parts": false
},
"factors": [
{
"rank": 1,
"feature": "debt_to_income",
"label": "Total monthly debt / monthly income",
"value": 0.38,
"display": "0.38",
"attribution": 0.07970604262568466,
"share": 0.2107,
"direction": "raises",
"sentence": "Total monthly debt / monthly income (0.38) raised the chance of decline by 8.0 percentage points."
},
{
"rank": 2,
"feature": "num_delinquencies",
"label": "Delinquencies in the last 24 months",
"value": 1,
"display": "1",
"attribution": 0.07483986997713922,
"share": 0.1978,
"direction": "raises",
"sentence": "Delinquencies in the last 24 months (1) raised the chance of decline by 7.5 percentage points."
},
…
],
"counterfactual": {
"found": true,
"changes": [
{
"feature": "credit_score",
"label": "Bureau credit score",
"from": 681,
"to": 850,
"from_display": "681",
"to_display": "850"
}
],
"frozen_features": ["age"],
"output_before": 0.5946779284704223,
"output_after": 0.08338468266207734,
"target": {"kind": "flip_decision", "threshold": 0.5},
"note": "This is a property of the model, not advice: the change found may be unrealistic, and the inputs held fixed are a choice.",
"label_after": "approve",
"sentence": "Changing bureau credit score from 681 to 850 would move the chance of decline from 59.5% to 8.3%, which makes the outcome approve. Held fixed in the search: applicant age."
},
"view": null,
"policy": {
"outcome": "declined",
"decided_by": "rule",
"rules": [
{
"name": "Score cut-off",
"kind": "cutoff",
"applied": true,
"detail": "Decline when the chance of decline is 50% or more",
"effect": "declined",
"kind_name": "Cut-off",
"sentence": "Cut-off “Score cut-off” applied: Decline when the chance of decline is 50% or more. Its effect: declined."
},
{
"name": "Recent bankruptcy",
"kind": "overlay",
"applied": false,
"kind_name": "Overlay rule",
"sentence": "Overlay rule “Recent bankruptcy” was checked and did not apply."
}
],
"note": null,
"revision": 1,
"recorded_by": {
"type": "user",
"name": "Dana Lee",
"role": "member"
},
"recorded_at": "2026-10-31T22:41:02.330118Z",
"amended_at": null,
"sentences": [
"The decision recorded for this case is “declined”. It was set by a rule applied outside the model.",
"Cut-off “Score cut-off” applied: Decline when the chance of decline is 50% or more. Its effect: declined.",
"Overlay rule “Recent bankruptcy” was checked and did not apply."
],
"reasons": [],
"stated": "These rules were applied outside Kaimei, which did not see or check them. They are stated as they were recorded. The effects in this record explain the model's answer, not the rules."
},
"holds": [],
"history": [
{
"at": "2026-10-31T22:40:23.801563Z",
"action": "decision.explained",
"by": "Riley Counsel ([email protected])",
"summary": "Had the decision “APP-2026-00417” explained."
},
{
"at": "2026-10-31T22:41:02.330118Z",
"action": "decision.policy_recorded",
"by": "Dana Lee ([email protected])",
"summary": "Recorded what was decided for “APP-2026-00417”: declined."
}
],
"notes": [],
"limits": [
{
"title": "It describes the model, not the world.",
"text": "It shows how the model reached its output. On its own it does not show that the decision was fair, lawful or correct."
},
…
],
"notice": "This record states what Kaimei stored and computed. It can support a compliance process; it does not make a decision, a notice or a filing compliant, and it is not legal advice.",
"other_explanations": [],
"logged_output": null,
"fingerprint": {
"algorithm": "sha256",
"value": "7a79a3b2e04d5f63ab18c34be10963bf138f5ef023c0e710c1309c04cc546fea",
"covers": "The decision id, the model and its version, the logged input, output and time, and the explanation's method, options and numbers."
}
}#List decisions
/v1/decisionsAPI key or sessionLogged decisions in your organization, newest first, each with whether an explanation is stored for it.
Query parameters
Model id or slug.
Part of a decision id, up to 64 characters. Matched anywhere in the id, whatever its case.
true for decisions with an explanation, false for those without.1 to 200.
Returns
{id, model_id, decided_at, source, outcome, explained, explanations, explained_at, has_actual}.# which decisions of this model still have no explanation?
for decision in client.decisions.iterate(model="credit-risk-v3", explained=False):
print(decision.id, decision.outcome.get("label"))curl "https://api.kaimei.ai/v1/decisions?q=APP-2026&explained=true" \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "list",
"data": [
{
"object": "decision",
"id": "APP-2026-00417",
"model_id": "mdl_390bd6d9568f626851ef",
"decided_at": "2026-10-31T22:40:23.512004Z",
"source": "api",
"outcome": {
"label": "decline",
"value": 0.594729,
"probability": 0.594729,
"name": "decision",
"target_label": "decline"
},
"explained": true,
"explanations": 1,
"explained_at": "2026-10-31T22:40:23.801563Z",
"has_actual": false
},
…
],
"total": 3,
"limit": 20,
"offset": 0,
"has_more": true
}#Record what was decided
/v1/decisions/{decision_id}/policyAPI key or sessionRecord beside a logged decision what was finally decided and the rules applied outside the model: a cut-off that turned the model's number into an outcome, an overlay rule that decided whatever the model said, a person's review. The decision's record then states them, in a sentence each, as you recorded them. Kaimei does not apply or check these rules.
Calling it again amends what was recorded and adds one to revision; sending the same thing twice changes nothing. The audit log keeps each change with who made it. Members, reviewers, admins and owners may record it. 404 decision_not_found when nothing is logged under the id.
Path parameters
The id the prediction was logged under.
Body parameters
What was decided, in your own word: declined, approved, referred. Up to 120 characters.
Up to 20 rules, each {name, kind, applied, detail, effect, reason, by}. kind is cutoff, overlay, manual or other. applied (default true) says whether it applied to this case: a rule that was checked and did not apply is stated too. detail is the rule in a sentence, or what a review concluded; effect what it did to the decision; reason the reason to give the person when the rule decided against them; by who reviewed, by role or name.
model, rule or person. Left out, it is person when a manual review applied, rule when an applied rule has an effect, and model otherwise.Up to 1,000 characters.
Returns
policy.record = client.decisions.record_policy(
"APP-2026-00417",
outcome="declined",
rules=[
{"name": "Score cut-off", "kind": "cutoff",
"detail": "Decline when the chance of decline is 50% or more", "effect": "declined"},
{"name": "Recent bankruptcy", "kind": "overlay", "applied": False},
],
)
for sentence in record.policy.sentences:
print(sentence)curl -X PUT https://api.kaimei.ai/v1/decisions/APP-2026-00417/policy \
-H "Authorization: Bearer $KAIMEI_API_KEY" \
-H "Content-Type: application/json" \
-d '{'outcome': 'declined', 'rules': [{'name': 'Score cut-off', 'kind': 'cutoff', 'detail': 'Decline when the chance of decline is 50% or more', 'effect': 'declined'}, {'name': 'Recent bankruptcy', 'kind': 'overlay', 'applied': False}]}'{
"outcome": "declined",
"decided_by": "rule",
"rules": [
{
"name": "Score cut-off",
"kind": "cutoff",
"applied": true,
"detail": "Decline when the chance of decline is 50% or more",
"effect": "declined",
"kind_name": "Cut-off",
"sentence": "Cut-off “Score cut-off” applied: Decline when the chance of decline is 50% or more. Its effect: declined."
},
{
"name": "Recent bankruptcy",
"kind": "overlay",
"applied": false,
"kind_name": "Overlay rule",
"sentence": "Overlay rule “Recent bankruptcy” was checked and did not apply."
}
],
"note": null,
"revision": 1,
"recorded_by": {
"type": "user",
"name": "Dana Lee",
"role": "member"
},
"recorded_at": "2026-10-31T22:41:02.330118Z",
"amended_at": null,
"sentences": [
"The decision recorded for this case is “declined”. It was set by a rule applied outside the model.",
"Cut-off “Score cut-off” applied: Decline when the chance of decline is 50% or more. Its effect: declined.",
"Overlay rule “Recent bankruptcy” was checked and did not apply."
],
"reasons": [],
"stated": "These rules were applied outside Kaimei, which did not see or check them. They are stated as they were recorded. The effects in this record explain the model's answer, not the rules."
}#Remove what was recorded as decided
/v1/decisions/{decision_id}/policyAPI key or sessionRemove what was recorded. The record goes back to the model's part alone, and the audit log keeps what was removed and by whom. 404 policy_not_found when nothing is recorded.
Path parameters
The id the prediction was logged under.
Returns
policy: null.client.decisions.remove_policy("APP-2026-00417")curl -X DELETE https://api.kaimei.ai/v1/decisions/APP-2026-00417/policy \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "decision_record",
"id": "APP-2026-00417",
"policy": null,
…: …
}#Delete a decision
/v1/decisions/{decision_id}API key or sessionDelete a logged decision with every explanation of it and what was recorded as decided. This cannot be undone. Use it for an erasure request, or to remove something logged by mistake; to delete records by age, set a retention period.
The audit log keeps that it was deleted, by whom, the reason you give, when it was logged, and the fingerprint its record had, so a copy filed earlier can still be matched to it. Nothing else of it is kept.
409 record_held when a hold covers the decision or every record of its model. Members, admins and owners may delete; a viewer or reviewer gets 403 read_only_role. A decision deleted in the month it was logged still counts toward that month's plan limits.
Path parameters
The id the prediction was logged under.
Query parameters
Why, for the audit log. Up to 300 characters.
Returns
{object: "decision", id, deleted: true, explanations}, with how many explanations were deleted with it.client.decisions.delete("APP-2026-00420", reason="Erasure request ER-2026-031")curl -X DELETE "https://api.kaimei.ai/v1/decisions/APP-2026-00420?reason=Erasure%20request%20ER-2026-031" \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "decision",
"id": "APP-2026-00420",
"deleted": true,
"explanations": 1
}