Detect Natural Language
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.
Request
Section titled “Request”Path Parameters
Section titled “Path Parameters”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] !@$^&-+%=_(){}<>';:/.",~|
Headers
Section titled “Headers”Content-Type: application/jsonAuthorization: Bearer YOUR_LOGIN_TOKEN
Request Body
Section titled “Request Body”The request body is a JSON object containing the text to scan.
A text string.
>= 255 characters
<= 25000 characters
Use sandbox mode to test your integration with the Copyleaks API for free.
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.
Language | Code |
---|---|
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"
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.
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
Responses
Section titled “Responses”The command was executed.
Response Schema
The response contains the following fields:
summary object
scannedDocument object
explain object
Example Response
A typical response from this endpoint:
{ "modelVersion": "v5", "results": [ { "classification": 2, "probability": 1, "matches": [ { "text": { "chars": { "starts": [ 0 ], "lengths": [ 1509// ... truncated
Bad request.
Example Response
A typical response from this endpoint:
{ "ErrorMessage": "Language not supported", "ErrorCode": "unsupported-lang"}
Authorization has been denied for this request.
Example Response
A typical response from this endpoint:
{ "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00"}
Too many requests have been sent. The request has been rejected.
Example Response
A typical response from this endpoint:
{ "error": "Rate limit exceeded",}
Examples
Section titled “Examples”POST https://api.copyleaks.com/v2/writer-detector/my-scan-123/checkContent-Type: application/jsonAuthorization: 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}
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 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 }'