Skip to main content
POST
/
v1
/
moderations
curl -X POST https://www.geeknow.top/v1/moderations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "omni-moderation-latest",
    "input": "这是一段需要进行安全审核的用户输入。"
  }'
{
  "id": "modr_abc123",
  "model": "omni-moderation-latest",
  "results": [
    {
      "flagged": false,
      "categories": {
        "hate": false,
        "harassment": false,
        "self-harm": false,
        "sexual": false,
        "violence": false
      },
      "category_scores": {
        "hate": 0.0001,
        "harassment": 0.0002,
        "self-harm": 0.0001,
        "sexual": 0.0001,
        "violence": 0.0003
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://mercury-eab3b728.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

内容审核接口

内容审核接口用于检测文本或多模态输入中的安全风险。它沿用 OpenAI Moderations 兼容路径,实际返回字段取决于上游模型。

请求体

model
string
审核模型名称。省略时由渠道配置或上游默认值决定。
input
string | array
required
待审核内容。可传单条字符串、字符串数组或上游兼容的结构化输入。

请求示例

curl -X POST https://www.geeknow.top/v1/moderations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "omni-moderation-latest",
    "input": "这是一段需要进行安全审核的用户输入。"
  }'

响应示例

{
  "id": "modr_abc123",
  "model": "omni-moderation-latest",
  "results": [
    {
      "flagged": false,
      "categories": {
        "hate": false,
        "harassment": false,
        "self-harm": false,
        "sexual": false,
        "violence": false
      },
      "category_scores": {
        "hate": 0.0001,
        "harassment": 0.0002,
        "self-harm": 0.0001,
        "sexual": 0.0001,
        "violence": 0.0003
      }
    }
  ]
}

相关接口