内容审核
post/v1/moderations
检查文本内容是否违反使用政策
鉴权
把 OLETOKEN 的 API Key 作为 Bearer Token 放进 Authorization 请求头。密钥在控制台的「API 密钥」页创建。
Authorization: Bearer $OLETOKEN_API_KEY请求体
Content-Type:application/json
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| input | string | string[] | — | |
| model | string | — | — |
响应
200成功审核
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| id | string | — | — |
| model | string | — | — |
| results | object[] | — | — |
| flagged | boolean | — | — |
| categories | object | — | — |
| category_scores | object | — | — |
请求示例
curl -X POST 'https://api.oletoken.ai/v1/moderations' \
-H "Authorization: Bearer $OLETOKEN_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"input": "string"
}'
