浏览文档
TurnitPass REST API
端点、参数、限制与错误码。
POST
/api/v1/humanize降低文本中的 AI 写作信号。模式:reduce-aigc、reduce-both、paraphrase、academic-polish。
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
text必填 | string | — | 待改写的文本。至少 3 个词单位,每次请求最多 500 质量单位。 |
language | string | en | 语言代码,如 en 或 zh。 |
mode | enum | reduce-aigc | reduce-aigc, reduce-both, paraphrase, academic-polish |
personal_terms | string[] | — | 最多 30 个需保持不变的名称或术语,每个最长 120 字符。 |
请求
{ "text": "粘贴需要修改的草稿。", "language": "zh", "mode": "reduce-aigc" }
响应
{
"output": "…",
"words_used": 142,
"words_remaining": 2858,
"usage": { "words": 142, "characters": 861 },
"metrics": { "kind": "heuristic_estimate", "aiLikeScore": 18, "naturalTone": 82, "sentenceVariety": 74, "readability": 68 }
}
POST
/api/v1/paraphrase以 standard、fluency、formal、academic、simple、creative、expand 或 shorten 模式改写文本。synonyms_level 取值 0 到 100。
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
text必填 | string | — | 待改写的文本。每次请求最多 2,000 质量单位。 |
language | string | en | 语言代码,如 en 或 zh。 |
mode | enum | standard | standard, fluency, formal, academic, simple, creative, expand, shorten |
synonyms_level | integer | 50 | 词语替换的幅度,范围 0 到 100。 |
请求
{ "text": "粘贴需要修改的草稿。", "language": "zh", "mode": "academic", "synonyms_level": 60 }
响应
{
"output": "…",
"words_used": 142,
"words_remaining": 2858,
"usage": { "words": 142, "characters": 861 }
}
POST
/api/v1/rewrite学术润色,优化结构、语气和句子衔接。
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
text必填 | string | — | 待改写的文本。至少 3 个词单位,每次请求最多 500 质量单位。 |
language | string | en | 语言代码,如 en 或 zh。 |
请求
{ "text": "粘贴需要修改的草稿。", "language": "zh" }
响应
{
"output": "…",
"words_used": 142,
"words_remaining": 2858,
"usage": { "words": 142, "characters": 861 }
}
POST
/api/v1/detect为粘贴的文本或提取的文档返回 AI 分数、写作信号和修改建议。source_kind:paste、pdf、docx 或 txt。
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
text必填 | string | — | 待检测的文本。最多 5,000 词或 30,000 字符。 |
language | string | en | 语言代码,如 en 或 zh。 |
source_kind | enum | paste | paste, pdf, docx, txt |
original_filename | string | — | 原始文件名,最长 255 字符。 |
请求
{ "text": "粘贴需要修改的草稿。", "language": "zh", "source_kind": "paste" }
响应
{
"score": 62,
"label": "…",
"risk_level": "high",
"signals": [{ "key": "…", "label": "…", "value": 0.7, "level": "medium", "detail": "…" }],
"passages": [{ "text": "…", "label": "ai", "level": "high" }],
"detection_quota": { "limit": 10, "remaining": 9, "resets_at": "2026-10-25T00:00:00Z" }
}
POST
/api/v1/citation将 DOI、URL 或手动录入的引用格式化为 22 种格式,包括 APA、MLA、Chicago、IEEE、Harvard、Nature、Vancouver、ACS、AMA、GB/T 7714、OSCOLA 和 Bluebook。响应包含 html、text、BibTeX 和 RIS。
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
input | string | — | DOI、URL 或文献标题,最长 2,000 字符。与 citation 二选一。 |
citation | object | — | 包含标题、作者和来源信息的引用对象。与 input 二选一。 |
style | string | apa | 引用格式标识,如 apa、mla 或 chicago。 |
请求
{ "input": "10.1038/nature14539", "style": "apa" }
响应
{
"citation": { "title": "…", "authors": [{ "firstName": "…", "lastName": "…" }] },
"style": "apa",
"html": "…",
"text": "…",
"bibtex": "…",
"ris": "…"
}
POST
/api/v1/bibliography按指定格式排序并格式化引用列表,输出 html 和 text,并支持导出 BibTeX 和 RIS。
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
citations必填 | object[] | — | 1 到 100 个引用对象,每个包含 id 和 title。 |
style | string | apa | 引用格式标识,如 apa、mla 或 chicago。 |
请求
{ "citations": [{ "id": "1", "title": "…", "authors": [] }], "style": "apa" }
响应
{
"style": "apa",
"entries": [{ "citation": { "id": "1" }, "html": "…", "text": "…" }],
"html": "…",
"text": "…",
"bibtex": "…",
"ris": "…"
}
GET
/api/v1/status返回密钥名称、剩余字数、单次请求限制、检测次数和速率限制。
此端点无需参数。
响应
{
"name": "Production",
"words_remaining": 2858,
"max_humanize_quality_units": 500,
"max_paraphrase_quality_units": 2000,
"max_detection_words_per_request": 5000,
"max_detection_characters": 30000,
"detection_quota": { "limit": 10, "remaining": 9, "resets_at": "2026-10-25T00:00:00Z" },
"rate_limit_per_minute": 50
}
参数与选项
速率限制与请求限制
错误处理
错误以 JSON 返回,包含 error、code 和 message 字段。
响应
{
"error": "quality_limit_exceeded",
"code": "quality_limit_exceeded",
"message": "Up to 500 Chinese or 1,500 English characters per request."
}
对 429 和 5xx 使用退避重试。4xx 需先修正请求再重试。
示例
拟人改写
POST /api/v1/humanize
{
"text": "粘贴需要修改的草稿。",
"language": "zh",
"mode": "reduce-aigc",
"personal_terms": ["TurnitPass"]
}
200 OK
{
"output": "…",
"words_used": 142,
"words_remaining": 2858,
"usage": { "words": 142, "characters": 861 },
"metrics": { "kind": "heuristic_estimate", "aiLikeScore": 18, "naturalTone": 82, "sentenceVariety": 74, "readability": 68 }
}
改写润色、AI 检测和引用
POST /api/v1/paraphrase
{
"text": "粘贴需要修改的草稿。",
"language": "zh",
"mode": "academic",
"synonyms_level": 60
}
POST /api/v1/detect
{
"text": "粘贴需要修改的草稿。",
"language": "zh",
"source_kind": "paste"
}
POST /api/v1/citation
{
"input": "https://example.com/article",
"style": "apa"
}