Skip to main content
POST
/
api
/
v1
/
proxy
/
redteam
/
test-all
Run All Tests
curl --request POST \
  --url https://api.promptguard.dev/api/v1/proxy/redteam/test-all \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "custom_prompt": "<string>",
  "target_preset": "default"
}
'
{
  "total_tests": 123,
  "blocked": 123,
  "allowed": 123,
  "block_rate": 123,
  "results": [
    {
      "test_name": "<string>",
      "prompt": "<string>",
      "decision": "<string>",
      "reason": "<string>",
      "threat_type": "<string>",
      "confidence": 123,
      "blocked": true,
      "details": {}
    }
  ]
}

Authorizations

X-API-Key
string
header
required

PromptGuard API key for developer endpoints. Keys start with pg_live_ and are created in the dashboard.

Body

application/json

Request to run a red team test

custom_prompt
string | null
target_preset
string
default:default

Response

Successful Response

Summary of all red team tests

total_tests
integer
required
blocked
integer
required
allowed
integer
required
block_rate
number
required
results
TestResponse · object[]
required