action openai_create_moderation { label: "Classifies if text violates OpenAI's Content Policy" provider: openai method: POST path: "/moderations" encoding: json input: { type: "object" required: ["input"] properties: { input: { description: "The input text to classify" type: "object" } model: { type: "string" description: "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.\n" } } } output: { type: "object" required: ["id", "model", "results"] properties: { id: { type: "string" } model: { type: "string" } results: { type: "array" items: { type: "object" required: ["flagged", "categories", "category_scores"] properties: { categories: { type: "object" required: ["hate", "hate/threatening", "self-harm", "sexual", "sexual/minors", "violence", "violence/graphic"] properties: { hate: { type: "boolean" } "hate/threatening": { type: "boolean" } "self-harm": { type: "boolean" } sexual: { type: "boolean" } "sexual/minors": { type: "boolean" } violence: { type: "boolean" } "violence/graphic": { type: "boolean" } } } category_scores: { type: "object" required: ["hate", "hate/threatening", "self-harm", "sexual", "sexual/minors", "violence", "violence/graphic"] properties: { hate: { type: "number" } "hate/threatening": { type: "number" } "self-harm": { type: "number" } sexual: { type: "number" } "sexual/minors": { type: "number" } violence: { type: "number" } "violence/graphic": { type: "number" } } } flagged: { type: "boolean" } } } } } } }