Test a moderation policy
test_policyRuns example messages against an Advanced mode policy and says which would be flagged, with a score and reason for each. Send a draft policy to try changes before saving them; leave it out to test the saved policy. Mark each example with expect "flag" or "pass" and the summary counts how many came back as expected. The project's word rules run first, as they do live. Nothing is stored. No credits are used, except on a free test key from create_test_api_key, where each message checked counts toward its 100 free messages. Up to 50 examples per call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"api_key": "<api_key>",
"examples": "<examples>"
},
"name": "test_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | No | Draft policy in plain English, up to 1,000 characters. Leave out to test the saved policy. | |
| api_key | Yes | Paxmod API key for the project. | |
| examples | Yes | Messages to test, up to 50. | |
| threshold | No | Flag above this score, 0 to 1. Leave out to use the project's setting. |