curl --request POST \
--url https://api.copyleaks.com/v2/writer-detector/my-scan-123/check \
--header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"text": "Copyleaks is a comprehensive plagiarism detection platform...",
"sandbox": false,
"explain": true,
"sensitivity": 2
}'
from copyleaks.copyleaks import Copyleaks
from copyleaks.models.submit.ai_detection_document import NaturalLanguageDocument
auth_token = Copyleaks.login("[email protected]", "YOUR_API_KEY")
submission = NaturalLanguageDocument("Copyleaks is a comprehensive plagiarism detection platform...")
submission.set_sandbox(False)
submission.set_explain(True)
submission.set_sensitivity(2)
response = Copyleaks.AiDetectionClient.submit_natural_language(auth_token, "my-scan-123", submission)
print(response)
const { Copyleaks, CopyleaksNaturalLanguageSubmissionModel } = require('plagiarism-checker');
const copyleaks = new Copyleaks();
const auth = await copyleaks.loginAsync('YOUR_EMAIL', 'YOUR_API_KEY');
const submission = new CopyleaksNaturalLanguageSubmissionModel(
'Copyleaks is a comprehensive plagiarism detection platform...'
);
submission.sandbox = false;
submission.explain = true;
submission.sensitivity = 2;
await copyleaks.aiDetectionClient.submitNaturalTextAsync(auth, 'my-scan-123', submission);
import classes.Copyleaks;
import models.submissions.aidetection.CopyleaksNaturalLanguageSubmissionModel;
String authToken = Copyleaks.login("your@email", "API_KEY");
CopyleaksNaturalLanguageSubmissionModel sub = new CopyleaksNaturalLanguageSubmissionModel(
"Copyleaks is a comprehensive plagiarism detection platform..."
);
sub.setSandbox(false);
sub.setExplain(true);
sub.setSensitivity(2);
Copyleaks.writerDetectorClient.submitNaturalLanguage(authToken, "my-scan-123", sub);
{
"modelVersion": "v5",
"results": [
{
"classification": 2,
"probability": 1,
"matches": [
{
"text": {
"chars": { "starts": [0], "lengths": [1509] },
"words": { "starts": [0], "lengths": [221] }
}
}
]
}
],
"summary": { "human": 0, "ai": 1 },
"scannedDocument": {
"scanId": "my-scan-123",
"totalWords": 221,
"actualCredits": 1,
"expectedCredits": 1,
"creationTime": "2023-01-10T10:07:58.9459512Z"
}
}
AI Text Detector
AI Text Detector
Differentiate between human-written and AI-written text.
POST
/
v2
/
writer-detector
/
{scanId}
/
check
curl --request POST \
--url https://api.copyleaks.com/v2/writer-detector/my-scan-123/check \
--header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"text": "Copyleaks is a comprehensive plagiarism detection platform...",
"sandbox": false,
"explain": true,
"sensitivity": 2
}'
from copyleaks.copyleaks import Copyleaks
from copyleaks.models.submit.ai_detection_document import NaturalLanguageDocument
auth_token = Copyleaks.login("[email protected]", "YOUR_API_KEY")
submission = NaturalLanguageDocument("Copyleaks is a comprehensive plagiarism detection platform...")
submission.set_sandbox(False)
submission.set_explain(True)
submission.set_sensitivity(2)
response = Copyleaks.AiDetectionClient.submit_natural_language(auth_token, "my-scan-123", submission)
print(response)
const { Copyleaks, CopyleaksNaturalLanguageSubmissionModel } = require('plagiarism-checker');
const copyleaks = new Copyleaks();
const auth = await copyleaks.loginAsync('YOUR_EMAIL', 'YOUR_API_KEY');
const submission = new CopyleaksNaturalLanguageSubmissionModel(
'Copyleaks is a comprehensive plagiarism detection platform...'
);
submission.sandbox = false;
submission.explain = true;
submission.sensitivity = 2;
await copyleaks.aiDetectionClient.submitNaturalTextAsync(auth, 'my-scan-123', submission);
import classes.Copyleaks;
import models.submissions.aidetection.CopyleaksNaturalLanguageSubmissionModel;
String authToken = Copyleaks.login("your@email", "API_KEY");
CopyleaksNaturalLanguageSubmissionModel sub = new CopyleaksNaturalLanguageSubmissionModel(
"Copyleaks is a comprehensive plagiarism detection platform..."
);
sub.setSandbox(false);
sub.setExplain(true);
sub.setSensitivity(2);
Copyleaks.writerDetectorClient.submitNaturalLanguage(authToken, "my-scan-123", sub);
{
"modelVersion": "v5",
"results": [
{
"classification": 2,
"probability": 1,
"matches": [
{
"text": {
"chars": { "starts": [0], "lengths": [1509] },
"words": { "starts": [0], "lengths": [221] }
}
}
]
}
],
"summary": { "human": 0, "ai": 1 },
"scannedDocument": {
"scanId": "my-scan-123",
"totalWords": 221,
"actualCredits": 1,
"expectedCredits": 1,
"creationTime": "2023-01-10T10:07:58.9459512Z"
}
}
curl --request POST \
--url https://api.copyleaks.com/v2/writer-detector/my-scan-123/check \
--header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"text": "Copyleaks is a comprehensive plagiarism detection platform...",
"sandbox": false,
"explain": true,
"sensitivity": 2
}'
from copyleaks.copyleaks import Copyleaks
from copyleaks.models.submit.ai_detection_document import NaturalLanguageDocument
auth_token = Copyleaks.login("[email protected]", "YOUR_API_KEY")
submission = NaturalLanguageDocument("Copyleaks is a comprehensive plagiarism detection platform...")
submission.set_sandbox(False)
submission.set_explain(True)
submission.set_sensitivity(2)
response = Copyleaks.AiDetectionClient.submit_natural_language(auth_token, "my-scan-123", submission)
print(response)
const { Copyleaks, CopyleaksNaturalLanguageSubmissionModel } = require('plagiarism-checker');
const copyleaks = new Copyleaks();
const auth = await copyleaks.loginAsync('YOUR_EMAIL', 'YOUR_API_KEY');
const submission = new CopyleaksNaturalLanguageSubmissionModel(
'Copyleaks is a comprehensive plagiarism detection platform...'
);
submission.sandbox = false;
submission.explain = true;
submission.sensitivity = 2;
await copyleaks.aiDetectionClient.submitNaturalTextAsync(auth, 'my-scan-123', submission);
import classes.Copyleaks;
import models.submissions.aidetection.CopyleaksNaturalLanguageSubmissionModel;
String authToken = Copyleaks.login("your@email", "API_KEY");
CopyleaksNaturalLanguageSubmissionModel sub = new CopyleaksNaturalLanguageSubmissionModel(
"Copyleaks is a comprehensive plagiarism detection platform..."
);
sub.setSandbox(false);
sub.setExplain(true);
sub.setSensitivity(2);
Copyleaks.writerDetectorClient.submitNaturalLanguage(authToken, "my-scan-123", sub);
{
"modelVersion": "v5",
"results": [
{
"classification": 2,
"probability": 1,
"matches": [
{
"text": {
"chars": { "starts": [0], "lengths": [1509] },
"words": { "starts": [0], "lengths": [221] }
}
}
]
}
],
"summary": { "human": 0, "ai": 1 },
"scannedDocument": {
"scanId": "my-scan-123",
"totalWords": 221,
"actualCredits": 1,
"expectedCredits": 1,
"creationTime": "2023-01-10T10:07:58.9459512Z"
}
}
Authentication Required. You need to login with a user and API key in order to access this method. Add this HTTP header to your request:Authorization: Bearer <Your-Login-Token>
Request
Path Parameters
string
required
A unique scan id provided by you. We recommend you use the same id in your database to represent the scan in the Copyleaks database. Learn more about the criteria for creating a Scan ID.
>= 3 characters <= 36 charactersHeaders
Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN
Request Body
string
required
A text string.
>= 255 characters <= 100000 charactersboolean
default:"false"
Use sandbox mode to test your integration with the Copyleaks API for free.
string
The language code of your content in ISO-639-1 format. See the full list of supported languages.
If the
language field is not supplied, our system will automatically detect the language of the content.
Example: "en"boolean
default:"false"
Enable AI Logic feature for AI detection. For further information, please check the AI Logic for a detailed breakdown of its structure and usage, and for full AI Detection response please check the AI Detection Response.
AI Logic explanations are returned for six languages only; for any other language the response contains the detection result without explanations.
integer
default:"2"
Control the behavior of the AI detection.
- Detecting content copied directly from an LLM, like ChatGPT or Gemini, without edits.
- Detecting content from an LLM with minor changes, like tense adjustments or added words.
- Detecting content from an LLM that has been heavily modified using tools or manual edits.
>= 1 <= 3Responses
- 200
- 400
- 401
- 429
200 OK - The command was executed.
{
"modelVersion": "v5",
"results": [
{
"classification": 2,
"probability": 1,
"matches": [
{
"text": {
"chars": { "starts": [0], "lengths": [1509] },
"words": { "starts": [0], "lengths": [221] }
}
}
]
}
],
"summary": { "human": 0, "ai": 1 }
}
400 Bad Request - Bad request.
401 Unauthorized - Authorization has been denied for this request.
429 Too Many Requests - Too many requests have been sent. The request has been rejected.
Next Steps
Detect AI-Generated Text
Learn how to use the AI Detection API to check if content was written by a human or generated by an AI.
AI Logic
Understand how AI logic can help you interpret the results of AI text detection.
AI Detection Webhook
Learn about the webhook that delivers AI detection results.

