> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 内容审查（Moderations）

> 检查文本是否违反使用政策

## 简介

对输入文本进行内容安全审核，兼容 OpenAI Moderations API。面向公众服务时，审查接口仅为合规工具之一，不替代部署方自身的安全治理义务与上游内容政策；建议配合滥用举报、日志审计与处置机制使用。

## 认证

<ParamField header="Authorization" type="string" required>
  Bearer Token，如 `Bearer sk-xxxxxxxxxx`
</ParamField>

## 请求参数

<ParamField body="input" type="string | array" required>
  待审核文本，可为字符串或字符串数组
</ParamField>

<ParamField body="model" type="string">
  审核模型，如 `text-moderation-latest`
</ParamField>

## 请求示例

```bash theme={null}
curl -X POST "https://api.gravitex.ai/v1/moderations" \
  -H "Authorization: Bearer sk-xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-moderation-latest",
    "input": "需要审核的文本内容"
  }'
```

## 常用参数

* **input**：单条或多条待检文本
* **model**：审核模型 ID

响应包含 `results`，每条含 `flagged` 及各类别 `categories` 分数。详见 [OpenAI Moderations](https://platform.openai.com/docs/api-reference/moderations)。
