- create - Create moderation
Create moderation
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 |
|---|---|---|---|
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 |
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.APIError | 4XX, 5XX | */* |