API docs → Migrate from Copyleaks
Migrate from Copyleaks
Copyleaks' scan API uses an async submit-then-webhook flow. We're synchronous — answer in the HTTP response. The migration is mostly about deleting webhook plumbing.
Why switch
- Synchronous answer. The verdict comes back in the HTTP response, so you can drop your webhook plumbing.
- Single API key. Bearer token vs Copyleaks' email + key + access-token-exchange dance.
- Per-sentence breakdown. Starter tier and above get Deep Scan, which scores each of the first 80 sentences separately.
Side-by-side
Before — Copyleaks (async)
// Before: Copyleaks (async — submit + wait for webhook)
// 1. Get a token
const token = await fetch('https://id.copyleaks.com/v3/account/login/api', {
method: 'POST',
body: JSON.stringify({ email: process.env.CL_EMAIL, key: process.env.CL_KEY }),
});
// 2. Submit a scan with a callback URL
await fetch('https://api.copyleaks.com/v3/businesses/submit/file/SCAN_ID', {
method: 'PUT',
headers: { Authorization: 'Bearer ' + token.access_token },
body: JSON.stringify({
base64: Buffer.from(text).toString('base64'),
filename: 'doc.txt',
properties: {
webhooks: { status: 'https://your.app/cl-webhook' },
sandbox: false,
},
}),
});
// 3. Wait for webhook callback. Receive results in a separate handler.
// (50-200 lines of webhook plumbing to actually get the answer.) After — Deep AI Detector (sync)
// After: deepaidetector (synchronous — answer in the response)
// @deepaidetector/client is coming soon (not yet published to npm).
import { createClient } from '@deepaidetector/client';
const client = createClient({ apiKey: process.env.DEEPAIDETECTOR_KEY });
const data = await client.detect({ text });
const aiScore = data.score; // 0-1
const verdict = data.band; // categorical
// No webhook needed: the answer is right here in the response. Field mapping
| Copyleaks | Deep AI Detector | Notes |
|---|---|---|
summary.ai | score | AI score 0-1. Same semantics. |
summary.ai_writing_likelihood_class | band | Categorical verdict. Their {AI, Human, Unsure} maps to our 7-band scale. |
results.score.aggregatedScore | plagiarism.report.overallPercent | Plagiarism overall percent (different endpoint). |
results.internet[].url | plagiarism.report.sources[].url | Per-source URL. |
results.score.identicalWords | plagiarism.report.sources[].coveredInputChars | Characters of your text each source matches. We count characters, not words. |
developerPayload | document_id | Our document_id is a UUID — use that for correlation. |
Behaviour differences to know
- Authentication is one step. No token-exchange — bearer auth directly. Save
your
dad_live_key as a secret, that's it. - Synchronous. The answer is in the response body, so there is no webhook to wire up.
- Base64 not needed. Send the text as a UTF-8 string in the JSON body.
- Detection + plagiarism are separate endpoints. Call both in parallel for the bundled equivalent.
- 80-word minimum. Below 80 words on
/v1/detectwe return422 insufficient_text. - Different units for plagiarism overall. Copyleaks: 0-100 integer. Us: 0-100
float (
overallPercent). - English works best. Each detection response includes a
detected_languagecode; scores are most reliable on English text.
Migration checklist
- Once the API launches, generate a Deep AI Detector API key in your dashboard (Pro and higher).
- Delete the Copyleaks token-exchange step entirely.
- Delete the Copyleaks webhook handler.
- Replace the submit + wait flow with a synchronous
client.detect()call. - Replace base64 + filename body with plain JSON containing
text. - Update response parsing per the field map.
- Add 422 handling for short text.
- If you still need plagiarism, add a parallel
client.plagiarism()call.
Want a hand?
Questions about your Copyleaks integration? Email support@deepaidetector.com. The API isn't accepting public traffic yet, so get notified when keys go live.
Notify me at launch