Skip to main content
POST
/
v2
/
evaluators
/
execute
/
prompt-injection
Execute prompt-injection evaluator
curl --request POST \
  --url https://api.traceloop.com/v2/evaluators/execute/prompt-injection \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": {
    "prompt": "What is the weather like today?"
  },
  "config": {
    "threshold": 0.5
  }
}
'
{
  "has_injection": "safe"
}

Authorizations

Authorization
string
header
required

Type "Bearer" followed by a space and JWT token.

Body

application/json

Request body

input
object
required
config
object

Response

OK

has_injection
string
Example:

"safe"