Classify a batch
Return a Firewall decision for each independent event in input order.
texts. For conversation-aware checks, use ordered single-event requests with the same metadata.conversationId. Batch classification neither reads nor updates conversation history.
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. results holds one decision per text, in input order. Enforce on the action of every item before consuming it.
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.
review to standard. The first item is allowed and the second is a model block.
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 decisions
HTTP200 returns one decision per item. 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.
Review selection applies to the entire batch. When the request sets review, the response carries the same value in a top-level review field beside results. The field is absent otherwise, and decisions carry no review field.Body
Independent events, at most 100 per request. Input-size limits depend on your deployment.
1 - 100 elements1One metadata object or null per text. Length must match texts.
JSON metadata for this event. SDKs add request identity under silmaril. A conversationId connects ordered single-event calls when conversation history is supported. Batch metadata does not connect events into a sequence.
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.
standard, deep "deep"
Response
One decision per text in the results array, in input order. Block decisions still return HTTP 200.