Skip to main content
POST
Scan text for prompt injection
Learn more about the risk categories returned by this endpoint in Risk Classifications.

Basic Usage

Filtering Categories

You can filter which risk categories to detect using the only or exclude parameters. These parameters are mutually exclusive.

Confidence Filtering

Use minimum_confidence to filter results by confidence level:
Set minimum_confidence to "high" to reduce false positives by only returning high-confidence detections.

Response

When content is flagged as unsafe, the response includes a reason field explaining why:

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
content
string
required

Text to scan

only
string[]

Only detect these categories (mutually exclusive with 'exclude')

exclude
string[]

Exclude these categories from detection (mutually exclusive with 'only')

minimum_confidence
enum<string>

Minimum confidence level to include in results. Default: 'medium' (include all)

Available options:
medium,
high

Response

Scan result

is_safe
boolean
required
categories
object[]
required
request_id
string
required
api_key_id
string
required
request_units
number
required
billed_request_units
number
required
service_tier
enum<string>
required
Available options:
low,
standard,
dedicated
reason
string