加载接口文档…
47
累计调用
169ms
平均响应
100.00%
服务可用性
100 次/日
免费额度
复制文档地址
https://apizero.cn/aidocs/text-censor/raw.md匿名每日 30 次、QPS 2;登录用户每日 100 次、QPS 5(全部免费)。命中 1 小时缓存(按 sha256 文本哈希)不计入服务配额。
| 名称 | 类型 | 说明 |
|---|---|---|
| text | string | 必填 · 待审核文本,1-5000 个字符(中英文均按 1 字符计) · 示例:今天天气不错,适合出门散步。 |
| 名称 | 类型 | 说明 |
|---|---|---|
| Authorization | string | 可选 · 推荐:Bearer <API Key>。兼容请求头 X-API-Key,以及 Query api_key / apikey / key(key 仅当值为 sk_live_/sk_test_/sk_stag_ 形态时生效)。匿名可不传,受每日免费额度限制。 |
| Content-Type | string | 可选 · 支持 application/x-www-form-urlencoded 或 application/json |
| 名称 | 类型 | 说明 |
|---|---|---|
| text | string | 回传待审核的文本原文 |
| text_length | number | 文本字符长度(mb_strlen,中英文均按 1 字符计) |
| conclusion | string | 审核结论文字描述:合规 / 不合规 / 疑似 / 审核失败 |
| conclusion_type | number | 审核结论数字编码:1=合规 / 2=不合规 / 3=疑似 / 4=审核失败 |
| is_compliant | boolean | 便捷判断:是否完全合规(仅 conclusion_type=1 时为 true) |
| is_suspected | boolean | 便捷判断:是否疑似违规(conclusion_type=3,建议人工复核) |
| violation_count | number | 命中违规条数;合规时为 0 |
| violation_categories | string[] | 命中违规类别列表(去重),如 ["政治","谩骂"];合规时为空数组 |
| violations | string[] | 命中触发词列表(去重);合规时为空数组 |
| details | object[] | 违规命中明细数组;合规时为空数组 |
| details[].category | string | 违规类别,如 政治 / 谩骂 / 色情 / 违规广告 / 暴恐 / 低俗 |
| details[].level | number? | 违规等级编号(服务分级,无明确取值标准,建议结合 category 使用) |
| details[].word | string | 触发的具体词语 |
| details[].msg | string | 违规详细说明,如「存在政治内容不合规」 |
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn |
{
"code": 0,
"msg": "成功",
"data": {
"text": "法轮功是邪教组织",
"text_length": 8,
"conclusion": "不合规",
"conclusion_type": 2,
"is_compliant": false,
"is_suspected": false,
"violation_count": 2,
"violation_categories": [
"政治"
],
"violations": [
"法轮功",
"邪教"
],
"details": [
{
"category": "政治",
"level": 3,
"word": "法轮功",
"msg": "存在政治内容不合规"
},
{
"category": "政治",
"level": 3,
"word": "邪教",
"msg": "存在政治内容不合规"
}
]
},
"request_id": "abc123def456",
"tips": "极数本源 · https://apizero.cn"
}本接口文本审核服务(基于百度内容审核云)。审核结果仅供参考,疑似类(is_suspected=true)建议人工复核。敏感词库实时更新,相同文本在不同时间点可能得到不同结论。请根据业务场景结合 violation_categories 和 level 等级综合判断,不要仅凭 is_compliant 字段做最终决策。