瀏覽文件
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-Hant", "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-Hant", "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-Hant" }
回應
{
"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-Hant", "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-Hant",
"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-Hant",
"mode": "academic",
"synonyms_level": 60
}
POST /api/v1/detect
{
"text": "貼上需要修改的草稿。",
"language": "zh-Hant",
"source_kind": "paste"
}
POST /api/v1/citation
{
"input": "https://example.com/article",
"style": "apa"
}