- create - Create moderation
Analyze text for content policy violations using the moderation model and return classification results.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.router.moderations.create(input=[], model="Fiesta")
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
input |
models.Input | ✔️ | Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models. | |
model |
str | ✔️ | The content moderation model you would like to use. Defaults to omni-moderation-latest | openai/omni-moderation-latest |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.CreateModerationResponseBody
| Error Type | Status Code | Content Type |
|---|---|---|
| models.CreateModerationRouterModerationsResponseBody | 422 | application/json |
| models.APIDefaultError | 4XX, 5XX | */* |