Skip to main content
POST
Run All Tests

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

Body for run-all (where custom_prompt is ignored) and run-custom.

target_preset names the policy to test. A composed "use_case:strictness" pair is used as given; a bare use case means that use case at moderate strictness; a bare strictness level means the default use case at that strictness -- so the wire default "default" is default:moderate and "strict" is default:strict. The vocabularies are the ones served by GET /dashboard/presets/use-cases and GET /dashboard/presets/strictness-levels. Anything else is a 400 that lists the valid composed names; it used to be silently substituted with the default engine, which made every preset selector a no-op.

custom_prompt
string | null
target_preset
string
default:default

Policy to test: 'use_case:strictness', a bare use case (moderate strictness), or a bare strictness level (default use case). Unknown names are rejected with 400 invalid_preset.

Response

Successful Response

The whole corpus, plus the block rate that is the headline number.

total_tests
integer
required
blocked
integer
required
allowed
integer
required
block_rate
number
required

blocked / total_tests over COMPLETED probes; 0.0 for an empty corpus, never a divide-by-zero. Errored probes are excluded from total_tests.

results
TestResponse · object[]
required
errored_count
integer
default:0

Probes the engine could not complete (the evaluator raised). Excluded from total_tests and the block rate; a CI caller can fail on this to catch 'the scan did not complete' rather than mistaking it for a pass.

report_version
integer
default:2

Which arithmetic produced block_rate. 2: errored probes are reported in errored_count and excluded from the rate. 1 (never sent; before 2026-09-03) graded evaluator exceptions by their message text.