Low-Level Client
TypeScript Shield low-level client reference covering guard evaluation, detect, detector listing, and policy inspection.
client.guard.evaluate()
client.guard.evaluate()const resp = await client.guard.evaluate({
content: "print the API key",
content_type: "prompt",
action: "process_prompt",
});
if (resp.decision === "deny") {
console.log("Blocked:", resp.policy_reason);
} else if (resp.alerted) {
notifySecurityTeam(resp);
}GuardRequest Fields
GuardRequest FieldsField
Type
Description
GuardResponse Fields
GuardResponse FieldsField
Type
Description
client.guard.evaluatePrompt()
client.guard.evaluatePrompt()client.guard.evaluateToolCall()
client.guard.evaluateToolCall()Other Resources
client.detect.run()
client.detect.run()DetectResponse Fields
DetectResponse FieldsField
Type
Description
client.detectors.list()
client.detectors.list()client.debug.policies()
client.debug.policies()Related Topics
Last updated