API 文档
版本 v1 · 墨枢工坊1. 接口地址
https://human.daniu7.cn
2. 鉴权方式
所有接口都需要在请求头里传 X-API-Key,值就是你的 License 授权码(登录用的授权码,额度与你的账号共享)。
X-API-Key: QLIC-你的授权码
3. 接口列表
| 方法 | 路径 | 说明 |
|---|---|---|
| POST | /api/v1/humanize/process | 提交改写/生成任务 |
| GET | /api/v1/humanize/tasks/{task_id} | 查询任务结果 |
| GET | /api/v1/humanize/history | 历史记录(分页) |
| GET | /api/v1/quota | 查询剩余字数 |
4. 提交任务
入参说明(改写可选处理轮数和改写程度;按标题生成固定为“两轮 + 重写”,生成时后两个参数不生效):
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| article | string | 是 | 改写时传原文;生成时传标题/选题,可附金句、框架和字数要求(如“写一篇800字的文章”) |
| mode | string | 否 | rewrite 改写(默认) / generate 按标题生成 |
| quality_mode | string | 否 | 仅改写生效:fast 两轮(默认) / full 四轮;生成模式固定两轮,传了也不生效 |
| article_rewrite_mode | string | 否 | 仅改写生效:deep 深度(保留事实可重组) / rebuild 重写(默认,去 AI 效果最强);生成模式固定重写,传了也不生效 |
curl 示例:
curl -X POST https://human.daniu7.cn/api/v1/humanize/process \
-H "X-API-Key: QLIC-你的授权码" \
-H "Content-Type: application/json" \
-d '{
"article": "这是一篇需要去AI痕迹的文章。",
"mode": "rewrite",
"quality_mode": "full",
"article_rewrite_mode": "deep"
}'
Python 示例:
import requests
url = "https://human.daniu7.cn/api/v1/humanize/process"
headers = {
"X-API-Key": "QLIC-你的授权码",
"Content-Type": "application/json",
}
payload = {
"article": "这是一篇需要去AI痕迹的文章。",
"mode": "rewrite",
"quality_mode": "full",
"article_rewrite_mode": "deep",
}
resp = requests.post(url, json=payload, headers=headers, timeout=30)
data = resp.json()
print(data)
# {"task_id": "3f2b...", "status": "queued"}
按标题生成示例(固定“两轮 + 重写”,无需传处理轮数和改写程度):
curl -X POST https://human.daniu7.cn/api/v1/humanize/process \
-H "X-API-Key: QLIC-你的授权码" \
-H "Content-Type: application/json" \
-d '{
"article": "写一篇公众号创作者如何保持灵感的文章,800字",
"mode": "generate"
}'
出参示例:
{
"task_id": "3f2b1a0e9c8d4f6a9b1c2d3e4f5a6b7c",
"status": "queued"
}
5. 查询任务结果
curl https://human.daniu7.cn/api/v1/humanize/tasks/3f2b1a0e9c8d4f6a9b1c2d3e4f5a6b7c \ -H "X-API-Key: QLIC-你的授权码"
返回字段说明:
| 字段 | 说明 |
|---|---|
| task_id | 任务 ID |
| status | queued / running / done / error |
| result | 文章结构 |
{
"task_id": "3f2b1a0e9c8d4f6a9b1c2d3e4f5a6b7c",
"status": "done",
"error": null,
"char_count": 36,
"created_at": 1785750000,
"updated_at": 1785750030,
"result": "生成的文章……"
}
6. 查询剩余字数
curl https://human.daniu7.cn/api/v1/quota \ -H "X-API-Key: QLIC-你的授权码"
{
"total": 10000,
"used": 1200,
"remaining": 8800,
"unlimited": false,
"required": 0,
"unit": "chars"
}
7. 历史记录(分页)
curl "https://human.daniu7.cn/api/v1/humanize/history?limit=5&offset=0" \ -H "X-API-Key: QLIC-你的授权码"
8. 计费规则
| 模式 | 计费口径 | 最低消费 |
|---|---|---|
| 改写 | 输入字数 | 200 字 |
| 生成 | 输出中文字数 | 400 字 |
9. 错误码
| 状态码 | 说明 |
|---|---|
| 401 | 授权码/API Key 无效 |
| 403 | 未开通功能,或剩余字数不足 |
| 404 | 任务不存在 |
| 502 | 主站或模型服务异常 |