check_content()
Scans a string of text against a specified or client-default policy. This is the primary method used by the platform’s tracing and guardrail system and is recommended for flexible, ad-hoc scans.
Signature:
| Parameter | Type | Default | Description |
|---|---|---|---|
content | str | (none) | Required. The text content to scan. |
node_subtype | Optional[NodeSubTypeEnum] | GUARDRAILS | Platform Tier Only. Specifies the subtype of the node being checked for more granular tracing. |
name | Optional[str] | "Policy Validation" | Platform Tier Only. A descriptive name for the check, which appears in the platform observability logs. |
policies | Optional[Policy] | None | A Policy object that, if provided, will be used for this scan instead of any default policy configured on the client. |
session_id | Optional[str] | None | Platform Tier Only. A Session ID that, if provided, overrides the client’s default session_id for this single scan. |
node_metadata | Optional[Dict[str, Any]] | None | Platform Tier Only. Custom metadata to attach to the trace span for this specific check. |
save | Optional[bool] | None | Platform Tier Only. A boolean that, if provided, overrides the client’s default save behavior for this single scan. |
ApiResult object detailing the scan results.
check_prompt()
A specialized method that scans a user-generated prompt against the active policy. The active policy is determined by the policy override parameter if provided; otherwise, it falls back to the client’s default policy.
Signature:
| Parameter | Type | Default | Description |
|---|---|---|---|
prompt | str | (none) | Required. The user-generated prompt text to scan. |
policy | Optional[Policy] | None | A Policy object that, if provided, will be used for this scan instead of any default policy configured on the client. |
asset_id | Optional[str] | None | Platform Tier Only. An Asset ID that, if provided, overrides the client’s default asset_id for this single scan. |
session_id | Optional[str] | None | Platform Tier Only. A Session ID that, if provided, overrides the client’s default session_id for this single scan. |
save | Optional[bool] | None | Platform Tier Only. A boolean that, if provided, overrides the client’s default save behavior for this single scan. |
ApiResult object detailing the scan results.
check_response()
A specialized method that scans an LLM-generated response against the active policy. The active policy is determined by the policy override parameter if provided; otherwise, it falls back to the client’s default policy.
Signature:
| Parameter | Type | Default | Description |
|---|---|---|---|
response | str | (none) | Required. The LLM-generated response text to scan. |
policy | Optional[Policy] | None | A Policy object that, if provided, will be used for this scan instead of any default policy configured on the client. |
asset_id | Optional[str] | None | Platform Tier Only. An Asset ID that, if provided, overrides the client’s default asset_id for this single scan. |
session_id | Optional[str] | None | Platform Tier Only. A Session ID that, if provided, overrides the client’s default session_id for this single scan. |
save | Optional[bool] | None | Platform Tier Only. A boolean that, if provided, overrides the client’s default save behavior for this single scan. |
ApiResult object detailing the scan results.

