IntegrationsOpenaiActions
Create OpenAI moderation
Classify text with the OpenAI Moderations API.
moderations.create · OpenAI · v1
Details
Scopes
None
Input
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
input | string | Yes | minLength 1; maxLength 32768 |
model | string | No | minLength 1; maxLength 200 |
Output
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
id | string | No | minLength 1; maxLength 200 |
model | string | No | minLength 1; maxLength 200 |
results | array<object> | Yes | maxItems 32 |
results[] | object | Yes | additionalProperties false |
results[].flagged | boolean | Yes | — |
results[].flagged_categories | array<string> | Yes | maxItems 64 |
results[].flagged_categories[] | string | Yes | minLength 1; maxLength 100 |
Raw schema
Input
{
"type": "object",
"additionalProperties": false,
"properties": {
"input": {
"type": "string",
"minLength": 1,
"maxLength": 32768
},
"model": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"input"
]
}Output
{
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"model": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"results": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"flagged": {
"type": "boolean"
},
"flagged_categories": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"maxItems": 64
}
},
"required": [
"flagged",
"flagged_categories"
]
},
"maxItems": 32
}
},
"required": [
"results"
]
}