跳转到主要内容
POST
Create Moderation

授权

Authorization
string
header
必填

Gateway-issued API key, formatted as sk-gateway-xxxxxxxx. Used by OpenAI-shaped endpoints (/v1/chat/completions, etc.).

请求体

application/json
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.

示例:

"I want to kill them."

model
默认值:omni-moderation-latest

The content moderation model you would like to use. Learn more in the moderation guide, and learn about available models here.

示例:

"omni-moderation-2024-09-26"

响应

OK

Represents if a given text input is potentially harmful.

id
string
必填

The unique identifier for the moderation request.

model
string
必填

The model used to generate the moderation results.

results
object[]
必填

A list of moderation objects.