API

一个请求,逐句 AI 检测。

发英文文本过来,返回 AI 率和每一句的分数。适合 Agent 和程序自动调用:API 只扣充值的点数,每检测 1 个词扣 1.5 点。

鉴权

在工作台的 API 密钥里创建密钥,放在 Bearer 令牌里发送。密钥请妥善保管,随时可以停用。

检测一段文本

POST/api/v1/detect
textstring

中、英、日、韩、西、法、德、葡、意、俄、阿、印尼文本:至少 50 词,中日韩文至少 200 字,最多 5,000 点。

modestring

"document"(只给总分,点数减半)或 "sentences"(含逐句分数,每个词或每 2 个中日韩文字 1 点),API 再乘 1.5。默认 "document"。

titlestring

可选,显示在检测记录里。

curl https://wofo.ink/api/v1/detect \
  -H "Authorization: Bearer $WOFO_INK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Your English text…", "mode": "sentences"}'
import os, requests

r = requests.post(
    "https://wofo.ink/api/v1/detect",
    headers={"Authorization": f"Bearer {os.environ['WOFO_INK_KEY']}"},
    json={"text": text, "mode": "sentences"},
    timeout=300,
)
r.raise_for_status()
print(r.json()["ai_rate"])

返回

{
  "id": "6f1c…",
  "ai_rate": 64,
  "verdict": "mixed",
  "model": "Wofo Ink 2.0",
  "mode": "sentences",
  "words": 524,
  "credits_charged": 786,
  "credits_remaining": 39214,
  "sentences": [
    { "start": 0, "end": 87, "ai_rate": 12, "text": "…" },
    …
  ]
}

查 API 可用点数

GET/api/v1/balance
curl https://wofo.ink/api/v1/balance \
  -H "Authorization: Bearer $WOFO_INK_KEY"

{ "credits_remaining": 39214 }

错误

状态码错误码含义
401missing_api_key / invalid_api_key没带密钥或密钥无效。
402insufficient_credits充值的点数不够。
400too_short不到 50 个词,中日韩文也不到 200 个字。
400too_long超过 5,000 词。
400unsupported_language只支持中文、英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、意大利语、俄语、阿拉伯语和印尼语。
403account_disabled账号已停用。

限制和计费

每次至少 50 词,中日韩文至少 200 字,最多 5,000 点。逐句模式每个词或每 2 个中日韩文字 1 点,整篇模式减半,API 按 1.5 倍扣、向上取整。只扣充值买的点数,赠送和月卡的点数不能用。

第一篇,免费测。

Apple、Google 或手机号注册即送 3 万点。

免费开始