Skip to main content
POST
Send independent events in texts. For conversation-aware checks, use ordered single-event requests with the same metadata.conversationId. Batch classification neither reads nor updates conversation history. Use your provisioned SILMARIL_API_URL as the full request URL. Inspect prediction and optional governance.action for every item in predictions 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.
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. Review selection applies to the entire batch and is acknowledged on the batch envelope.

Authorizations

x-api-key
string
header
required

API key provisioned for your deployment.

Body

application/json
texts
string[]
required

Independent events. Batch and input-size limits depend on your deployment.

Minimum array length: 1
Minimum string length: 1
hooks
enum<string>[]

One hook per text, in input order. Length must match texts.

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

Available options:
user_input,
system_prompt,
tool_call,
tool_response,
llm_output,
unknown
tool_names
(string | null)[]

One tool name or null per text. Length must match texts.

metadata
(object | null)[]

One 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.

resources
(object | null)[]

One concrete resource or null per text, where supported. Length must match texts.

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, where supported by the deployment.

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 per text in the predictions array, in input order. Malicious or governance-blocked items still return HTTP 200.

predictions
Single verdict · object[]
required

One verdict per text, in input order. Prediction-item fields do not acknowledge the batch selection; use the batch envelope's review field for that acknowledgement.

review
enum<string>

Authoritative batch-envelope acknowledgement present only when the request explicitly selected review. It applies to the entire request; prediction-item fields do not acknowledge the batch selection. It confirms the applied setting. An event may complete without additional review.

Available options:
standard,
deep
Example:

"deep"