Skip to content
Developer API

Check documents from your own software

Send a document, get a similarity score, an AI writing score and both PDF reports back. Version 1, over HTTPS with JSON.

Create an account
On this page

01Getting access

The API is for approved customers who want to check documents from their own software.

  1. Create an account and verify your email.
  2. Open Account and choose Request API access on the Developer API card.
  3. Once we approve your account, the same card lets you buy API credits and create keys. API prices are shown there.

Each key is shown once, when you create it. Store it somewhere safe, such as your server's secret settings, and never put it in a browser or mobile app. You can have up to 10 active keys and revoke any of them at once from the Account page.

02Authentication

Every request goes to https://copyrader.com/api/v1 and sends your key in the Authorization header. Keys start with crk_.

curl https://copyrader.com/api/v1/balance \
  -H "Authorization: Bearer crk_your_key"

A missing, wrong or revoked key gets 401. If API access for your account is suspended, every key gets 403.

03Credits

One API credit checks one document and gives you two PDF reports: a similarity report and an AI writing report. API credits are a separate balance from website credits; each can only be spent where it was bought.

  • Submitting a check holds one credit.
  • When the check completes, the held credit is used.
  • If the check fails or is cancelled, the credit is returned to your balance.

04Submit a check

POST/api/v1/checks

Send one document as multipart/form-data in a field named file. Accepted types are PDF, DOCX, TXT, RTF, ODT, PPTX, PPT, XLSX and XLS, up to 25 MB. The file's name, type and contents must match.

curl https://copyrader.com/api/v1/checks \
  -H "Authorization: Bearer crk_your_key" \
  -H "Idempotency-Key: order-1042-chapter-2" \
  -F "file=@chapter-two.docx"
const form = new FormData();
form.append("file", new Blob([bytes]), "chapter-two.docx");

const response = await fetch("https://copyrader.com/api/v1/checks", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.COPYRADER_API_KEY}`,
    "Idempotency-Key": "order-1042-chapter-2",
  },
  body: form,
});
const check = await response.json();

A new check answers 201 with the check object, usually with status pending.

Retrying safely. The optional Idempotency-Key header is 8 to 100 letters, digits or _ . : -. If you send the same key again, you get the first check back with 200 and are not charged twice. Use one key per document you mean to check.

05Get a check

GET/api/v1/checks/{id}

Returns one of your checks. Poll this every 30 to 60 seconds until the status is completed, failed or cancelled. Most checks finish within a few minutes.

{
  "object": "check",
  "id": "6f1c2b9e-4d0a-4c3e-9a51-2e7f8d3b1a64",
  "status": "completed",
  "file": { "name": "chapter-two.docx", "type": "docx", "size_bytes": 482113 },
  "similarity_percentage": 14,
  "ai_percentage": 3,
  "remarks": null,
  "reports": {
    "similarity": "/api/v1/checks/6f1c2b9e-4d0a-4c3e-9a51-2e7f8d3b1a64/reports/similarity",
    "ai": "/api/v1/checks/6f1c2b9e-4d0a-4c3e-9a51-2e7f8d3b1a64/reports/ai"
  },
  "created_at": 1764324000000,
  "completed_at": 1764324912000
}
FieldMeaning
statuspending, in_progress, completed, failed or cancelled.
fileThe name, type and size of the document you sent.
similarity_percentageThe similarity score, or null until it is ready.
ai_percentageThe AI writing score, or null until it is ready.
remarksA note about the result, or null.
reportsPaths to download each PDF, or null until that report is ready.
created_at, completed_atTimes in milliseconds since 1 January 1970 (UTC). completed_at is null until the check finishes.

06List checks

GET/api/v1/checks

Your API checks, newest first. Checks you start on the website are not included.

Query parameterMeaning
limitHow many to return, 1 to 100. Default 20.
beforeTo get the next page, pass the next_before value from the previous page unchanged. Treat it as an opaque string.
statusOnly checks with this status.
{
  "object": "list",
  "data": [ { "object": "check", "id": "6f1c2b9e-4d0a-4c3e-9a51-2e7f8d3b1a64", ... } ],
  "has_more": true,
  "next_before": "1764324000000_6f1c2b9e-4d0a-4c3e-9a51-2e7f8d3b1a64"
}

07Download reports

GET/api/v1/checks/{id}/reports/similarity

GET/api/v1/checks/{id}/reports/ai

Returns the report as a PDF file. Use the paths in the check's reports field; a report that isn't ready yet answers 404.

curl https://copyrader.com/api/v1/checks/6f1c2b9e-4d0a-4c3e-9a51-2e7f8d3b1a64/reports/similarity \
  -H "Authorization: Bearer crk_your_key" \
  -o similarity-report.pdf

08Balance and history

GET/api/v1/balance

available is what you can spend now; reserved is held for checks that are still running.

{ "object": "balance", "available": 48, "reserved": 2 }

GET/api/v1/balance/history

Every movement on your API balance, newest first. It takes limit (1 to 100, default 50) and before, and pages the same way as the list of checks.

{
  "object": "list",
  "data": [
    {
      "id": "0b7e5f3a-8d21-4a6c-b0f4-91c2e6d7a835",
      "type": "reservation",
      "amount": 1,
      "availableDelta": -1,
      "reservedDelta": 1,
      "referenceType": "scan",
      "referenceId": "6f1c2b9e-4d0a-4c3e-9a51-2e7f8d3b1a64",
      "createdAt": 1764324000000
    }
  ],
  "has_more": false,
  "next_before": null
}

The type is one of purchase, grant, reservation, capture, release or adjustment.

09Errors

Errors answer with a JSON body such as { "error": "Check not found." }. The message is safe to show to your users.

StatusWhen
400The request is malformed, a parameter is out of range, or the file type or contents are not supported.
401The API key is missing, wrong or revoked.
402Not enough API credits. Each check uses 1 API credit.
403API access for this account is suspended.
404The check or report does not exist, isn't yours, or isn't ready.
413The file is larger than 25 MB.
415The body is not multipart/form-data.
429Too many requests. Wait for the number of seconds in the Retry-After header.
502The document could not be submitted. No credit was used; try again.
503Checking is temporarily unavailable. Try again later.

10Rate limits

  • 120 requests a minute for each key.
  • 300 new checks an hour for each account.
  • Going over answers 429 with a Retry-After header in seconds.

11Webhooks

Set an https address on your Account page under Developer API, and we send a signed POST to it when a check finishes. You get a signing secret (whsec_…) once, when you first save the address; you can replace it there at any time. Polling Get a check keeps working too.

EventWhen
check.completedBoth reports are ready. Fetch them with Download a report.
check.failedThe check failed or was cancelled. Its API credit has gone back to your balance; data.check.status is failed or cancelled.
pingSent only when you press Send test event.
POST /your/webhook/path
Content-Type: application/json
Copyrader-Event: check.completed
Copyrader-Delivery: evt_6c1f…
Copyrader-Signature: t=1764324000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd

{
  "id": "evt_6c1f…",
  "object": "event",
  "type": "check.completed",
  "created_at": 1764324000000,
  "data": {
    "check": {
      "id": "6f1c2b9e-4d0a-4c3e-9a51-2e7f8d3b1a64",
      "status": "completed",
      "similarity_percentage": 12,
      "ai_percentage": 3
    }
  }
}

Verify the signature

Compute an HMAC-SHA256 with your secret over the timestamp, a full stop and the raw request body, and compare it with v1 in constant time. Reject requests whose timestamp is more than five minutes old.

import crypto from "node:crypto";

function verify(rawBody, header, secret) {
  const { t, v1 } = Object.fromEntries(header.split(",").map((part) => part.split("=")));
  if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return v1.length === expected.length && crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}

Delivery

  • Answer with any 2xx status within 10 seconds. Do slow work after you answer.
  • Anything else, a timeout or a redirect counts as a failure. Redirects are never followed.
  • Failed deliveries are retried after 1 minute, 5 minutes, 15 minutes, 1 hour, 3, 6 and 12 hours: eight attempts in about a day.
  • Events usually arrive within two minutes of a check finishing. Delivery is at least once, so the same event can arrive twice: use Copyrader-Delivery or the event id to ignore repeats.
  • The address must be https on the standard port, use a domain name rather than an IP address, and point only to public servers. Your last five deliveries and their results are listed on your Account page.