Firewall
Classify an event
Return a Firewall decision for one complete event.
POST
Send one complete event in
text. For multiple independent events, use batch classification.
The request body is the same as in version 1. The request URL is your provisioned SILMARIL_API_URL with the final /classify replaced by /v2/classify. Each example derives it. Read the decision from the single item in results and enforce on its action.
Choose cURL, TypeScript, JavaScript, Python, Go, or Java in the request examples. They use standard HTTP libraries. The Java example requires Java 17 or later.
results is always an array, and a single event returns one decision in it. Every key of a decision is always present and is null when empty. Ignore fields you do not recognize.
model_id identifies the model release that classified the item. Record it for provenance. Do not enforce on it.
Handle the decision
HTTP200 returns a decision. action is the only field to enforce on: treat any value other than allow as a block. In Block mode, stop a blocked event. In Warn or Shadow mode, record the would-block decision and continue.
Handle request failures with your application’s error policy. Error status codes and bodies are the same as in version 1. See modes and enforcement for the full decision model.
Read a block
source names who decided a block: model or governance. It is model when both block. outcome is the predicted harm on a model block that has one.
confidence and severity describe the Firewall’s assessment of the item, and are set only when that assessment is the reason for the block. They are null on an allow, on a block that came from a governance policy, and on a block the Firewall reached without that assessment.
Optional review depth
The optional top-levelreview field accepts standard or deep. See review depth for requirements and selection behavior.
When the request sets review, the response carries the same value in a top-level review field beside results. The field is absent otherwise.
Body
application/json
One complete event to classify. Input-size limits depend on your deployment.
Minimum string length:
1Example:
"Summarize this release note."
Optional request-wide review selection. standard selects standard review. deep requests an additional review of eligible potentially harmful events when available on your deployment. An event may complete without additional review. Omit review to inherit the deployment default. Review depth is independent of enforcement mode.
Available options:
standard, deep Example:
"deep"
Response
A results array holding the decision for the event. A block decision still returns HTTP 200.