Create ruleset
Creates a new moderation ruleset with category thresholds, custom rules, and a fail mode for the organization.
Creates a new moderation ruleset with category thresholds, custom rules, and a fail mode for the organization.
Authorization
bearerAuth AuthorizationBearer <token>
API key
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/moderation/rulesets" \ -H "Authorization: Bearer $SPEECHBASE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "string"}'{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"is_default": true,
"config": {
"version": 1,
"fail_mode": "open",
"evaluators": {
"openai_moderation": {
"model": "omni-moderation-latest",
"categories": {
"sexual": null,
"sexual/minors": null,
"hate": null,
"hate/threatening": null,
"harassment": null,
"harassment/threatening": null,
"self-harm": null,
"self-harm/intent": null,
"self-harm/instructions": null,
"violence": null,
"violence/graphic": null,
"illicit": null,
"illicit/violent": null
}
},
"custom_rules": {
"model": "openai/gpt-5.4-nano",
"rules": []
}
}
},
"created_at": "string",
"updated_at": "string"
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string"
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string"
}