Skip to main content

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

CopyleaksDeep AI DetectorNotes
summary.aiscoreAI score 0-1. Same semantics.
summary.ai_writing_likelihood_classbandCategorical verdict. Their {AI, Human, Unsure} maps to our 7-band scale.
results.score.aggregatedScoreplagiarism.report.overallPercentPlagiarism overall percent (different endpoint).
results.internet[].urlplagiarism.report.sources[].urlPer-source URL.
results.score.identicalWordsplagiarism.report.sources[].coveredInputCharsCharacters of your text each source matches. We count characters, not words.
developerPayloaddocument_idOur 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/detect we return 422 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_language code; scores are most reliable on English text.

Migration checklist

  1. Once the API launches, generate a Deep AI Detector API key in your dashboard (Pro and higher).
  2. Delete the Copyleaks token-exchange step entirely.
  3. Delete the Copyleaks webhook handler.
  4. Replace the submit + wait flow with a synchronous client.detect() call.
  5. Replace base64 + filename body with plain JSON containing text.
  6. Update response parsing per the field map.
  7. Add 422 handling for short text.
  8. 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