Vai al contenuto
TurnitPass
SviluppatoriAPI v1Ottieni una chiave API
Sfoglia la documentazione

SviluppatoriRiferimento API

API REST di TurnitPass

Endpoint, parametri, limiti e codici di errore.

POST/api/v1/humanize

Riduce i segnali di scrittura tipici dell’IA nel testo inviato. Modalità: reduce-aigc, reduce-both, paraphrase, academic-polish.

ParametroTipoPredefinitoDescrizione
textObbligatoriostring—Testo da riscrivere. Almeno 3 unità di parola, fino a 500 unità di qualità per richiesta.
languagestringenCodice lingua, ad esempio en o zh.
modeenumreduce-aigcreduce-aigc, reduce-both, paraphrase, academic-polish
personal_termsstring[]—Fino a 30 nomi o termini da lasciare invariati, massimo 120 caratteri ciascuno.
Richiesta
POST /api/v1/humanize
{ "text": "Paste the draft you want to revise.", "language": "en", "mode": "reduce-aigc" }
Risposta
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 }
}
POST/api/v1/paraphrase

Riformula il testo in modalità standard, fluency, formal, academic, simple, creative, expand o shorten. synonyms_level va da 0 a 100.

ParametroTipoPredefinitoDescrizione
textObbligatoriostring—Testo da riscrivere. Fino a 2.000 unità di qualità per richiesta.
languagestringenCodice lingua, ad esempio en o zh.
modeenumstandardstandard, fluency, formal, academic, simple, creative, expand, shorten
synonyms_levelinteger50Libertà nella sostituzione delle parole, da 0 a 100.
Richiesta
POST /api/v1/paraphrase
{ "text": "Paste the draft you want to revise.", "language": "en", "mode": "academic", "synonyms_level": 60 }
Risposta
200 OK
{
  "output": "…",
  "words_used": 142,
  "words_remaining": 2858,
  "usage": { "words": 142, "characters": 861 }
}
POST/api/v1/rewrite

Revisione accademica di struttura, tono e scorrevolezza delle frasi.

ParametroTipoPredefinitoDescrizione
textObbligatoriostring—Testo da riscrivere. Almeno 3 unità di parola, fino a 500 unità di qualità per richiesta.
languagestringenCodice lingua, ad esempio en o zh.
Richiesta
POST /api/v1/rewrite
{ "text": "Paste the draft you want to revise.", "language": "en" }
Risposta
200 OK
{
  "output": "…",
  "words_used": 142,
  "words_remaining": 2858,
  "usage": { "words": 142, "characters": 861 }
}
POST/api/v1/detect

Restituisce un punteggio IA, segnali di scrittura e note di revisione per testo incollato o documenti estratti. source_kind: paste, pdf, docx o txt.

ParametroTipoPredefinitoDescrizione
textObbligatoriostring—Testo da analizzare. Fino a 5.000 parole o 30.000 caratteri.
languagestringenCodice lingua, ad esempio en o zh.
source_kindenumpastepaste, pdf, docx, txt
original_filenamestring—Nome originale del file, massimo 255 caratteri.
Richiesta
POST /api/v1/detect
{ "text": "Paste the draft you want to revise.", "language": "en", "source_kind": "paste" }
Risposta
200 OK
{
  "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

Formatta un DOI, un URL o una citazione manuale in 22 stili, tra cui APA, MLA, Chicago, IEEE, Harvard, Nature, Vancouver, ACS, AMA, GB/T 7714, OSCOLA e Bluebook. Le risposte includono html, text, BibTeX e RIS.

ParametroTipoPredefinitoDescrizione
inputstring—DOI, URL o titolo della citazione, massimo 2.000 caratteri. In alternativa a citation.
citationobject—Oggetto citazione con titolo, autori e dettagli della fonte. In alternativa a input.
stylestringapaChiave dello stile di citazione, ad esempio apa, mla o chicago.
Richiesta
POST /api/v1/citation
{ "input": "10.1038/nature14539", "style": "apa" }
Risposta
200 OK
{
  "citation": { "title": "…", "authors": [{ "firstName": "…", "lastName": "…" }] },
  "style": "apa",
  "html": "…",
  "text": "…",
  "bibtex": "…",
  "ris": "…"
}
POST/api/v1/bibliography

Ordina e formatta un elenco di citazioni nello stile richiesto, con output html e text ed esportazione BibTeX e RIS.

ParametroTipoPredefinitoDescrizione
citationsObbligatorioobject[]—Da 1 a 100 oggetti citazione, ciascuno con id e title.
stylestringapaChiave dello stile di citazione, ad esempio apa, mla o chicago.
Richiesta
POST /api/v1/bibliography
{ "citations": [{ "id": "1", "title": "…", "authors": [] }], "style": "apa" }
Risposta
200 OK
{
  "style": "apa",
  "entries": [{ "citation": { "id": "1" }, "html": "…", "text": "…" }],
  "html": "…",
  "text": "…",
  "bibtex": "…",
  "ris": "…"
}
GET/api/v1/status

Restituisce nome della chiave, parole residue, limiti per richiesta, quota di rilevamento e rate limit.

Questo endpoint non accetta parametri.

Risposta
200 OK
{
  "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
}

Parametri e opzioni

Auth
Authorization: Bearer tp_live_your_api_key
Termini da preservare
L’array facoltativo personal_terms (fino a 30) mantiene invariati nomi, termini tecnici e grafie dei marchi nell’umanizzazione in inglese.

Rate limit e limiti di richiesta

Umanizzazione e riscrittura
500 unità di qualità per richiestaUn carattere CJK vale un’unità; tre altri caratteri valgono un’unità, arrotondata per eccesso. Tutti i piani hanno gli stessi limiti.
Parafrasi
2.000 unità di qualità per richiestaStesso metodo di calcolo.
Rilevamento IA
5.000 parole o 30.000 caratteri per scansioneConteggiato nella quota giornaliera di scansioni. Dividi i documenti più lunghi.
Rate limit
50 richieste al minuto per chiaveCitazione e bibliografia ne consentono 100 e non consumano parole.
Chiavi API
Fino a 5 chiavi attive

Gestione degli errori

Gli errori restituiscono un JSON con i campi error, code e message.

400
invalid_input, quality_limit_exceeded, word_limit_exceeded
401
missing_api_key, invalid_api_key
403
insufficient_words, daily_detection_limit
429
rate_limited
500
internal_error
Risposta
400
{
  "error": "quality_limit_exceeded",
  "code": "quality_limit_exceeded",
  "message": "Up to 500 Chinese or 1,500 English characters per request."
}
Ripeti 429 e 5xx con backoff. Correggi la richiesta prima di ripetere una 4xx.

Esempi

Umanizzazione
JSON
POST /api/v1/humanize
{
  "text": "Paste the draft you want to revise.",
  "language": "en",
  "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 }
}
Parafrasi, rilevamento IA e citazione
JSON
POST /api/v1/paraphrase
{
  "text": "Paste the draft you want to revise.",
  "language": "en",
  "mode": "academic",
  "synonyms_level": 60
}

POST /api/v1/detect
{
  "text": "Paste the draft you want to revise.",
  "language": "en",
  "source_kind": "paste"
}

POST /api/v1/citation
{
  "input": "https://example.com/article",
  "style": "apa"
}

Passaggi successivi