Skip to navigation

Check prompt injection

Beta
Learn whether prompt injection protection would block each text, without calling a model.

Authentication

AuthorizationBearer
Your production key sent as a bearer token.

Request

This endpoint expects an object.
inputstring or list of stringsRequired
Text to check, or a list of 1 to 50 texts. Each text can be up to 10,000 characters and is checked on its own. Empty or blank text returns 422.
customerstring or nullOptional
Optional customer UUID whose prompt injection settings to apply

Response

Successful Response
modestring

Your organization’s current prompt injection mode (off, alert or block), for reference. would_block answers as block mode whatever this is.

block_thresholddouble
The score at or above which a text is blocked
resultslist of objects
One result per input, in the order you sent them

Errors

422
Unprocessable Entity Error