API del Plagiarisme de detecció de l' API: envieu text, enquesta l'informe.
Un grapat de punts finals, autenticació per a ós, fixació transparent de preus de crèdit. Es construeix per a agències, canonades editorials i eines d'ajaïcides de LMS.
La vostra clau API
Signa per obtenir la vostra clau API. Les claus venen amb tots els comptes; les comprovacions de l' API són facturades en crèdits.
Signa amuntPunts d' acabament
POST /api/v1/check/
Envia un text per a comprovar- ho. Retorna el 202 amb un xec_ id. Cos: JSON amb un camp de text opcional booleà profund.
curl -X POST https://plagiarism.free/api/v1/check/ \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "The text you want to check..."}'
GET /api/v1/check/<check_id>/
Comprovació de l' estat; quan es fa l' informe complet s' inclou: puntuació, per-senència coincideix amb els tipus de confiança i extractes del codi font, i la llista de fonts.
curl https://plagiarism.free/api/v1/check/CHECK_ID/ \ -H "Authorization: Bearer YOUR_KEY"
GET /api/v1/checks/
Llista les vostres comprovacions recents, primer les noves. params opcionals de consulta: Límit (1- 100, per omissió) i estat (arcud, fet, ha fallat...). Reconcile submissió i torneu al vostre propi tauler sense emmagatzemar tots els noms d' id.
curl "https://plagiarism.free/api/v1/checks/?limit=20&status=done" \ -H "Authorization: Bearer YOUR_KEY"
DELETE /api/v1/check/<check_id>/
Delete a finished check: the submitted text and its report are removed for good. Use it to honour your own users' deletion requests. A check that is still queued or running answers 409; delete it once it is done or failed.
curl -X DELETE https://plagiarism.free/api/v1/check/CHECK_ID/ \ -H "Authorization: Bearer YOUR_KEY"
Exemple de Python
import time
import requests
API = "https://plagiarism.free/api/v1/check/"
HEADERS = {"Authorization": "Bearer YOUR_KEY"}
r = requests.post(API, json={"text": open("essay.txt").read()}, headers=HEADERS)
check_id = r.json()["check_id"]
while True:
report = requests.get(f"{API}{check_id}/", headers=HEADERS).json()
if report["status"] in ("done", "failed"):
break
time.sleep(3)
print(report["score_pct"], "% matched")
for source in report["sources"]:
print(source["pct_of_document"], source["url"])
Exemple JavaScript
const API = "https://plagiarism.free/api/v1/check/";
const headers = { "Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json" };
const { check_id } = await fetch(API, {
method: "POST", headers, body: JSON.stringify({ text })
}).then(r => r.json());
let report;
do {
await new Promise(res => setTimeout(res, 3000));
report = await fetch(`${API}${check_id}/`, { headers }).then(r => r.json());
} while (!["done", "failed"].includes(report.status));
Pricing
Idèntic al lloc web: 1 crèdit = 1,000 paraules analitzades, arrodonit a l'alça per comprovació; les comprovacions profundes costen el doble. Els paquets de crèdits són vàlids 365 dies; les subscripcions es renoven mensualment i inclouen l'API a tots els nivells. No hi ha un nivell d'API separat ni cobraments per usuari. Mireu plans i paquets
Checks run asynchronously: real, rate-limited web retrieval usually takes about a minute once a check starts, longer for long documents and at busy times. Poll the status endpoint rather than holding the connection open. HTTP 402 means insufficient credits; the response includes what the check would cost.