Skip to main content
POST
Send one complete event in text. For multiple independent events, use batch classification. Use your provisioned SILMARIL_API_URL as the full request URL. Inspect prediction and optional governance.action before consuming the event. 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.
A high confidence score can accompany BENIGN. See confidence scores for interpretation and threshold behavior.

Handle the verdict

HTTP 200 returns a classification. In Block mode, stop an event when prediction is MALICIOUS or governance.action is block. In Warn or Shadow mode, record the would-block decision and continue. Handle request failures with your application’s error policy. See modes and enforcement for the full decision model.

Optional review depth

The optional top-level review field accepts standard or deep. See review depth for requirements, selection behavior, and acknowledgement rules.

Authorizations

x-api-key
string
header
required

API key provisioned for your deployment.

Body

application/json
text
string
required

One complete event to classify. Input-size limits depend on your deployment.

Minimum string length: 1
Example:

"Summarize this release note."

hook
enum<string>

Boundary being checked. Use the SDK hook labels shown here.

Available options:
user_input,
system_prompt,
tool_call,
tool_response,
llm_output,
unknown
Example:

"user_input"

tool_name
string

Tool name when checking a tool call or tool response.

Example:

"read_file"

metadata
object

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.

resource
object

Concrete governance resource, where supported. id must not be blank. mcp_tool requires parent_id; other resource kinds must omit parent_id.

identity_revision
string

Resource-catalog revision for deployments supporting concrete governance identities.

Minimum string length: 1
review
enum<string>

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"

threshold
number
Legacy

Scoring override for older deployments. Current deployments use their configured decision policy. Use the returned prediction as the verdict.

Required range: 0 <= x <= 1
temperature
number
Legacy

Score calibration for legacy runtimes. Support depends on your deployment.

Required range: 0.01 <= x <= 10

Response

One verdict. A malicious or governance-blocked result still returns HTTP 200.

prediction
enum<string>
required

Authoritative verdict. Also check governance.action when present.

Available options:
BENIGN,
MALICIOUS
score
number
required

Score from 0 to 1 expressing confidence in the model assessment as harmful, safe, or uncertain. A high-confidence safe assessment can return BENIGN. Where present, malicious_score is an alias. Route on prediction and applicable governance.action. See confidence scores.

Required range: 0 <= x <= 1
threshold
number
required

Threshold reported by the deployment. The configured confidence threshold applies to potentially harmful events with available confidence, using the value before display rounding; equality passes. Your policy determines how results below the threshold are handled. See confidence scores.

Required range: 0 <= x <= 1
primary_outcome
string

Optional forward-compatible outcome detail. The examples are known legacy labels, not a closed enum. Prediction remains authoritative; a missing or unknown malicious outcome should be blocked by default in Block mode.

Examples:

"benign"

"information_disclosure"

"secret_exposure"

"control_abuse"

"system_compromise"

"service_disruption"

outcome_scores
object

Optional scores keyed by harmful outcome. Available keys depend on the deployment.

detector_scores
object

Optional scores keyed by harmful outcome. Available keys depend on the deployment.

detector_counts
object

Optional detection counts keyed by harmful outcome.

governance
object

Optional governance decision. Older deployments may omit this field.

review
enum<string>

On a single response, this top-level field acknowledges an explicit request selection. Within a batch prediction, this field is not the batch acknowledgement; use BatchResponse.review. It confirms the applied setting. An event may complete without additional review.

Available options:
standard,
deep
Example:

"deep"