headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
content:待检测的文本内容,最大长度不超过 10000 字。type:检测类型,固定为 “text”。model:指定检测模型,默认为 “zhque-ai-detect-v1”。sensitive:敏感度调整,取值 0-1(0 为宽松,1 为严格)。import requests
url = "https://api.matrix.tencent.com/ai-detect/text"
api_key = "YOUR_API_KEY"
text = "这是一段待检测的文本内容。"
payload = {
"content": text,
"type": "text",
"sensitive": 0.8
}
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
result = response.json()
print("AI生成概率:", result["probability"])
print("检测结果:", "AI生成" if result["is_ai"] else "人工创作")
{
"code": ,
"message": "success",
"data": {
"probability": 0.92,
"is_ai": true,
"model": "gpt-4"
}
}
probability:AI 生成概率,取值 0-1。is_ai:是否为 AI 生成(true/false)。model:推测的生成模型(如 gpt-4、midjourney 等)。image:待检测的图片文件,支持 JPG、PNG 格式,大小不超过 5MB。type:检测类型,固定为 “image”。mode:检测模式,“normal”(常规)或 “strict”(严格)。import requests
url = "https://api.matrix.tencent.com/ai-detect/image"
api_key = "YOUR_API_KEY"
image_path = "test.jpg"
with open(image_path, "rb") as f:
files = {"image": f}
headers = {
"Authorization": f"Bearer {api_key}"
}
response = requests.post(url, files=files, headers=headers)
result = response.json()
print("AI生成概率:", result["probability"])
print("检测结果:", "AI生成" if result["is_ai"] else "人工创作")
{
"code": ,
"message": "success",
"data": {
"probability": 0.86,
"is_ai": true,
"model": "midjourney-v5"
}
}
401 Unauthorized:API 密钥无效或未提供。429 Too Many Requests:超出每日免费额度,需升级套餐。500 Internal Server Error:服务器内部错误,重试或联系技术支持。import requests
from tenacity import retry, stop_after_attempt, wait_exponential
@retry(stop=stop_after_attempt(), wait=wait_exponential(multiplier=, min=, max=))
def call_api(url, payload, headers):
response = requests.post(url, json=payload, headers=headers)
response.raise_for_status()
return response.json()
sensitive参数,平衡准确性和误判率。🔍 如何选择比朱雀更好的 AI 检测工具?专家指南 在内容创作领域,AI 检测工具已经成为确保原创性和合规性的重要助手。腾讯的朱雀 AI 检测凭借其在中文内容检测方面的优势,赢得了不少用户的青睐。但
刚接触 AI 排版的新手,面对市面上五花八门的工具,是不是有点眼花缭乱?不知道该选哪个才好。别着急,今天就来给大家好好盘点几款常用的 AI 排版工具,把它们的优缺点一条条列清楚,看完你肯定能找到适合自
蹭热点确实能给公众号带来流量,但要是把握不好分寸,就容易踩坑。就像广东江门那个公众号,为了吸引流量,把其他地方的交通事故视频说成是本地的,结果被公安处罚了。这种为了蹭热点编造信息的做法,不仅损害了公众
🔔名誉权雷区:别让 “爆料” 变成 “被告” 做娱乐八卦公众号的都知道,流量密码往往藏在明星隐私和绯闻里。但你知道吗?随便一个 “据知情人士透露” 就可能让你吃上官司。之前有个公众号发了篇 “某顶流