Skip to content
AI Detector

Detect Natural Language

POST https://api.copyleaks.com/v2/writer-detector/{scanId}/check

Use Copyleaks AI Content Detection to differentiate between human-written and AI-written text.

This endpoint will receive submitted text to be checked. At the end of the processing stage, the result will be shown as classifications. Text classification is divided into sections. Each section may have a different classification.

scanId 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. This will help you to debug incidents. Using the same ID for the same file will help you to avoid network problems that may lead to multiple scans for the same file. learn more about the criteria for creating a Scan ID.

>= 3 characters <= 36 characters

Match pattern: [a-z0-9] !@$^&-+%=_(){}<>';:/.",~|

Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN

The request body is a JSON object containing the text to scan.

text string required

A text string.

>= 255 characters <= 25000 characters

sandbox boolean default: "false"

Use sandbox mode to test your integration with the Copyleaks API for free.

language string

The language code of your content. The selected language should be on the Supported Languages list below. If the ‘language’ field is not supplied, our system will automatically detect the language of the content.

LanguageCode
English"en"
Spanish"es"
French"fr"
Portuguese"pt"
German"de"
Italian"it"
Russian"ru"
Polish"pl"
Romanian"ro"
Dutch"nl"
Swedish"sv"
Czech"cs"
Norwegian"no"
Korean"ko"
Japanese"ja"
Chinese (Simplified)"zh-CN"
Chinese (Traditional)"zh-TW"
Arabic"ar"
Bengali"bn"
Bulgarian"bg"
Croatian"hr"
Greek"el"
Hebrew"he"
Hindi"hi"
Hungarian"hu"
Serbian"sr"
Thai"th"
Turkish"tr"
Ukrainian"uk"
Vietnamese"vi"

Example: "en"

explain boolean default: "false" beta

Enable AI Logic feature for AI detection. Example:

{
"text": "Your text here",
"explain": true
}

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.

sensitivity integer default: "2.0"

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 <= 3

200 OK

The command was executed.

Response Schema

The response contains the following fields:

modelVersion string
The version of the AI detection model used.
results array<object>
An array of classification results for different sections of the text. See AI Detection Response for more details.
summary object
A summary of the overall classification (human vs. AI).
scannedDocument object
Metadata about the scan. See Scanned Document for more details.
explain object
Data for the AI Logic feature, explaining the classification. See AI Logic for more details.

Example Response

A typical response from this endpoint:

Show full example (115 lines)
{
"modelVersion": "v5",
"results": [
{
"classification": 2,
"probability": 1,
"matches": [
{
"text": {
"chars": {
"starts": [
0
],
"lengths": [
1509
// ... truncated
400 Bad Request

Bad request.

Example Response

A typical response from this endpoint:

{
"ErrorMessage": "Language not supported",
"ErrorCode": "unsupported-lang"
}
POST https://api.copyleaks.com/v2/writer-detector/my-scan-123/check
Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN
{
"text": "Copyleaks is a comprehensive plagiarism detection platform that performs extensive searches across 60 trillion websites, 15,000+ academic journals, 20+ code data repositories, and 1M+ internal documents. Using AI-powered text analysis, easily scan documents, raw text, code, and URLs and instantly receive detailed reporting on the findings.",
"sandbox": false,
"explain": true,
"sensitivity": 2
}