Hierarchy

  • AIGuardApi

Constructors

Properties

configuration: Configuration
requestFactory: AIGuardApiRequestFactory
responseProcessor: AIGuardApiResponseProcessor

Methods

  • Analyzes a conversation for security threats such as prompt injection, jailbreak attempts, and other AI-specific attacks. Returns an action recommendation (ALLOW, DENY, or ABORT) along with the detected threat tags and their confidence scores. AI Guard must be activated for the organization, and the calling user or application key requires the ai_guard_evaluate permission. The action is a recommendation for the caller to enforce: ALLOW permits the interaction, DENY blocks the interaction, and ABORT terminates the workflow. This endpoint is rate limited to 700 requests per minute per organization. Organization token limits can also result in a 429 response. Malformed messages return a 400 response. Requests exceeding the raw-input limit of 1,000,000 tokens return a 413 response; this limit applies to the input context, not only the size of the HTTP request body.

    Parameters

    Returns Promise<AIGuardEvaluateResponse>

Generated using TypeDoc