The full site of Copyleaks Documentation # AI Logic - Transparency in AI Detection > A guide to using Copyleaks AI Logic to understand the reasoning behind AI detection results, providing transparency and enabling more confident decision-making. Features In a world where the line between human and AI-generated content is increasingly blurred, transparency is paramount. Copyleaks AI Logic is a groundbreaking feature that provides unprecedented insight into the “why” behind our AI detection results. It moves beyond a simple probability score to reveal the specific patterns and characteristics that indicate the presence of AI-generated content. ## The Power of Explainability [Section titled “The Power of Explainability”](#the-power-of-explainability) AI Logic is designed to address the “black box” problem in AI detection. By providing a clear, data-driven explanation for each result, we empower you to: * **Make Confident Decisions**: Understand the specific signals that led to a piece of content being flagged, allowing you to make more informed and defensible decisions. * **Build Trust with Users**: Provide your users with a transparent explanation of why their content was flagged, fostering a sense of fairness and trust. * **Facilitate Constructive Dialogue**: Use the detailed insights from AI Logic to have more productive conversations about the appropriate use of AI tools. ### How to Use AI Logic [Section titled “How to Use AI Logic”](#how-to-use-ai-logic) AI Logic is available as an optional parameter in your AI detection API requests. When enabled, the API response will include an additional `patterns` object that contains a detailed breakdown of the AI and human-like patterns found in the text. This object includes: * **Statistics**: A comparison of the statistical properties of the text against known AI and human writing patterns. * **Textual Analysis**: The specific segments of the text that exhibit AI-like characteristics, including their exact location and length. By analyzing this data, you can gain a deeper understanding of the AI’s assessment and build more sophisticated and transparent content integrity workflows. ### A New Level of Transparency [Section titled “A New Level of Transparency”](#a-new-level-of-transparency) AI Logic represents a significant step forward in the field of AI detection. By providing a clear and understandable explanation for our results, we are empowering developers, educators, and content creators to navigate the evolving landscape of AI-generated content with confidence and integrity. ## Usage Explanation [Section titled “Usage Explanation”](#usage-explanation) Upon successful completion of the request, the API will return a response containing various logics related to AI and human-written texts. **Example JSON Response** ```json { "patterns": { "statistics": { "aiCount": [ 15.9636, 39.5495, 84.7079, 119.8710, 9.9233, 185.6670, 14.4536, 19.1995 ], "humanCount": [ 0.8076, 1.5076, 3.8228, 8.5071, 0.3769, 4.2536, 0.3231, 1.1845 ] }, "text": { "chars": { "starts": [31, 55, 303, 909, 961, 987, 1129, 1775], "lengths": [23, 32, 23, 33, 25, 30, 30, 19] }, "words": { "starts": [5, 9, 45, 135, 144, 148, 169, 257], "lengths": [4, 6, 3, 6, 4, 5, 5, 3] } } } } ``` ## Understanding the Response [Section titled “Understanding the Response”](#understanding-the-response) The response provides data that helps understand why certain text patterns have been flagged as likely AI-generated. This information enables: * Clear documentation explaining AI detection results * Facilitation of dialogue that leads to mutual understanding and trust * Easy interpretation of detection results for quick action * Collaboration and data-driven conclusions. ## Next Steps [Section titled “Next Steps”](#next-steps) [API Reference ](/reference/actions/writer-detector/check)Explore the full API reference for the AI Detection endpoint. --- # AI Source Match > A comprehensive guide to using Copyleaks AI Source Match to identify online sources suspected of containing AI-generated content, enhancing plagiarism detection capabilities. In today’s digital landscape, the challenge of academic integrity has evolved beyond traditional plagiarism. AI Source Match represents a revolutionary advancement in plagiarism detection, specifically designed to identify online sources that may contain AI-generated content. This dual-layer detection system not only finds potential plagiarism but also reveals whether the matched source content itself might have been created by artificial intelligence. ## The Evolution of Plagiarism Detection [Section titled “The Evolution of Plagiarism Detection”](#the-evolution-of-plagiarism-detection) AI Source Match addresses a critical gap in modern content verification. As AI-generated content becomes more prevalent across the internet, traditional plagiarism detection tools may flag content against sources that are themselves artificially created. This creates a complex scenario where understanding the nature of the source material is as important as identifying the match itself. By combining internet scanning capabilities with AI detection technology, AI Source Match provides: * **Comprehensive Source Analysis**: Identify not just plagiarism, but the AI likelihood of the source material itself. * **Enhanced Academic Integrity**: Make more informed decisions about content originality by understanding the nature of matched sources. * **Improved Context**: Distinguish between copying from human-authored sources versus AI-generated content. * **Advanced Reporting**: Provide detailed insights into both plagiarism patterns and source authenticity. ### Prerequisites and Configuration [Section titled “Prerequisites and Configuration”](#prerequisites-and-configuration) AI Source Match builds upon existing Copyleaks functionality and requires specific configurations to operate effectively: **Required Dependencies:** * `scanning.internet` must be enabled to scan online sources * `aiGenerateText.detect` must be activated for AI content detection **Configuration Parameters:** ```json { "aiSourceMatch": { "enable": true }, "scanning": { "internet": true }, "aiGenerateText": { "detect": true } } ``` ### How AI Source Match Works [Section titled “How AI Source Match Works”](#how-ai-source-match-works) When enabled, AI Source Match operates through a sophisticated multi-step process: 1. **Internet Scanning**: The system performs comprehensive internet searches to identify potential source matches for the submitted content. 2. **Source Analysis**: Each identified source is analyzed using advanced AI detection algorithms to determine the likelihood that the source content was AI-generated. 3. **Dual Reporting**: Results provide both traditional plagiarism metrics and AI probability scores for the matched sources. 4. **Enhanced Insights**: Users receive detailed information about both the plagiarism match and the authenticity nature of the source material. ## Understanding AI Source Match Results [Section titled “Understanding AI Source Match Results”](#understanding-ai-source-match-results) The AI Source Match feature enhances standard plagiarism reports by adding an additional layer of source authenticity analysis. This enables educators, publishers, and content managers to: **Identify Complex Plagiarism Scenarios:** * Detect when students copy from AI-generated sources * Understand if matched content originates from authentic human sources * Distinguish between different types of content integrity issues **Make Informed Decisions:** * Assess the severity of plagiarism based on source authenticity * Develop appropriate responses based on the nature of the matched content * Build comprehensive content integrity policies ### Best Practices for Implementation [Section titled “Best Practices for Implementation”](#best-practices-for-implementation) To maximize the effectiveness of AI Source Match: **For Educators:** * Use results to facilitate discussions about AI usage and academic integrity * Consider source authenticity when determining appropriate responses to plagiarism * Develop clear policies that address both traditional plagiarism and AI-source copying **For Publishers:** * Implement AI Source Match as part of content verification workflows * Use insights to understand content originality in submissions * Maintain transparency about detection methods with contributors **For Content Managers:** * Integrate AI Source Match into content quality assurance processes * Use results to assess content authenticity across digital platforms * Develop comprehensive content integrity standards ## Technical Implementation [Section titled “Technical Implementation”](#technical-implementation) AI Source Match integrates seamlessly with existing Copyleaks API implementations. When enabled, the feature automatically enhances plagiarism detection results without requiring additional API calls or modifications to your existing workflow. **Key Implementation Notes:** * Default setting is `false` - must be explicitly enabled * Requires active internet scanning and AI detection capabilities * Results are included in standard plagiarism detection response objects * No additional authentication or setup required beyond existing API access ## Benefits and Use Cases [Section titled “Benefits and Use Cases”](#benefits-and-use-cases) AI Source Match provides value across multiple scenarios: **Academic Institutions:** * Enhanced student submission evaluation * Improved academic integrity enforcement * Better understanding of content originality issues **Publishing Industry:** * Comprehensive manuscript authenticity verification * Source material quality assessment * Content originality validation **Content Platforms:** * User-generated content quality control * Authenticity verification for submissions * Platform integrity maintenance --- # Data Hubs > Learn how to compare multiple documents against each other using Copyleaks' private and shared databases to find similarities and prevent plagiarism. Features Copyleaks’ Data Hubs provide a powerful way to compare multiple documents against each other, allowing you to detect similarities and prevent plagiarism within a large batch of content. This is particularly useful for educators who want to check if students have shared work or submitted identical content across a batch of assignments, or companies with large amounts of documents in order to find duplication. ## How It Works [Section titled “How It Works”](#how-it-works) Copyleaks provides two types of databases for storing and comparing documents: * **Shared Data Hub**: Global database that contains millions of documents from institutions worldwide. * **Private Cloud Hub**: Private database that is exclusive to your organization, ensuring that your documents remain confidential and secure. You can contribute documents to those databases and compare your documents against them. Note You can use both databases simultaneously to maximize detection coverage while keeping sensitive documents private. ## Understanding Your Database Options [Section titled “Understanding Your Database Options”](#understanding-your-database-options) You have two database options for storing and comparing your documents: ### Shared Data Hub (Free) [Section titled “Shared Data Hub (Free)”](#shared-data-hub-free) * Contains millions of documents from institutions worldwide * When you index a document, it becomes available for **everyone** to compare against * Contributes to the global academic integrity community * Your documents will be matched against submissions from other institutions ### Private Cloud Hub (Paid) [Section titled “Private Cloud Hub (Paid)”](#private-cloud-hub-paid) * Creates a completely **private database** for your organization only * Your documents stay within your private environment * Perfect for sensitive or confidential documents * Only you and your organization can access and compare against these documents * Built for large organizations looking to securely store and manage documents * Enables team collaboration with controlled access and user management Note You can use both databases simultaneously. Your documents can be stored in your Private Cloud Hub while also being compared against the Shared Data Hub for maximum detection coverage. ## How Cross-Comparison Works [Section titled “How Cross-Comparison Works”](#how-cross-comparison-works) The process involves two main steps: 1. **📥 Index your documents**: Upload documents to your chosen database using `IndexOnly` mode. 2. **🚀 Start the comparison**: Run a scan that compares all indexed documents against each other and your selected databases. This two-step approach ensures all documents are properly stored before the comparison begins. ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. #### Before you begin [Section titled “Before you begin”](#before-you-begin) Before you start, ensure you have the following: * An active Copyleaks account. If you don’t have one, **[sign up for free](https://api.copyleaks.com/signup)**. * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)**. 2. #### Installation [Section titled “Installation”](#installation) Choose your preferred method for making API calls. * HTTP You can interact with the API using any standard HTTP client. For a quicker setup, we provide a Postman collection. See our [Postman guide](/resources/postman) for instructions. * cURL * Ubuntu/Debian ```bash sudo apt-get install curl ``` * Windows Download it from [curl.se](https://curl.se). * macOS ```bash brew install curl ``` * Python ```bash sudo apt-get install curl ``` * JavaScript Download it from [curl.se](https://curl.se). * Java ```bash brew install curl ``` * Ubuntu/Debian ```bash pip install copyleaks ``` * Windows ```bash npm install plagiarism-checker ``` * macOS [Download from Maven](https://central.sonatype.com/artifact/com.copyleaks.sdk/copyleaks-java-sdk?smo=true) 3. #### Login [Section titled “Login”](#login) To perform a scan, we first need to generate an access token. For that, we will use the [login](/reference/actions/account/login) endpoint. The API key can be found on the [Copyleaks API Dashboard](https://api.copyleaks.com/dashboard). Upon successful authentication, you will receive a token that must be attached to subsequent API calls via the Authorization: Bearer `` header. This token remains valid for 48 hours. * HTTP ```http POST https://id.copyleaks.com/v3/account/login/api Headers Content-Type: application/json Body { "email": "your@email.address", "key": "00000000-0000-0000-0000-000000000000" } ``` * cURL ```bash export COPYLEAKS_EMAIL="your@email.address" export COPYLEAKS_API_KEY="your-api-key-here" curl --request POST \ --url https://id.copyleaks.com/v3/account/login/api \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data "{ \"email\": \"${COPYLEAKS_EMAIL}\", \"key\": \"${COPYLEAKS_API_KEY}\" }" ``` * Python ```python from copyleaks.copyleaks import Copyleaks EMAIL_ADDRESS = "your@email.address" API_KEY = "your-api-key-here" # Login to Copyleaks auth_token = Copyleaks.login(EMAIL_ADDRESS, API_KEY) print("Logged successfully!\nToken:", auth_token) ``` * JavaScript ```javascript const { Copyleaks } = require('plagiarism-checker'); const EMAIL_ADDRESS = "your@email.address"; const API_KEY = "your-api-key-here"; async function login() { const copyleaks = new Copyleaks(); const loginResult = await copyleaks.loginAsync(EMAIL_ADDRESS, API_KEY); console.log('Logged successfully!\nToken:', loginResult); return loginResult; } ``` * Java ```java import com.copyleaks.sdk.api.Copyleaks; String EMAIL_ADDRESS = "your@email.address"; String API_KEY = "00000000-0000-0000-0000-000000000000"; // Login to Copyleaks try { String authToken = Copyleaks.login(EMAIL_ADDRESS, API_KEY); System.out.println("Logged successfully!\nToken: " + authToken); } catch (CommandException e) { System.out.println("Failed to login: " + e.getMessage()); System.exit(1); } ``` **Response** ```json { "access_token": "", ".issued": "2025-07-31T10:19:40.0690015Z", ".expires": "2025-08-02T10:19:40.0690016Z" } ``` Note Save this token! It’s valid for 48 hours and can be reused for subsequent API calls. 4. #### Index Your Documents [Section titled “Index Your Documents”](#index-your-documents) For each document you want to include in the comparison, submit it for indexing using one of the submit endpoints (`submit-file`, `submit-url`, or `submit-ocr`). Set `properties.action` to `2` (`IndexOnly`) to store the document without scanning it immediately. This avoids consuming scan credits during the indexing phase. You also need to specify which repository to index the document into. Caution **Important**: Any other scanning options (like `internet` or `aiDetection`) must be configured during this indexing step. They cannot be changed later when you start the comparison scan. * HTTP ```http PUT https://api.copyleaks.com/v3/scans/submit/file/my-index-scan-1 Content-Type: application/json Authorization: Bearer { "base64": "SGVsbG8gd29ybGQh", "filename": "document1.txt", "properties": { "action": 2, "indexing": { "repositories": ["my-repo-id"] }, "sandbox": true } } ``` * cURL ```bash curl --request PUT \ --url https://api.copyleaks.com/v3/scans/submit/file/my-index-scan-1 \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "base64": "SGVsbG8gd29ybGQh", "filename": "document1.txt", "properties": { "action": 2, "indexing": { "repositories": ["my-repo-id"] }, "sandbox": true } }' ``` * Python ```python from copyleaks.copyleaks import Copyleaks from copyleaks.models.submit.document import FileDocument from copyleaks.models.submit.properties.scan_properties import ScanProperties from copyleaks.models.submit.properties.indexing_properties import IndexingProperties scan_id = "my-index-scan-1" properties = ScanProperties() properties.set_action(2) # IndexOnly properties.set_sandbox(True) indexing = IndexingProperties() indexing.add_repository("my-repo-id") properties.set_indexing(indexing) file_submission = FileDocument(base64="SGVsbG8gd29ybGQh", filename="document1.txt", properties=properties) response = Copyleaks.Scans.submit_file(auth_token, scan_id, file_submission) print(response) ``` You will need to wait for the `IndexOnly` webhook for each document to confirm it has been successfully indexed before proceeding to the next step. 5. #### Start Your Cross-Comparison [Section titled “Start Your Cross-Comparison”](#start-your-cross-comparison) Once all your documents are indexed, make a `PATCH` request to the [`/v3/scans/start`](/reference/actions/scans/start/) endpoint. This will begin the comparison scan for all the documents you indexed. Provide the list of `scanId`s from the previous step in the `trigger` array. * HTTP ```http PATCH https://api.copyleaks.com/v3/scans/start Content-Type: application/json Authorization: Bearer { "trigger": [ "my-index-scan-1", "my-index-scan-2", "my-index-scan-3" ], "errorHandling": 0 } ``` * cURL ```bash curl --request PATCH \ --url https://api.copyleaks.com/v3/scans/start \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "trigger": [ "my-index-scan-1", "my-index-scan-2", "my-index-scan-3" ], "errorHandling": 0 }' ``` 6. #### Interpreting The Results [Section titled “Interpreting The Results”](#interpreting-the-results) A successful `200 OK` response from the `start` endpoint will confirm which scans were started. The actual scan results for each document will be delivered asynchronously via the `Completed` webhook, just like a regular scan. **Example Success Response from `/v3/scans/start`:** ```json { "success": [ "my-index-scan-1", "my-index-scan-2", "my-index-scan-3" ], "failed": [] } ``` 7. #### 🎉Congratulations! [Section titled “🎉Congratulations!”](#congratulations) You have successfully started a cross-comparison scan between multiple documents in your Data Hub. ## 👥 Team Collaboration with Private Cloud Hub [Section titled “👥 Team Collaboration with Private Cloud Hub”](#-team-collaboration-with-private-cloud-hub) Multiple users can access, scan against, and index to your Private Cloud Hub. Manage permissions and data masking settings through the [admin dashboard](https://admin.copyleaks.com/repositories). ## 💡 Best Practices [Section titled “💡 Best Practices”](#-best-practices) * **Plan your scanning options**: Configure settings during indexing. * **Monitor indexing progress**: Wait for all `IndexOnly` webhooks before starting the comparison. * **Choose your database strategy**: Decide whether to use Private, Shared, or both. * **Batch efficiently**: Group related documents together. * **Respect API limits**: Monitor your [API dashboard](https://api.copyleaks.com/dashboard). ## 🚀 Next Steps [Section titled “🚀 Next Steps”](#-next-steps) [Create Private Cloud Hub ](https://admin.copyleaks.com/repositories)Set up your own private database for document storage. ## Support [Section titled “Support”](#support) Should you require any assistance, please contact [Copyleaks Support](https://help.copyleaks.com/hc/en-us/requests/new) or ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/copyleaks-api) with the `copyleaks-api` tag. ## Schedule a Live Demo Want to see how Data Hubs can help you manage and compare your documents? Our technical team can walk you through live examples of setting up a Private Cloud Hub, indexing large batches of content, and running cross-comparisons in a secure environment. [Book a Demo](https://copyleaks.com/book-a-demo) --- # Excluding and Preventing Indexing of Content > Learn how to exclude parts of a document from a scan and how to prevent documents from being added to the Copyleaks Internal Database. Features You have granular control over what content is scanned and what data is stored when you submit a document to Copyleaks. This guide covers two distinct types of exclusion: 1. **Excluding Parts of a Document from Scan Analysis**: This allows you to refine the plagiarism scan by ignoring specific elements like quotes or code blocks. 2. **Preventing a Document from Being Indexed**: This allows you to control whether the entire document is added to the Copyleaks Internal Database for future comparisons. *** ### Exclude Options [Section titled “Exclude Options”](#exclude-options) The `exclude` object can contain the following boolean properties: * `quotes`: If set to `true`, all text within quotation marks will be ignored. * `citations`: If set to `true`, citations and references will be ignored. * `references`: If set to `true`, the bibliography or reference list will be ignored. * `tableOfContents`: If set to `true`, the table of contents will be ignored. * `titles`: If set to `true`, titles and headings will be ignored. * `code`: If set to `true`, code blocks will be ignored. ### Request Example [Section titled “Request Example”](#request-example) * HTTP ```http PUT https://api.copyleaks.com/v3/scans/submit/file/my-scan-exclude-example Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN { "base64": "VGhpcyBpcyBhIHRlc3QgZmlsZS4gIkhlbGxvLCB3b3JsZCEiIGlzIGEgcXVvdGUuIChTbWl0aCwgMjAyMyk=", "filename": "document-with-exclusions.txt", "properties": { "webhooks": { "status": "https://my-server.com/webhook/{STATUS}" }, "exclude": { "quotes": true, "citations": true }, "sandbox": true } } ``` * cURL ```bash curl --request PUT \ --url https://api.copyleaks.com/v3/scans/submit/file/my-scan-exclude-example \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "base64": "VGhpcyBpcyBhIHRlc3QgZmlsZS4gIkhlbGxvLCB3b3JsZCEiIGlzIGEgcXVvdGUuIChTbWl0aCwgMjAyMyk=", "filename": "document-with-exclusions.txt", "properties": { "webhooks": { "status": "https://my-server.com/webhook/{STATUS}" }, "exclude": { "quotes": true, "citations": true }, "sandbox": true } }' ``` ### Response Example [Section titled “Response Example”](#response-example) When the scan is processed, the `scannedDocument` object in the response will reflect the number of words that were excluded. * 201 201 Created The scan was successfully created and is now processing. The excluded word count is reflected in the response. #### Example Response A typical response from this endpoint: Show full example (39 lines) ```json { "scannedDocument": { "scanId": "my-scan-exclude-example", "totalWords": 8, "totalExcluded": 4, "credits": 0, "expectedCredits": 1, "creationTime": "2025-08-10T10:00:00.000000Z", "metadata": { "filename": "document-with-exclusions.txt" }, "enabled": { "plagiarismDetection": true, "aiDetection": false, "explainableAi": false, "writingFeedback": false, "pdfReport": true, "cheatDetection": false, "aiSourceMatch": false }, "detectedLanguage": "en" }, "results": { "score": { "identicalWords": 0, "minorChangedWords": 0, "relatedMeaningWords": 0, "aggregatedScore": 0 }, "internet": [], "database": [], "batch": [], "repositories": [] }, "notifications": {}, "writingFeedback": {}, "status": 0, "developerPayload": "" } ``` ```json { "scannedDocument": { "scanId": "my-scan-exclude-example", "totalWords": 8, "totalExcluded": 4, "credits": 0, "expectedCredits": 1, "creationTime": "2025-08-10T10:00:00.000000Z", "metadata": { "filename": "document-with-exclusions.txt" }, "enabled": { "plagiarismDetection": true, "aiDetection": false, "explainableAi": false, // ... truncated ``` ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn how to securely receive and process notifications from Copyleaks. [Viewing Scan Results ](/concepts/features/how-to-display/)Understand the scan result format and how to display it to your users. --- # Export PDF Report > This document provides a comprehensive overview of the essential steps for creating and customizing PDF reports, setting up report generation, handling webhooks, and managing completed reports. Features This document provides a comprehensive overview of the essential steps for creating and customizing PDF reports, setting up report generation, handling webhooks, and managing completed reports. ## Introduction [Section titled “Introduction”](#introduction) The PDF API allows you to generate detailed and customizable PDF reports of scan results, including plagiarism checks, AI detection, and writing assistant feedback. These reports can be branded with your own logo and customized to match your organization’s needs. The PDF generation process is integrated with the Copyleaks scanning process, where you enable PDF creation during scan submission and then receive the generated PDF through webhooks. Copyleaks API also offers different PDF report versions, with version 3 being the latest and most feature-rich option that includes advanced formatting and comprehensive analysis visualization. ## Before you begin [Section titled “Before you begin”](#before-you-begin) Before you start using the PDF API, ensure you have the following: 1. An active Copyleaks account: If you don’t have one, [sign up here](https://copyleaks.com). 2. Familiarity with RESTful API principles: Basic knowledge of HTTP requests and responses. 3. A tool for HTTP requests: Use tools like cURL, Postman, or Copyleaks’ SDK. ## Installations [Section titled “Installations”](#installations) * HTTP [![Run In Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/25022653-e2c2987f-c1b5-462f-8590-71d28b7f4b32?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D25022653-e2c2987f-c1b5-462f-8590-71d28b7f4b32%26entityType%3Dcollection%26workspaceId%3D21147b7c-8cb3-4566-8f5d-8dfc6926eb5e) * cURL * Ubuntu/Debian ```bash sudo apt-get install curl ``` * Windows Download it from [curl.se](https://curl.se). * macOS ```bash brew install curl ``` * Python ```bash sudo apt-get install curl ``` * JavaScript Download it from [curl.se](https://curl.se). * Java ```bash brew install curl ``` * Ubuntu/Debian ```bash pip install copyleaks ``` * Windows ```bash npm i plagiarism-checker ``` * macOS [Download from Maven](https://search.maven.org/artifact/com.copyleaks.sdk/copyleaks-java-sdk) or `git clone https://github.com/Copyleaks/Java-Plagiarism-Checker.git` ## Login [Section titled “Login”](#login) To enable PDF report generation, we first need to generate an access token. We will use the [login](/reference/actions/account/login) endpoint. The API key can be found on the [Copyleaks API Dashboard](https://api.copyleaks.com/dashboard). Upon successful authentication, you will receive a token that must be attached to subsequent API calls via the Authorization: Bearer `` header. This token remains valid for 48 hours. Tip To boost performance, cache your login token and reuse it for all requests. The token remains valid for up to 48 hours, so you don’t need to log in repeatedly. The login method has stricter rate limits than other endpoints. * HTTP ```http POST https://id.copyleaks.com/v3/account/login/api Content-Type: application/json { "email": "", "key": "" } ``` * cURL ```bash curl -X POST "https://id.copyleaks.com/v3/account/login/api" \ -H "Content-Type: application/json" \ -d '{ "email": "", "key": "" }' ``` * Python ```python from copyleaks.copyleaks import Copyleaks from copyleaks.exceptions.command_error import CommandError from copyleaks.models.submit.document import FileDocument from copyleaks.models.submit.properties.scan_properties import ScanProperties from copyleaks.models.export import Export, ExportCrawledVersion, ExportResult, ExportPDF import base64 import random EMAIL_ADDRESS = "" API_KEY = "" # Login to Copyleaks try: auth_token = Copyleaks.login(EMAIL_ADDRESS, API_KEY) except CommandError as ce: response = ce.get_response() print(f"An error occurred (HTTP status code {response.status_code}):") print(response.content) exit(1) print("Logged successfully!\nToken:") print(auth_token) ``` * JavaScript ```javascript const copyleaks = require('copyleaks'); const EMAIL_ADDRESS = ""; const API_KEY = ""; // Login to Copyleaks const login = async () => { try { const authToken = await copyleaks.login(EMAIL_ADDRESS, API_KEY); console.log('Logged successfully!\nToken:', authToken); return authToken; } catch (error) { console.error('Failed to login:', error); process.exit(1); } }; ``` * Java ```java import com.copyleaks.sdk.api.Copyleaks; import com.copyleaks.sdk.api.exceptions.CommandException; import com.copyleaks.sdk.api.models.ScanProperties; import com.copyleaks.sdk.api.models.FileSubmission; import com.copyleaks.sdk.api.models.Export; import com.copyleaks.sdk.api.models.ExportCrawledVersion; import com.copyleaks.sdk.api.models.ExportResult; import com.copyleaks.sdk.api.models.ExportPDF; import java.util.Base64; import java.util.Arrays; String EMAIL_ADDRESS = ""; String API_KEY = ""; // Login to Copyleaks try { String authToken = Copyleaks.login(EMAIL_ADDRESS, API_KEY); System.out.println("Logged successfully!\nToken: " + authToken); } catch (CommandException e) { System.out.println("Failed to login: " + e.getMessage()); System.exit(1); } ``` ## Submit Scan with PDF Report Enabled [Section titled “Submit Scan with PDF Report Enabled”](#submit-scan-with-pdf-report-enabled) Use the [submit](/reference/actions/scans/submit-file/) file endpoint to send content for analysis while enabling PDF report generation. The key difference for PDF reports is including the `properties.pdf.create` parameter set to true. In the URL, supply your chosen scan ID, which serves as the identifier for the scan. Each scan needs to have a unique scan ID. The `properties.pdf.version` should be set to 3 to use the latest PDF report format with enhanced visuals and comprehensive data visualization. The `properties.pdf.title` allows you to customize the title that appears on the PDF report. For branding purposes, you can include your organization’s logo using `properties.pdf.largeLogo` (PNG format, base64 encoded, max 100kb, recommended size 185x50px). Note There are more customization options available for PDF reports, but this guide doesn’t cover all of them. For this tutorial, we also pass in `properties.sandbox` as **TRUE** to enable sandbox mode. The sandbox mode is free to use, but it returns mock results. Using sandbox mode while working on integrating with the Copyleaks API is helpful. * HTTP ```http PUT https://api.copyleaks.com/v3/scans/submit/file/ Authorization: Bearer Content-Type: application/json { "base64": "", "filename": "", "properties": { "webhook": "https://your.server/webhook?event={\{STATUS\}}", "sandbox": true, "pdf": { "create": true, "version": 3, "title": "Custom PDF Report Title", "customLogo": "" } } } ``` * cURL ```bash curl -X PUT "https://api.copyleaks.com/v3/scans/submit/file/" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "base64": "", "filename": "", "properties": { "webhook": "https://your.server/webhook?event={\{STATUS\}}", "sandbox": true, "pdf": { "create": true, "version": 3, "title": "Custom PDF Report Title", "customLogo": "" } } }' ``` * Python ```python # Submit a file for scanning with PDF generation enabled scan_id = ""; file_name = "" base64_file_content = base64.b64encode(b'Hello world.').decode('utf8') # or read your file and convert it into BASE64 presentation. print("Submitting a new file...") file_submission = FileDocument(base64_file_content, file_name) # Set scan properties with PDF options scan_properties = ScanProperties('https://your.server/webhook?event={\{STATUS\}}') scan_properties.set_sandbox(True) # Turn on sandbox mode. Turn off on production. # Enable PDF report generation scan_properties.set_pdf({ "create": True, "version": 3, "title": "Custom PDF Report Title" # Add base64_logo if needed }) file_submission.set_properties(scan_properties) # Submit the file for scanning Copyleaks.submit_file(auth_token, scan_id, file_submission) print("Sent to scanning with PDF report enabled") print("You will be notified, using your webhook, once the scan is completed.") ``` * JavaScript ```javascript // Submit a file for scanning with PDF report enabled const scanId = ""; // Replace with your unique scan ID const filename = ""; const fileContent = Buffer.from('Hello world').toString('base64'); // Convert file content to base64 const submitFile = async (authToken) => { const scanProperties = new copyleaks.ScanProperties('https://your.server/webhook?event={\{STATUS\}}'); scanProperties.setSandbox(true); // Enable sandbox mode for testing // Enable PDF report generation scanProperties.setPDF({ create: true, version: 3, title: "Custom PDF Report Title" // Add customLogo if needed }); const fileSubmission = new copyleaks.FileSubmission(fileContent, filename); fileSubmission.setProperties(scanProperties); try { await copyleaks.submitFile(authToken, scanId, fileSubmission); console.log('File submitted for scanning with PDF report enabled. Scan ID:', scanId); } catch (error) { console.error('Failed to submit file:', error); } }; ``` * Java ```java // Submit a file for scanning with PDF report enabled String scanId = ""; // Replace with your unique scan ID String filename = ""; String fileContent = Base64.getEncoder().encodeToString("Hello world".getBytes()); // Convert file content to base64 ScanProperties scanProperties = new ScanProperties("https://your.server/webhook?event={\{STATUS\}}"); scanProperties.setSandbox(true); // Enable sandbox mode for testing // Enable PDF report generation Map pdfProperties = new HashMap<>(); pdfProperties.put("create", true); pdfProperties.put("version", 3); pdfProperties.put("title", "Custom PDF Report Title"); // Add customLogo if needed scanProperties.setPDF(pdfProperties); FileSubmission fileSubmission = new FileSubmission(fileContent, filename); fileSubmission.setProperties(scanProperties); try { Copyleaks.submitFile(authToken, scanId, fileSubmission); System.out.println("File submitted for scanning with PDF report enabled. Scan ID: " + scanId); } catch (CommandException e) { System.out.println("Failed to submit file: " + e.getMessage()); } ``` ## PDF Customization Options [Section titled “PDF Customization Options”](#pdf-customization-options) The PDF report can be extensively customized to match your organization’s branding and requirements. | Property | Type | Description | Default | | ----------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | | `create` | boolean | Add a request to generate a customizable export of the scan report, in a pdf format. Set to true in order to generate a pdf report for this scan. | false | | `title` | string | Customize the title for the PDF report. Maximum 256 characters. | null | | `colors` | object | Object containing color customization options for the PDF report. | - | | `largeLogo` | string (base64) | Customize the logo image in the PDF report. Only supports **png** format. Max file size: 100kb. Recommended size: width 185px, height 50px. | null | | `rtl` | boolean | When set to true, the text in the report will be aligned from right to left. | false | | `version` | integer | PDF version to generate. By default version 1 will be generated as it is the current stable version. Version 3 is the latest iteration of the PDF report. Available values: **1**, **2**, **3** (Beta) | 1 | ## Wait For Scan Completion [Section titled “Wait For Scan Completion”](#wait-for-scan-completion) The scan and PDF report generation may take seconds to minutes, depending on the content, features used, and products enabled. Once the scan is complete successfully, Copyleaks API will send a completed webhook to the URL you supplied in the submit under `properties.webhooks.status`. At the same time, the **{STATUS}** is replaced with “completed”. The completed webhooks hold the summary information about the scan, such as the number of matched words, total words, and results found. If the scan finishes with an error, an error webhook will be sent to the `properties.webhooks.status` while the **{STATUS}** is replaced with **error**. Note For testing purposes, we recommend using a third-party service such as **request bin** or **ngrok**. ## Exporting PDF Reports [Section titled “Exporting PDF Reports”](#exporting-pdf-reports) Use the [export](/reference/actions/downloads/export/) method to retrieve the generated PDF report along with other scan artifacts. The export method sends webhooks with each artifact’s content to your specified target server. We supply the Scan ID we used earlier in the submit endpoint in the URL. The user chooses a unique Export ID for each export. For PDF reports specifically, we add a `pdf` section to the export request, providing an endpoint where the PDF should be sent when ready. * HTTP ```http POST https://api.copyleaks.com/v3/downloads//export/ Authorization: Bearer Content-Type: application/json { "completionWebhook": "https://your.server/webhook/export/completion", "pdf": { "endpoint": "https://your.server/webhook/export/pdf", "verb": "POST", "headers": { "key": "value", "key2": "value2" } } } ``` * cURL ```bash curl -X POST "https://api.copyleaks.com/v3/downloads//export/" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "completionWebhook": "https://your.server/webhook/export/completion", "pdf": { "endpoint": "https://your.server/webhook/export/pdf", "verb": "POST", "headers": { "key": "value", "key2": "value2" } } }' ``` * Python ```python # Export scan results including PDF report export_id = "" export = Export() export.set_completion_webhook('https://your.server/webhook/export/completion') # Export PDF report pdf_export = ExportPDF() pdf_export.set_endpoint('https://your.server/webhook/export/pdf') pdf_export.set_verb('POST') pdf_export.set_headers([['key', 'value'], ['key2', 'value2']]) # optional export.set_pdf(pdf_export) # Trigger the export Copyleaks.export(auth_token, scan_id, export_id, export) print("Export initiated. You will be notified via webhook once the export is completed.") ``` * JavaScript ```javascript // Export scan results including PDF report const exportId = ''; const exportResults = async (authToken, scanId) => { const exportRequest = new copyleaks.Export(); exportRequest.setCompletionWebhook('https://your.server/webhook/export/completion'); // Export PDF report const pdfExport = new copyleaks.ExportPDF(); pdfExport.setEndpoint('https://your.server/webhook/export/pdf'); pdfExport.setVerb('POST'); exportRequest.setPDF(pdfExport); try { await copyleaks.export(authToken, scanId, exportId, exportRequest); console.log('Export initiated with PDF report. Export ID:', exportId); } catch (error) { console.error('Failed to export results:', error); } }; ``` * Java ```java // Export scan results including PDF report String exportId = ""; Export exportRequest = new Export(); exportRequest.setCompletionWebhook("https://your.server/webhook/export/completion"); // Export PDF report ExportPDF pdfExport = new ExportPDF(); pdfExport.setEndpoint("https://your.server/webhook/export/pdf"); pdfExport.setVerb("POST"); exportRequest.setPDF(pdfExport); try { Copyleaks.export(authToken, scanId, exportId, exportRequest); System.out.println("Export initiated with PDF report. Export ID: " + exportId); } catch (CommandException e) { System.out.println("Failed to export results: " + e.getMessage()); } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn about webhooks in the Copyleaks API and how to handle real-time notifications. [Export Method ](/reference/actions/downloads/export/)Understand the export method for retrieving various scan artifacts including PDF reports. [Authenticity API Overview ](/reference/actions/scans/overview/)Learn about the comprehensive scanning API that supports multiple products and features. ## Support [Section titled “Support”](#support) Should you require any assistance or have inquiries, please contact [Copyleaks Support](https://help.copyleaks.com/hc/en-us/requests/new) or ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/copyleaks-api) with the `copyleaks-api` tag. We appreciate your interest in Copyleaks and look forward to supporting your efforts to maintain originality and integrity. --- # GenAI Scan Overview > Overview of Copyleaks' GenAI Scan feature, which provides AI-generated insights into scan results, including plagiarism, AI detection, and writing quality. Features Copyleaks’ Gen AI automatically reviews and summarizes each scan. It highlights the main data points, identifies key insights, and uses the author’s past work (if available) to add helpful context. This makes it easy to understand the writing quality, AI involvement, and any signs of plagiarism, all in one clear and simple overview. ## Properties Fields [Section titled “Properties Fields”](#properties-fields) | **Property** | **Type** | **Default** | **Description** | | --------------------------- | --------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------- | | `enable` | `boolean` | `false` | Enable Gen-AI Overview feature to extract key insights from the scan data. | | `ignoreAIDetection` | `boolean` | `false` | Ignore AI detection when generating the scan’s overview. Only applicable if AI detection was enabled. | | `ignorePlagiarismDetection` | `boolean` | `false` | Ignore plagiarism detection when generating the scan’s overview. Only applicable if plagiarism detection was enabled. | | `ignoreWritingFeedback` | `boolean` | `false` | Ignore writing assistant when generating the scan’s overview. Only applicable if the writing assistant was enabled. | | `ignoreAuthorData` | `boolean` | `false` | Ignore the author’s historical data when generating the scan’s overview. Only applicable if author ID was added to the request. | ## Examples [Section titled “Examples”](#examples) ### Request - Submit Endpoint Example [Section titled “Request - Submit Endpoint Example”](#request---submit-endpoint-example) ```json { "base64": "...", "filename": "file.txt", "properties": { "action": 0, "overview": { "enable": true, }, } } ``` ### Export Endpoint Example [Section titled “Export Endpoint Example”](#export-endpoint-example) This is the same description as other types of [export](/reference/actions/downloads/export/), just the key is `overview`. ```json { "overview": { "verb": "POST", "headers": [ [ "header-key", "header-value" ] ], "endpoint": "https://yoursite.com/export/overview" }, "completionWebhook": "https://yoursite.com/export/completed", "maxRetries": 3 } ``` ### Response [Section titled “Response”](#response) #### Example [Section titled “Example”](#example) ```json { "overview": "### Historical Author Data:\n- Four scans analyzed with an average plagiarism similarity of 13.18%\n- 4 instances of AI-generated content detected\n\n### Current Plagiarism Detection:\n- 0% overall plagiarism\n- Main sources: \n - yard.com (3.0%, 74 words)\n - brainly.com (3.2%, 45 words)\n - llcattorney.com (1.3%, 29 words)\n - montrosedemocrats.org (3.0%, 12 words)\n\n### AI Content Detection:\n- 100% AI-written content detected\n\n### Writing Assistant:\n- 100% writing quality with no errors in grammar, sentence structure, word choice, and mechanics.", "modelVersion": "v1" } ``` #### Response Fields [Section titled “Response Fields”](#response-fields) | Field | Type | Description | | -------------- | ------ | ----------------------------------------------------------------------- | | `overview` | string | A markdown-formatted string containing the Gen-AI overview of the scan. | | `modelVersion` | string | The version of the AI model used to generate the overview. | ## Next Steps [Section titled “Next Steps”](#next-steps) [Check for Plagiarism ](/guides/authenticity/detect-plagiarism-text)Detect plagiarism in text documents using the Copyleaks API. Search billions of sources to find unoriginal content. [Detect AI-Generated Content ](/guides/ai-detector/ai-text-detection)Detect AI-generated text via sync or async API calls. This guide covers sync detection—see the Authenticity API Guide for async. [Assess Grammar and Writing Quality ](/guides/writing/check-grammar)Get writing and grammar suggestions via API. Authenticate, submit text, and access full details in the docs. [Moderate Text ](/guides/moderation/moderate-text)Scan and moderate text content for unsafe or policy-relevant material across 10+ categories. --- # Ways to Display Reports > This document provides a comprehensive overview of the different methods available for viewing and displaying Copyleaks API scan results, including interactive reports, hosted solutions, PDF reports, and custom white-label implementations. Features Copyleaks offers multiple flexible options for displaying scan results to accommodate different technical requirements and use cases. Whether you prefer a ready-to-use hosted solution, want to integrate an interactive report into your existing application, need downloadable PDF reports, or require a completely custom implementation, Copyleaks provides the tools and data necessary to meet your specific needs. The display options range from plug-and-play solutions that require minimal technical implementation to comprehensive data exports that enable full customization of the user experience. Each method offers different levels of control, customization, and integration complexity to match your project requirements. All display methods are designed to work seamlessly with the Copyleaks scanning process and provide comprehensive visualization of plagiarism detection, AI content detection, and other scan results through modern, responsive interfaces. ## Viewing the Results [Section titled “Viewing the Results”](#viewing-the-results) ### Hosted Web Report [Section titled “Hosted Web Report”](#hosted-web-report) A responsive web page that can be opened in a new window or an iframe. This solution provides immediate access to professional report viewing without any development overhead or hosting requirements. The hosted report automatically updates with the latest features and improvements, ensuring users always have access to the most current functionality. Perfect for rapid deployment and scenarios where minimal technical implementation is preferred. [Embed Hosted Web Report ](/guides/display/embed-hosted-web-report/)Learn how to embed the Copyleaks hosted web report into your application. ### Open-Source Web Report [Section titled “Open-Source Web Report”](#open-source-web-report) Build your own Copyleaks Interactive Report from our [Github repository](https://github.com/copyleaks/plagiarism-report). You will need to host the report and send Copyleaks data to populate it. The Interactive Report provides a comprehensive, web-based interface that displays detailed scan results including highlighted matches, source comparisons, and AI detection results. This solution offers maximum customization flexibility while leveraging Copyleaks’ proven report interface design and functionality. Integration requires [Angular](https://angular.dev/) development skills and the ability to host and maintain the report within your own infrastructure. [Install Open-Source Report ](/guides/display/install-open-source-report/)Learn how to install and configure the Copyleaks open-source web report. ### PDF Report [Section titled “PDF Report”](#pdf-report) Enable the Copyleaks PDF Report by requesting it via the `properties.pdf.create` parameter in your scans. You can also make a variety of customizations to the Copyleaks PDF Report, like the title and logo used in the report. PDF reports are ideal for archival purposes, offline viewing, printing, and sharing with stakeholders who prefer traditional document formats. [Export PDF Report ](/concepts/features/export-pdf-report/)Learn how to create and customize PDF reports of your scan results. ### White Label Customization [Section titled “White Label Customization”](#white-label-customization) Some Copyleaks customers opt to build their own custom solutions for viewing data. We empower you with resourceful data like the start and length of plagiarism and detected AI, and you can build your own custom viewing platform designed to your preferences and specifications. This approach provides complete control over the user experience, allowing you to integrate scan results seamlessly into your existing application workflow and design language. [Learn more about Custom Implementations](/guides/authenticity/detect-plagiarism-text) ## Choosing the Right Display Method [Section titled “Choosing the Right Display Method”](#choosing-the-right-display-method) To help you decide which display method is right for you, here is a side-by-side comparison of the available options: | Display Method | Implementation Effort | Customization Level | Hosting | Primary Use Case | | :--------------------- | :-------------------- | :------------------ | :---------- | :---------------------------------------------------------- | | **Hosted Report** | Low | Low | Copyleaks | Quick setup, embedding in iframes, maintenance-free. | | **Open-Source Report** | Medium | High | Self-hosted | Full UI control, integration with your brand, feature-rich. | | **PDF Report** | Low | Medium | N/A | Offline sharing, archiving, formal documentation. | | **Custom (API Data)** | High | Complete | Self-hosted | Seamless integration into existing apps, unique workflows. | ## Support [Section titled “Support”](#support) Should you require any assistance or have inquiries about implementing any of these display methods, please contact [Copyleaks Support](https://help.copyleaks.com/hc/en-us/requests/new) or ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/copyleaks-api) with the `copyleaks-api` tag. We appreciate your interest in Copyleaks and look forward to supporting your implementation efforts. --- # Identical Matches Detection > Learn how to configure the Copyleaks API to detect only identical text matches by filtering out paraphrased content and minor changes. Features This document provides an overview of configuring the Copyleaks API to detect only identical text matches while filtering out paraphrased and minor changed content, focusing specifically on exact duplications. ## 📖 Introduction [Section titled “📖 Introduction”](#-introduction) The Identical Matches Only configuration is designed for teams that need to focus specifically on exact text duplications without the complexity of similarity detection. This approach is particularly useful for detecting direct copying and verbatim plagiarism. By focusing exclusively on identical matches, teams can efficiently identify the most straightforward cases of content duplication while reducing false positives and ambiguous similarity detections that might require additional review time. ## 🔧 Configuration [Section titled “🔧 Configuration”](#-configuration) To detect only identical matches, you must disable the settings for paraphrased content and minor changes in your API request. * **Disable Minor Changes**: Set `properties.filters.minorChangesEnabled` to `false`. * **Disable Paraphrased Content**: Set `properties.filters.relatedMeaningEnabled` to `false`. * **Enable Internet Scanning**: Set `properties.scanning.internet` to `true` to scan against online sources. Tip By setting both `minorChangesEnabled` and `relatedMeaningEnabled` to `false`, the API will only return results that are exact, word-for-word matches. ### Example JSON Configuration [Section titled “Example JSON Configuration”](#example-json-configuration) Here is an example of the `properties` object configured for an identical-only scan against internet sources. Request Body Properties ```json { "properties": { "filters": { "minorChangesEnabled": false, "relatedMeaningEnabled": false }, "scanning": { "internet": true } } } ``` ## 🚀 Next Steps [Section titled “🚀 Next Steps”](#-next-steps) After configuring your identical matches detection: [How to Display Scan Reports ](/concepts/features/how-to-display/)Learn how to interpret and display identical match results. [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Set up automated notifications for scan completion. [Detect Plagiarism in Text ](/guides/authenticity/detect-plagiarism-text)Explore additional scanning capabilities beyond identical matches. [Book a Demo ](https://copyleaks.com/book-a-demo)Get personalized guidance on optimizing your identical match detection. ## 💬 Support [Section titled “💬 Support”](#-support) Should you require any assistance, please contact [Copyleaks Support](https://help.copyleaks.com/hc/en-us/requests/new) or ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/copyleaks-api) with the `copyleaks-api` tag. --- # Prevent Self-Plagiarism and Author Conflicts > Learn how to use scan ID patterns to prevent an author's documents from being flagged as plagiarism against their own previous submissions. Features This guide helps you avoid situations where documents from the same author are flagged as plagiarism against each other. This is particularly important when authors submit multiple assignments, revisions, or when you want to prevent matches within the same author’s work while maintaining detection across different authors. ## 🔄 Understanding the Problem [Section titled “🔄 Understanding the Problem”](#-understanding-the-problem) When working with document databases, you may encounter scenarios where: * An author’s current document matches against their previous work from earlier submissions. * Multiple versions or drafts of the same document are flagged against each other. * Legitimate self-referencing or building upon previous work is incorrectly identified as plagiarism. This guide provides strategies to prevent these false positives while maintaining effective plagiarism detection. ## 🛡️ Prevention Strategy: Smart Scan ID Structure [Section titled “🛡️ Prevention Strategy: Smart Scan ID Structure”](#️-prevention-strategy-smart-scan-id-structure) The best strategy is to design a strategic `scanId` for each submission. A well-structured ID makes it easy to include or exclude specific groups of documents from a scan. Caution **Important**: The maximum `scanId` length is 36 characters. Plan your structure accordingly. ### Example ID Structures [Section titled “Example ID Structures”](#example-id-structures) **Basic Structure:** * `-` (e.g., `author123-essay1`, `emp456-report2`) **Extended Structure:** * `--` (e.g., `acmeuni-author123-essay1`, `techcorp-emp456-proposal`) This structure enables you to: * **Exclude by author**: Use `author123-*` or `emp456-*`. * **Include by organization**: Use `acmeuni-*` or `techcorp-*`. * **Focus on document types**: Use `*-final` or `*-report`. ## 🚫 Using Exclude Patterns [Section titled “🚫 Using Exclude Patterns”](#-using-exclude-patterns) Use the `properties.scanning.exclude.idPattern` parameter to exclude specific patterns from your scan results. The `*` character acts as a wildcard. ```json { "properties": { "scanning": { "exclude": { "idPattern": "author123-*" } } } } ``` This example excludes all submissions with IDs starting with `author123-`. ## ✅ Using Include Patterns [Section titled “✅ Using Include Patterns”](#-using-include-patterns) Use the `properties.scanning.include.idPattern` parameter to *only* include specific patterns in your scan results. This is useful for limiting comparisons to specific groups, like an organization or a class. ```json { "properties": { "scanning": { "include": { "idPattern": "acmeuni-*" } } } } ``` This example will only compare the submitted document against other documents with IDs starting with `acmeuni-`. ## 📝 Implementation Examples [Section titled “📝 Implementation Examples”](#-implementation-examples) ### Example 1: Exclude Same Author’s Previous Work [Section titled “Example 1: Exclude Same Author’s Previous Work”](#example-1-exclude-same-authors-previous-work) ```json { "properties": { "scanning": { "copyleaksDb": { "includeMySubmissions": true, "includeOthersSubmissions": true }, "exclude": { "idPattern": "author123-*" } } } } ``` ### Example 2: Compare Only Within Same Organization [Section titled “Example 2: Compare Only Within Same Organization”](#example-2-compare-only-within-same-organization) ```json { "properties": { "scanning": { "repositories": [{ "id": "assignment_repository", "includeMySubmissions": true, "includeOthersSubmissions": true }], "include": { "idPattern": "acmeuni-*" } } } } ``` ## 💡 Best Practices [Section titled “💡 Best Practices”](#-best-practices) * **📋 Plan your ID structure**: Design scan ID patterns from the beginning. * **🎯 Be specific**: Use precise patterns to avoid excluding too much or too little. * **📊 Test patterns**: Verify your patterns work correctly with sample data. * **🔄 Document conventions**: Maintain clear documentation of your ID structure for your team. * **📏 Keep it short**: Remember the 36-character limit. ## 🚀 Next Steps [Section titled “🚀 Next Steps”](#-next-steps) [Submit File Documentation ](/reference/actions/scans/submit-file/)Learn how to submit files with your custom scan IDs. [Compare Multiple Documents ](/concepts/features/data-hubs/)Learn about cross-document comparison strategies. ## Support [Section titled “Support”](#support) Should you require any assistance or have inquiries about implementing author conflict prevention, please contact [Copyleaks Support](https://help.copyleaks.com/hc/en-us/requests/new) or ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/copyleaks-api) with the `copyleaks-api` tag. --- # Detecting Text Manipulation > This document provides a comprehensive overview of using the Copyleaks API to detect text manipulation attempts in submitted documents. Text manipulation detection helps identify when users attempt to deceive detection systems through various deceptive techniques. Features This document provides a comprehensive overview of using the Copyleaks API to detect text manipulation attempts in submitted documents. Text manipulation detection helps identify when users attempt to deceive detection systems through various deceptive techniques. ## Introduction [Section titled “Introduction”](#introduction) The Text Manipulation detection feature is designed to identify sophisticated attempts to bypass detection systems. This feature recognizes when users employ various deceptive techniques to hide copied content or manipulate the scanning process. Text manipulation attempts can include: * **Hidden Characters**: Inserting invisible characters to break up text patterns * **Character Replacement**: Using special characters or symbols that look similar to normal letters * **Invisible or White Text**: Adding white text on white backgrounds or other concealment methods (works only in PDF and DOCX documents) * **Major Text Exclusion**: Attempting to exclude large portions of text from scanning By detecting these manipulation attempts, you can maintain the integrity of your plagiarism detection or AI detection process and ensure accurate results. ## Before You Begin [Section titled “Before You Begin”](#before-you-begin) To get the most out of this document, you should first be familiar with how to submit a basic scan. If you’re new to the process, we recommend starting with the guide below. Note **Detect Plagiarism in Text**: This guide walks you through the fundamentals of customizing your API request to scan for plagiarism. ## Getting Started [Section titled “Getting Started”](#getting-started) ### Enabling Text Manipulation Detection [Section titled “Enabling Text Manipulation Detection”](#enabling-text-manipulation-detection) To enable text manipulation detection in your scans, set the `properties.cheatDetection` parameter to `true`: ```json { "properties": { "cheatDetection": true } } ``` **Default**: `false` When enabled, the submitted document will be analyzed for various text manipulation techniques. If manipulation is detected, a scan alert will be added to the completed webhook. For more information on submitting documents, check out our documentation for URL, OCR, and File scans. ## Interpreting Scan Results [Section titled “Interpreting Scan Results”](#interpreting-scan-results) ### Scan Alerts [Section titled “Scan Alerts”](#scan-alerts) When text manipulation is detected, you’ll receive specific alerts in your scan completion webhook. These alerts are found at: ```plaintext notifications.alerts[] ``` ### Types of Text Manipulation Alerts [Section titled “Types of Text Manipulation Alerts”](#types-of-text-manipulation-alerts) | Alert Code | Title | Description | | --------------------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------- | | `suspected-cheating-detected` | Advanced Detection: Hidden Characters | Detected possible use of hidden characters to cheat the plagiarism scan | | `suspected-character-replacement` | Advanced Detection: Character Replacement | Detected possible use of special characters to cheat the plagiarism scan | | `suspected-white-text` | Suspected Cheating: Invisible Text | Detected possible use of invisible or white text - switch to textual version to see all text | | `text-mostly-excluded` | Advanced Detection: Major Text Exclusion | Detected possible attempt to exclude the majority of text from scanning | | `cheat-detection-failed` | Advanced Detection Failed | Unable to validate that there was no manipulation in the submitted document | For a complete list of all possible alerts, see our Scan Alerts documentation. ### Example Alert Response [Section titled “Example Alert Response”](#example-alert-response) ```json { "notifications": { "alerts": [ { "code": "suspected-character-replacement", "title": "Advanced Detection: Character Replacement", "message": "We have detected possible use of special characters to cheat the plagiarism scan.", "category": 3 } ] } } ``` ## Best Practices [Section titled “Best Practices”](#best-practices) * **Monitor alerts**: Check for text manipulation alerts in your webhook responses * **Document findings**: Keep records of detected manipulation attempts for policy enforcement * **Handle failures**: Implement proper error handling for cases where detection fails * **Stay updated**: Alert titles and messages may change over time as the system improves ## Next Steps [Section titled “Next Steps”](#next-steps) After implementing text manipulation detection: [Detect Plagiarism in Text ](/guides/authenticity/detect-plagiarism-text)Explore additional scanning capabilities beyond text manipulation detection. [How to Display Scan Reports ](/concepts/features/how-to-display)Learn how to present detection results to users effectively. ## Support [Section titled “Support”](#support) Should you require any assistance or have inquiries about implementing text manipulation detection, please contact [Copyleaks Support](https://help.copyleaks.com/hc/en-us/requests/new) or ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/copyleaks-api) with the `copyleaks-api` tag. We appreciate your interest in Copyleaks and look forward to supporting your efforts to maintain originality and integrity. By implementing text manipulation detection, you’re adding an essential layer of security to your plagiarism detection workflow, ensuring that sophisticated cheating attempts don’t go unnoticed. ## Need advanced content analysis? Get personalized guidance on implementing comprehensive content analysis with text manipulation detection and other advanced features. [Book a Demo](https://copyleaks.com/book-a-demo) --- # Choosing Your Scan ID > Learn how to choose a scan ID that fits your organization's needs while adhering to Copyleaks' requirements. Management A **Scan ID** is a unique identifier that you assign to every scan submitted to Copyleaks. This ID acts as a crucial link between your system and ours, allowing you to manage, track, and organize your scans effectively. Choosing a thoughtful and consistent naming convention for your Scan IDs is essential for leveraging advanced Copyleaks features, such as preventing self-plagiarism and managing large volumes of scans. ## Core Requirements [Section titled “Core Requirements”](#core-requirements) While you have the flexibility to choose a Scan ID that aligns with your internal system, there are a few limitations to keep in mind: * **Character Length**: Must be between 3 and 36 characters. * **Allowed Characters**: The Scan ID can include lower case characters `a-z`, digits `0-9` and special symbols `!@$&-=_()';:., ~`. We recommend using lower case letters, digits and dashes for simplicity. Unsupported Characters Uppercase letters (`A-Z`) and any characters not listed above are not permitted. If your internal IDs use unsupported characters, see the section on [Handling ID Mismatches](#handling-id-mismatches). ## Strategies for Naming Your Scan ID [Section titled “Strategies for Naming Your Scan ID”](#strategies-for-naming-your-scan-id) The best approach is to create a structured Scan ID that embeds useful information. This allows you to easily identify a scan based on its scan ID and use advanced features like include or exclude specific groups of documents from a scan. ### Recommended Structure [Section titled “Recommended Structure”](#recommended-structure) A highly effective structure is: `--` #### Examples [Section titled “Examples”](#examples) * `tech-corp-employee456-q3-report` * `acme-university-student123-final-thesis` Note In plagiarism scans, this structure enables powerful filtering capabilities: * **Exclude by author**: Use a pattern like `*-student123-*` to prevent a student’s new submission from being checked against their previous work. * **Include by organization**: Use `acme-university-*` to compare a document only against others from the same institution. * **Focus on document types**: Use `*-final-thesis` to analyze all final theses submitted. For more information, see the [Prevent Self-Plagiarism](/concepts/features/self-plagiarism/) guide. ## Handling ID Mismatches [Section titled “Handling ID Mismatches”](#handling-id-mismatches) If your internal system uses IDs that don’t meet Copyleaks’ requirements (e.g., they are too long or contain uppercase letters), the recommended solution is to generate a compliant Scan ID and maintain a mapping table on your end. This table will link your internal entity ID to the corresponding Copyleaks Scan ID, ensuring seamless integration. | Your Internal ID | Copyleaks Scan ID | | :------------------- | :------------------- | | `USER-9876-DOC-A` | `user9876-doca` | | `Submission_ABC_123` | `submission-abc-123` | ## Next Steps [Section titled “Next Steps”](#next-steps) [Prevent Self-Plagiarism ](/concepts/features/self-plagiarism/)Learn more about how to exclude previous submissions from the same student to prevent self-plagiarism. [Submit a File ](/reference/actions/scans/submit-file/)See how to implement your Scan ID strategy when submitting a file for scanning. --- # Manage Your Credits > Learn how to manage your Copyleaks credits effectively to optimize usage and prevent unnecessary costs. Management Copyleaks provides a comprehensive suite of content integrity services through a flexible, credit-based API. To help you maximize the value of the platform and manage your usage effectively, it is essential to implement smart credit management strategies. Copyleaks offers robust tools to monitor and control your credit consumption, ensuring full transparency and predictability. This guide outlines the available options to help you get started. ## Price Check Before Scan [Section titled “Price Check Before Scan”](#price-check-before-scan) Some applications may not have visibility into document sizes before submission, as end-users directly upload files. This can lead to **unintended credit consumption** when scanning large documents. To mitigate this, Copyleaks recommends **pre-checking** the number of credits required for a scan before proceeding. This allows you to decide whether to continue with the scan or abort it, avoiding unnecessary charges. ### How to Enable Price Check [Section titled “How to Enable Price Check”](#how-to-enable-price-check) To activate the **Check-Credits** flow, set the `properties.action` parameter to `1` (Check-Credits) when submitting a document. In the webhook response, you will receive the expected cost of the scan without actually performing it. After receiving the response, you can decide whether to proceed with the scan or not. To start the scan use the [**Start**](/reference/actions/scans/start) endpoint. ## Confirming Scan Cost After Completion [Section titled “Confirming Scan Cost After Completion”](#confirming-scan-cost-after-completion) Once a scan is completed, Copyleaks sends a **[Completed Webhook](/reference/data-types/authenticity/webhooks/scan-completed)** to your application, including details about the **final cost** of the scan. By tracking this information, you can develop insights into your **expected service costs** and optimize your usage accordingly. Note You are only charged for **successfully completed** scans. If a scan fails due to an error, the credits will be **automatically refunded**. ## Programmatically Monitor Your Remaining Credits [Section titled “Programmatically Monitor Your Remaining Credits”](#programmatically-monitor-your-remaining-credits) Copyleaks API is designed to provide **full automation**, reducing the need for manual intervention. You can retrieve your **current credit balance** to implement various control mechanisms: * **Set spending limits** – Define a threshold (e.g., limit usage to 50% of the budget by mid-month) and configure your system to react accordingly. * **Trigger alerts** – Automatically send notifications when your remaining credits fall below a certain percentage (e.g., below 10%). This can be implemented as a **cron job** for regular monitoring. ### Retrieve Credit Balance [Section titled “Retrieve Credit Balance”](#retrieve-credit-balance) You can check your current credit balance using the **[Get Credits Balance](/reference/actions/scans/check-credits)** endpoint. This will return the number of credits available in your account. ## Set a Spend Limit on Automatic Refills [Section titled “Set a Spend Limit on Automatic Refills”](#set-a-spend-limit-on-automatic-refills) To prevent running out of credits during a billing cycle, **Copyleaks offers automatic refills**, ensuring that scans are never interrupted. ### Why Use Automatic Refills? [Section titled “Why Use Automatic Refills?”](#why-use-automatic-refills) * Ensures that ongoing scans are not disrupted. * Eliminates the need for manual intervention. However, **uncontrolled automatic refills can lead to unexpected costs**, especially if a bug in your application results in excessive scans. Best Practice Set a **maximum budget** for automatic refills to prevent unforeseen expenses. ### How to Enable Automatic Refills [Section titled “How to Enable Automatic Refills”](#how-to-enable-automatic-refills) You can manage this feature via the **billing settings** in your Copyleaks account. ## Predict Your Usage [Section titled “Predict Your Usage”](#predict-your-usage) To forecast your credit consumption, **Copyleaks provides access to historical usage data**. By retrieving your **usage history**, you can generate reports (in CSV format) to analyze past trends and predict future requirements. ### Retrieve Usage History [Section titled “Retrieve Usage History”](#retrieve-usage-history) You can programmatically retrieve a detailed history of your credit consumption using the **[API Usage History](/reference/actions/scans/usage-history)** endpoint. This allows you to fetch data for specific date ranges, which can then be exported or integrated into your own internal dashboards. By analyzing this historical data, you can identify usage patterns, track costs associated with different projects, and build more accurate forecasts for future credit needs. ## Wrap Up [Section titled “Wrap Up”](#wrap-up) The **Copyleaks API** offers extensive flexibility to help you manage credits efficiently. By leveraging these features strategically, you can **prevent excessive usage, optimize costs, and maintain control over your plagiarism detection workflows**. Use these tools **wisely** to ensure a cost-effective and seamless integration! ## Next Steps [Section titled “Next Steps”](#next-steps) [Start a Scan ](/reference/actions/scans/start/)Learn how to initiate a scan after checking the credit cost. [Completed Webhook ](/reference/data-types/authenticity/webhooks/scan-completed)Understand the details provided in the completed webhook, including the final scan cost. [Get Credit Balance ](/reference/actions/scans/check-credits/)Retrieve your current credit balance programmatically. [API Usage History ](/reference/actions/scans/usage-history/)Access your historical usage data to predict future credit consumption. --- # Best Practices for Optimizing Performance > Learn how to optimize performance when using Copyleaks APIs, including data compression, feature management, and scan submission strategies. Performance Copyleaks is designed for **scalability and high performance**, handling large workloads efficiently. To get the best results from your integration, follow these best practices to **optimize speed, reduce bottlenecks, and maximize efficiency**. ## Use Network Data Compression [Section titled “Use Network Data Compression”](#use-network-data-compression) Transmitting large amounts of data over the internet **slows down** performance. **Compressing data** can reduce payload size by **up to 70%**, speeding up processing times. ### Enable Request Compression [Section titled “Enable Request Compression”](#enable-request-compression) Compress the data before sending it to Copyleaks and add this header: ```http Content-Encoding: gzip ``` This is **especially useful** when submitting large files. ### Enable Response Compression [Section titled “Enable Response Compression”](#enable-response-compression) To receive compressed responses from Copyleaks, include this header in your request: ```http Accept-Encoding: gzip, compress ``` This ensures faster data transfer between your system and Copyleaks. ## Disable Unused Features [Section titled “Disable Unused Features”](#disable-unused-features) Copyleaks offers **many configurable features**, but enabling unnecessary ones can **slow down** scans. Only enable what you need. Some features to **disable if not needed**: | Feature | Description | Recommendation | | ------------------------ | ------------------------------------ | ------------------------------------------------- | | `properties.includeHtml` | Includes results in **HTML format** | Disable if plain text is enough. | | `properties.pdf.create` | Generates a **PDF report** | Turn off if you don’t need a PDF. | | `properties.expiration` | Defines how long scan data is stored | Use **7 days or less** for optimal speed. | | `properties.filters` | Narrows search results | Customize filters to **improve scan efficiency**. | Note Check the [Authenticity API methods](/reference/actions/scans/overview) for the full list of features you can toggle. ## Submit Scans at an Optimal Rate [Section titled “Submit Scans at an Optimal Rate”](#submit-scans-at-an-optimal-rate) Copyleaks runs on cloud infrastructure, dynamically scaling resources based on demand. However, submitting too many requests at once can reduce efficiency. ### Avoid Overloading the System [Section titled “Avoid Overloading the System”](#avoid-overloading-the-system) * Instead of submitting all documents at once, send them gradually at a controlled rate (`N` calls per second). * If handling large volumes (e.g., 1M+ files), adjust to the maximum allowed rate limit (see [Rate Limit Policy](/reference/data-types/authenticity/technical-specifications)). ### Prevent Slow Start Issues [Section titled “Prevent Slow Start Issues”](#prevent-slow-start-issues) * Don’t flood the system with a sudden burst of requests. * Instead, start with a low rate and gradually increase to maintain stable performance. Note Need higher limits? **We offer custom plans** for large-scale users. Contact us at ****. ## Adjust Sensitivity for Speed vs. Accuracy [Section titled “Adjust Sensitivity for Speed vs. Accuracy”](#adjust-sensitivity-for-speed-vs-accuracy) Copyleaks supports different **sensitivity levels**, balancing **speed** and **comprehensiveness** based on your needs. Set the **`properties.sensitivityLevel`** value based on priority: | Level | Focus | Best For | | --------------- | ----------------- | ----------------------------- | | `1` | **Speed** | Quick scans, minimal checks. | | `3` *(default)* | **Balanced** | Most use cases. | | `5` | **Comprehensive** | Deep analysis, high accuracy. | Note We recommend level `3` for most users, but feel free to adjust as needed. ## Reuse Your Authentication Token [Section titled “Reuse Your Authentication Token”](#reuse-your-authentication-token) Each **JWT token** generated during login is **valid for 48 hours**. Tip Avoid unnecessary login calls, reuse your token for multiple requests within its validity period. For more information on obtaining a new token, refer to the **[Login API](/reference/actions/account/login)**. ## Next Steps [Section titled “Next Steps”](#next-steps) [Authenticity API Overview ](/reference/actions/scans/overview/)Explore the full list of features and options available for configuring your scans. [Technical Specifications ](/reference/data-types/authenticity/technical-specifications/)Understand the rate limit policy and other technical specifications for optimal API usage. [Login API ](/reference/actions/account/login/)Learn how to obtain and manage your authentication token for API access. --- # Handling Failures > Learn how to implement an exponential backoff strategy for retrying requests to the Copyleaks API. Performance This document outlines how to handle failures when interacting with the Copyleaks API, specifically focusing on implementing an **exponential backoff strategy** for retrying requests. ## Understanding Failure Responses [Section titled “Understanding Failure Responses”](#understanding-failure-responses) When making requests to the Copyleaks API, you may encounter various HTTP status codes indicating different types of failures. Here are some common ones: * **Error code 503:** Service Unavailable. Typically, this error will appear when Copyleaks is undergoing a maintenance period. You can be notified for these events using [**Copyleaks Status**](https://status.copyleaks.com) by subscribing to alerts. We broadcast a message days prior to the event time so users will be able to make preparations in advance. * **Error code 5xx**: Internal errors. There is an issue pertaining to Copyleaks’ service and\or the network. * **Error code 429**: Too many requests. Copyleaks, like other REST API services, has a rate limit policy that defines the maximum calls that can be made. Exceeding the maximum calls repeatedly will lead to temporary/permanent blocks. ## Suggested Retry Strategy [Section titled “Suggested Retry Strategy”](#suggested-retry-strategy) [**Exponential backoff**](https://en.wikipedia.org/wiki/Exponential_backoff) is a standard algorithm that helps applications define a retry strategy for consuming a network service. For these status codes mentioned above, we recommend implementing a retry algorithm by doing the following: 1. Make a request to the Copyleaks API. *** 2. If the requests fail, wait 1 + `rand_seconds_number` seconds. Then, retry. *** 3. If the requests fail, wait 2 + `rand_seconds_number` seconds. Then, retry. *** 4. If the requests fail, wait 4 + `rand_seconds_number` seconds. Then, retry. *** 5. … *** 6. And so on, up to `max_time` seconds. *** 7. Wait `max_time` and retry up to a limit of n times. *** ### Definitions: [Section titled “Definitions:”](#definitions) `rand_seconds_number` - Is a random number to add to the wait time. This is to prevent multiple clients from retrying at the same time, which can lead to a thundering herd problem. Suggested values is between 1 and 10 seconds. `max_time` - Is the maximum number of seconds to wait. Suggested value is 60 seconds. ## Next Steps [Section titled “Next Steps”](#next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn how to use webhooks to receive real-time notifications about scan statuses, including failures. [Technical Specifications ](/reference/data-types/authenticity/technical-specifications/)Review the technical specifications, including rate limits, to optimize your API usage. [Authenticity API Overview ](/reference/actions/scans/overview/)Explore the comprehensive Authenticity API for managing your plagiarism and AI detection processes. --- # Trust & Security > How we protect your data Trust & Security At Copyleaks, we are committed to the security of your data and privacy. We understand that our customers are entrusting us with their data, and we take that responsibility very seriously. We have implemented a comprehensive security program that includes administrative, technical, and physical safeguards to protect your data from unauthorized access, use, or disclosure. This page provides an overview of our security program, including our security architecture, data handling policies, and compliance certifications. ## Our Commitment to Security [Section titled “Our Commitment to Security”](#our-commitment-to-security) Our approach to security is built on several key pillars: ### Security Architecture and Infrastructure [Section titled “Security Architecture and Infrastructure”](#security-architecture-and-infrastructure) Our platform is built on a robust and secure foundation to protect your data at every level. * **Secure Network Design:** All platform components communicate through a secure internal company network. Access to this network is highly restricted, even for Copyleaks employees, and requires identity verification via an SSL client certificate. All communication within the internal network is secured using TLS v1.2 or newer. * **Cloud-Based Architecture:** We leverage a secure, cloud-based system architecture to provide scalable and reliable service. * **On-Premises Option:** For organizations requiring complete control over their data infrastructure, we offer on-premises Cloud Private Hubs. This allows you to retain all sensitive data within your own secured digital environment while utilizing our advanced detection technology. * **Continuous Monitoring:** Our systems are monitored 24/7, enabling us to respond instantly to any downtime or security incidents as they are detected. ### Data Encryption [Section titled “Data Encryption”](#data-encryption) Data safety is a cornerstone of our security mechanisms. We employ military-grade encryption to ensure your data is protected at all times. * **Encryption in Transit:** All data transferred to and from our platform is sent exclusively over secure channels (100% HTTPS) using SSL connections. * **Encryption at Rest:** All data saved on our platform is encrypted using the AES-256 standard. Encryption keys are managed by our Cloud providers and are rotated automatically to ensure maximum security. * **Data Backup:** We perform daily data backups, which are stored securely in our backup data centers. ## Compliance and Certifications [Section titled “Compliance and Certifications”](#compliance-and-certifications) Our products routinely undergo independent verification of privacy, security, and compliance controls to meet global standards and earn the trust of our users. * [**SOC 2 & SOC 3:**](https://en.wikipedia.org/wiki/System_and_Organization_Controls) Copyleaks is SOC 2 & 3 certified, demonstrating our commitment to securely managing data to protect our customers’ interests and privacy. Our SOC 3 report, audited by KPMG, is publicly available and outlines our high-powered system’s adherence to security, privacy, and confidentiality standards. * [**GDPR:**](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation) We are fully committed to adhering to the guidelines of the EU General Data Protection Regulation (GDPR). For our European customers, we offer the `copyleaks.eu` site with servers located in Germany, ensuring data processing remains within Europe. * [**PCI DSS:**](https://en.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard) We adhere to the Payment Card Industry Data Security Standard (PCI DSS). All payments are processed through Stripe, and we do not access or store any personal credit card information within the Copyleaks system. * [**NIST RMF:**](https://en.wikipedia.org/wiki/Risk_Management_Framework) We meet the guidelines of the NIST Risk Management Framework (RMF), a systematic process for managing information security risk developed by the U.S. National Institute of Standards and Technology. * [**Accessibility:**](https://copyleaks.com/accessibility) We believe technology should be accessible to everyone. Our platform is designed to be user-friendly for all, and our Voluntary Product Accessibility Templates (VPATs) are available for review. ## Application and Operational Security [Section titled “Application and Operational Security”](#application-and-operational-security) We maintain a rigorous application security program to protect our platform from threats. * **Vulnerability Management:** We routinely run vulnerability scans of our system components and use static code analyzers to detect problematic code before it is deployed. * **Regular Updates:** We regularly update the security of our products to protect against emerging threats. * **Responsible Disclosure:** We take security and privacy very seriously and encourage our users to report any identified vulnerabilities. If you believe you have found a security vulnerability, please submit a report with details such as your account email and a screenshot of the issue so our team can investigate. ## Useful Links [Section titled “Useful Links”](#useful-links) [Compliance & Certifications ](https://copyleaks.com/compliance-certifications)Learn about our compliance with global security standards and certifications. [Security Practices ](https://copyleaks.com/security-practices)Explore our security practices and measures to protect your data. --- # Webhooks Security > Learn how to secure your Copyleaks webhook endpoints against unauthorized access and ensure reliable communication. Trust & Security Communication with the Copyleaks service is conducted via RESTful requests and responses. Some operations involve asynchronous processing, during which a webhook notification is sent upon completion. Since your server must be accessible over the internet to receive webhook notifications, it is crucial to ensure that incoming requests originate from Copyleaks. To verify the authenticity of webhook requests, you can implement one or more of the following security measures. ## Authentication via HTTPS Client Certificate [Section titled “Authentication via HTTPS Client Certificate”](#authentication-via-https-client-certificate) Copyleaks webhook servers support **HTTPS connections** for secure communication with your endpoints, preventing unauthorized access to transmitted data. To enable this security feature, simply provide an **HTTPS endpoint** when submitting a file for scanning. To further secure your endpoint, Copyleaks employs **SSL client certificates** to authenticate webhook requests and confirm they originate from Copyleaks. Self-signed certificates are also supported. To retrieve the latest SSL client certificate thumbprints, use the following REST API request: ```http GET https://api.copyleaks.com/v2/security/client-certificates ``` Note This authentication method requires an HTTPS-enabled endpoint with SSL support. Non-secure HTTP connections do not support this feature. Since this list is **dynamic** and subject to change, we recommend setting up an automated process to update your environment daily. ## Authentication via Developer Payload [Section titled “Authentication via Developer Payload”](#authentication-via-developer-payload) An alternative method to prevent unauthorized access is by utilizing the `properties.developerPayload` field. To implement this: 1. Set the `developerPayload` value to a unique, secret string known only to you. 2. When receiving a webhook request, verify that the `developerPayload` in the request matches the expected value. 3. For enhanced security, consider encrypting the secret string with a private key known only to your system. By employing these authentication methods, you can safeguard your webhook endpoints and ensure secure communication with Copyleaks. ## Configuring Web Application Firewalls (WAF) [Section titled “Configuring Web Application Firewalls (WAF)”](#configuring-web-application-firewalls-waf) Many users have security measures such as AWS WAF, Cloudflare, or other Web Application Firewalls (WAF) in place, which may block webhook requests if they appear suspicious. If you are not receiving webhook notifications, it may be due to your WAF filtering the requests. ### Exclude Copyleaks Webhook Requests from WAF [Section titled “Exclude Copyleaks Webhook Requests from WAF”](#exclude-copyleaks-webhook-requests-from-waf) To resolve this, allow Copyleaks’ webhooks by adding a custom header to the requests and configuring your WAF to allow requests containing this header. This ensures that webhook notifications are received without interference from security mechanisms. By employing these authentication methods and considering WAF exclusions, you can safeguard your webhook endpoints and ensure secure, uninterrupted communication with Copyleaks. ## Static IP Addresses for Webhook Delivery Enterprise [Section titled “Static IP Addresses for Webhook Delivery Enterprise”](#static-ip-addresses-for-webhook-delivery-enterprise) For an enhanced layer of security, we offer enterprise customers the option to receive all webhook notifications from a static, predefined list of IP addresses. Enabling this feature allows you to configure your firewall to accept incoming traffic exclusively from our trusted servers, a practice known as IP allowlisting. This significantly reduces the risk of spoofing and ensures that your systems only process legitimate, verified requests from our platform. To have this feature enabled and to receive the list of static IPs for allowlisting, please contact your account manager. ## Next Steps [Section titled “Next Steps”](#next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn about the different types of webhooks and how to configure them. [Technical Specifications ](/reference/data-types/authenticity/technical-specifications/)Review the technical specifications, including security considerations for API interactions. [Export Method ](/reference/actions/downloads/export/)Understand how to export scan results, often delivered via webhooks. --- # 🎓 Maintaining Academic Integrity with the Copyleaks API > Learn how to integrate Copyleaks API for academic integrity, including plagiarism detection, AI content identification, and secure document management. Use Cases In today’s evolving academic landscape, upholding integrity and originality is fundamental. Copyleaks is dedicated to empowering instructors and academic institutions with the tools to champion authentic student work and maintain the highest academic standards. Our mission is to provide comprehensive solutions that address the core challenges of modern education, from traditional plagiarism to the nuances of AI-generated content. For developers, the Copyleaks API is the key to seamlessly integrating these critical capabilities directly into your institution’s unique ecosystem, such as a Learning Management System (LMS) or other academic platforms. By leveraging the API, you can empower instructors with robust plagiarism scanning, award-winning AI content detection, and a secure Shared Data Hub for assignments - all within the native workflows they use every day. This guide will walk you through the essential API steps, from indexing documents to configuring advanced scanning options, enabling you to build a powerful, integrated solution that supports your institution’s commitment to academic integrity. *** ## 📚 Before You Begin [Section titled “📚 Before You Begin”](#-before-you-begin) To get the most out of this document, you should first be familiar with how to submit a basic scan. If you’re new to the process, we recommend starting with the guide below. **[Detect Plagiarism in Text](/guides/authenticity/detect-plagiarism-text)**: This guide walks you through the fundamentals of customizing your API request to scan for plagiarism, AI-generated text and grammar correction. ## 📄 Submitting Your Documents [Section titled “📄 Submitting Your Documents”](#-submitting-your-documents) The Copyleaks API allows you to submit a variety of document types for analysis. You can [upload files](/reference/actions/scans/submit-file/) in formats such as PDF and DOCX. Additionally, you can submit documents by providing a [URL](/reference/actions/scans/submit-url/). Copyleaks also offers advanced capabilities, allowing you to [upload images](/reference/actions/scans/submit-ocr/) of text. This is made possible using Optical Character Recognition (OCR) technology. ## 🌐 Scanning with the Shared Data Hub [Section titled “🌐 Scanning with the Shared Data Hub”](#-scanning-with-the-shared-data-hub) ### What is the Shared Data Hub? [Section titled “What is the Shared Data Hub?”](#what-is-the-shared-data-hub) The Shared Data Hub is a comprehensive database containing millions of user-submitted documents from institutions worldwide. This powerful resource significantly enhances academic integrity by expanding the scope of plagiarism detection beyond traditional sources. ### How It Improves Academic Integrity [Section titled “How It Improves Academic Integrity”](#how-it-improves-academic-integrity) The Shared Data Hub is particularly effective at detecting instances where students submit work that isn’t their own. For example, it can detect when: * A student submits an assignment previously written by a friend * The same paper is submitted to different institutions * Work is recycled from previous semesters or academic years This detection capability helps maintain academic standards across educational institutions globally. ### Contributing to the Community [Section titled “Contributing to the Community”](#contributing-to-the-community) When you choose to scan against the Shared Data Hub, you’re not just benefiting from the collective database - you’re also contributing to it. Each document you submit helps strengthen the system for all users, creating a more robust detection network that benefits the entire academic community. This contribution also benefits your own institution directly. Once your students’ assignments are added to the database, they cannot be recycled or reused by other students at your institution in future semesters. ### Customizing Your Scan Settings [Section titled “Customizing Your Scan Settings”](#customizing-your-scan-settings) You have full control over how your documents are compared within the Shared Data Hub: * **Compare against your institution’s submissions**: Use the `properties.scanning.copyleaksDb.includeMySubmissions` parameter to scan against documents from your own institution * **Compare against other institutions’ submissions**: Use the `properties.scanning.copyleaksDb.includeOthersSubmissions` parameter to scan against submissions of other users in the network * **Use both options**: Enable both parameters for the most comprehensive plagiarism detection ### Automatic Indexing and Management [Section titled “Automatic Indexing and Management”](#automatic-indexing-and-management) After completing a scan, your document is automatically indexed and stored within the Shared Data Hub. This makes it available for future comparisons against new submissions at your institution. 🗑️ If you need to remove a document from the database, you can use our [delete request](/reference/actions/scans/delete/) and set the `purge` parameter to `true`. This will completely remove the document from the Shared Data Hub. ### Benefits of Using the Shared Data Hub [Section titled “Benefits of Using the Shared Data Hub”](#benefits-of-using-the-shared-data-hub) * **Broader Detection**: Access to millions of documents increases the likelihood of identifying plagiarism * **Cross-Institutional Protection**: Detect submissions that may have originated from other schools * **Internal Protection**: Prevent students from reusing assignments within your own institution * **Community Collaboration**: Help build a stronger academic integrity ecosystem for everyone By leveraging the Shared Data Hub, you’re taking advantage of one of the most comprehensive plagiarism detection resources available while contributing to the fight against academic dishonesty. ## 🌍 Scanning Against the Internet [Section titled “🌍 Scanning Against the Internet”](#-scanning-against-the-internet) To scan against a vast range of online sources, including many academic journals, set the `properties.scanning.internet` parameter to `true`. Internet results will be included in the [Scan Completion Webhook](/reference/data-types/authenticity/webhooks/scan-completed). ## 🤖 Detecting AI-Generated Content [Section titled “🤖 Detecting AI-Generated Content”](#-detecting-ai-generated-content) * To check for AI-written text, set the `properties.aiGeneratedText.detect` parameter to `true`. * Your AI detection results are delivered to a dedicated export webhook. For an example of how the data will be structured, see the [Export AI Detection Response documentation](/reference/data-types/authenticity/results/ai-detection/). ## 💬 Support [Section titled “💬 Support”](#-support) Need help implementing these solutions? Our team is here to assist you every step of the way. Whether you have technical questions or need guidance on best practices, don’t hesitate to reach out through [Copyleaks Support](https://help.copyleaks.com/hc/en-us/requests/new) or engage with our developer community on [StackOverflow](https://stackoverflow.com/questions/tagged/copyleaks-api) using the `copyleaks-api` tag. ## 🚀 Next Steps [Section titled “🚀 Next Steps”](#-next-steps) [Assess Grammar and Writing Quality ](/guides/writing/check-grammar/)Enhance your academic integrity solution with grammar and writing quality assessment. [Detecting Text Manipulation ](/concepts/features/text-manipulation/)Learn how to automatically identify text manipulation techniques being used to bypass detection. [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)To get scan results, you must set up webhooks. These automated messages will notify your system as scans are completed. [How to Display Scan Reports ](/concepts/features/how-to-display/)Learn how to present the scan data to your users with our customizable interactive report, a downloadable PDF, or by integrating the results directly into your own UI. ## Schedule a Live Demo Want to see how Copyleaks can enhance your academic integrity solutions? Our technical team can walk you through live examples of scanning against the Shared Data Hub, AI detection, and more. [Book a Demo](https://copyleaks.com/book-a-demo) --- # Content Integrity for Publishers > Learn how to maintain content integrity in pre-publication workflows using Copyleaks to detect plagiarism by comparing your content against billions of online sources, including academic journals, websites, and more. Use Cases In the digital age, ensuring the originality of your content is more crucial than ever. With the vast amount of information available online, it is easy for content to be copied or plagiarized without proper attribution. This can lead to significant issues for publishers, including legal challenges, loss of credibility, and damage to brand reputation. ### The Power of Internet-Wide Scanning [Section titled “The Power of Internet-Wide Scanning”](#the-power-of-internet-wide-scanning) The Copyleaks Plagiarism Checker API provides a powerful solution for detecting internet plagiarism, allowing you to compare your content against billions of online sources, including websites, articles, and academic journals. When you enable internet scanning, you are tapping into a vast and ever-growing database of online content. This allows you to: * **Verify Originality**: Ensure that your content is original before publishing. * **Protect Your IP**: Discover if your content has been plagiarized and published elsewhere without your permission. * **Maintain SEO Rankings**: Avoid penalties from search engines for duplicate content. ### Text Moderation for Safe Content [Section titled “Text Moderation for Safe Content”](#text-moderation-for-safe-content) The Copyleaks Text Moderation API is designed to detect harmful content, including hate speech, adult content, and other forms of inappropriate material. This is particularly useful for publishers who want to ensure that their content adheres to community guidelines and standards. ## 📚 Before You Begin [Section titled “📚 Before You Begin”](#-before-you-begin) Make sure you are familiar with Copyleaks scans by completing the [Check for Plagiarism](/guides/authenticity/detect-plagiarism-text) guide. ## Verify Content Originality Against Online Sources [Section titled “Verify Content Originality Against Online Sources”](#verify-content-originality-against-online-sources) ### Enabling Internet Scanning [Section titled “Enabling Internet Scanning”](#enabling-internet-scanning) To scan your document against internet sources, set the `properties.scanning.internet` parameter to `true`. This enables scanning against all non-paywalled online sources, including a variety of academic journals. For more information check out our documentation for [URL scans](/reference/actions/scans/submit-url/), [OCR scans](/reference/actions/scans/submit-ocr/), and [File scans](/reference/actions/scans/submit-file/). Enable Internet Scanning ```json { "properties": { "scanning": { "internet": true } } } ``` ### Receiving Results [Section titled “Receiving Results”](#receiving-results) Once your scan is completed, you’ll receive the results through the [completed webhook](/reference/data-types/authenticity/webhooks/scan-completed) event. This webhook is triggered when the scan process finishes successfully and contains the output information from the scan. The internet plagiarism results will be located in the `results.internet` array within the webhook payload. Each internet match includes: * `id` - Unique identifier for the match * `title` - Title of the matched content * `url` - Source URL where the match was found * `matchedWords` - Number of words that matched * `metadata` - Additional information about the source (author, organization, publish date, etc.) ### Example payload structure [Section titled “Example payload structure”](#example-payload-structure) ```json { "status": 0, "scannedDocument": { "scanId": "your-scan-id", "totalWords": 1250, "credits": 1 }, "results": { "internet": [ { "id": "match-id", "title": "Source Title", "url": "https://example.com/source", "matchedWords": 45, "metadata": { "author": "Author Name", "organization": "Publisher", "publishDate": "2023-01-01" } } ] } } ``` ## Moderating Content for Safety [Section titled “Moderating Content for Safety”](#moderating-content-for-safety) To ensure that your published content is safe and adheres to your community standards, you can use the Copyleaks Text Moderation API. This API allows you to scan text for harmful content across more than 10 categories, including hate speech, adult content, and other inappropriate material. ### Submitting Content for Moderation [Section titled “Submitting Content for Moderation”](#submitting-content-for-moderation) To moderate a piece of content, send a POST request to the `/v1/text-moderation/{scanId}/check` endpoint. In the request body, you will provide the text to be analyzed and specify which content moderation labels you want to check for. For example, a publisher might want to check for toxicity, profanity, and hate speech: Example Moderation Request ```json { "text": "Your text content to be moderated goes here.", "labels": [ { "id": "toxic-v1" }, { "id": "profanity-v1" }, { "id": "hate-speech-v1" } ] } ``` ### Understanding the Results [Section titled “Understanding the Results”](#understanding-the-results) The API will respond with a detailed analysis, pinpointing the exact segments of text that were flagged and for which categories. This allows you to build a workflow to automatically handle or review content that violates your policies. For a complete list of supported categories, see the [Content Moderation Labels](/reference/data-types/moderation/text-moderation-labels/) documentation. To get started with your integration, follow the [Moderate Text Content](/guides/moderation/moderate-text/) guide. ## 💬 Support [Section titled “💬 Support”](#-support) Should you require any assistance or have inquiries, please contact [Copyleaks Support](https://help.copyleaks.com/hc/en-us/requests/new) or ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/copyleaks-api) with the `copyleaks-api` tag. We appreciate your interest in Copyleaks and look forward to supporting your efforts to maintain originality and integrity. ## 🚀 Next Steps [Section titled “🚀 Next Steps”](#-next-steps) [Check for Plagiarism ](/guides/authenticity/detect-plagiarism-text)Detect plagiarism in text documents using the Copyleaks API. Search billions of sources to find unoriginal content. [Moderate Text ](/guides/moderation/moderate-text)Scan and moderate text content for unsafe or policy-relevant material across 10+ categories. ## Schedule a Live Demo Want to see how internet plagiarism detection works with your specific content? Our technical team can walk you through live examples of scanning against billions of online sources, including academic journals and websites. [Book a Demo](https://copyleaks.com/book-a-demo) --- # User-Generated Content Platforms > Learn how to maintain a safe online environment by integrating Copyleaks' context-aware AI for moderating user-generated content (UGC) at scale. Use Cases In today’s digital landscape, user-generated content (UGC) platforms face a multi-faceted challenge: fostering a vibrant community while protecting it from harmful, inauthentic, or unoriginal content. From blog comments and product reviews to social media posts and forum discussions, maintaining content integrity is crucial for brand reputation and user trust. Copyleaks provides a comprehensive suite of tools to address these challenges, including real-time Text Moderation, precise AI Content Detection, and robust Plagiarism Detection. ## Moderate User-Generated Content [Section titled “Moderate User-Generated Content”](#moderate-user-generated-content) User-generated content is the lifeblood of many platforms, but it also opens the door to significant risks. Harmful content—such as hate speech, harassment, and explicit material—can poison your community, drive away users, and damage your brand’s reputation. Manually reviewing every piece of content is often impossible at scale. This is where automated text moderation becomes essential for creating a safe and welcoming online environment. ### Understanding the Challenge [Section titled “Understanding the Challenge”](#understanding-the-challenge) User-generated content platforms across various industries face common moderation challenges. Blogs & Publishing Comment sections with hate speech, user-submitted articles with inappropriate content, and forums requiring real-time moderation. Reviews & Ratings Fake or spam reviews, personal attacks between users, and content that violates platform policies. AdTech & Marketing User-generated ad content with policy violations, harmful campaign descriptions, and community content needing compliance checks. Social Media High-volume content requiring instant, context-aware moderation decisions in real-time. ### Why Choose Copyleaks Text Moderation [Section titled “Why Choose Copyleaks Text Moderation”](#why-choose-copyleaks-text-moderation) Our text moderation AI goes beyond simple keyword matching. It understands context, nuance, and intent, providing highly accurate detection of harmful content while minimizing false positives. * **Superior Accuracy:** Exceptional detection rates with minimal false positives. * **Context Understanding:** Words are evaluated based on their context, not just their presence. * **Precise Location Detection:** Pinpoint exactly where in the text harmful content appears. * **Explanation-Driven:** Get clear reasoning for each moderation decision. * **Comprehensive Coverage:** Detect content across 10+ categories, including adult content, hate speech, harassment, self-harm, and more. ### Implementation Benefits [Section titled “Implementation Benefits”](#implementation-benefits) Enhanced Safety & Trust Maintain community standards with context-aware decisions, protecting users and your brand reputation while reducing legal and regulatory risks. Operational Efficiency Reduce manual moderation workload through precise automated flagging and scale your moderation efforts seamlessly as your platform grows. Superior User Experience Minimize false positives and provide clear explanations for moderation decisions, maintaining authentic user interactions while ensuring safety. ### Integration Made Simple [Section titled “Integration Made Simple”](#integration-made-simple) Our Text Moderation API integrates seamlessly into existing content workflows. 1. **Submit Content** Send user-generated text through our API for analysis. 2. **Receive Detailed Analysis** Get character-level flagging information with explanations for each detected violation. 3. **Take Informed Action** Implement automated or manual review based on precise, explained results. 4. **Monitor Performance** Track moderation effectiveness and adjust thresholds based on clear metrics. ## Detect AI-Generated Content [Section titled “Detect AI-Generated Content”](#detect-ai-generated-content) The rise of generative AI has introduced a new layer of complexity for UGC platforms. Inauthentic content, such as AI-generated fake reviews, spammy comments, or low-quality articles, can mislead users, manipulate ratings, and erode the trust you’ve built with your community. The Copyleaks AI Detector helps you maintain authenticity by identifying text produced by models like ChatGPT, Gemini, and others, allowing you to flag and manage potentially deceptive submissions. ### Submitting Content for AI Detection [Section titled “Submitting Content for AI Detection”](#submitting-content-for-ai-detection) To check for AI-generated content, send a POST request to the `/v2/writer-detector/{scanId}/check` endpoint. Example AI Detection Request ```json { "text": "Lions are social animals, living in groups called prides, typically consisting of several females, their offspring, and a few males. Female lions are the primary hunters, working together to catch prey. Lions are known for their strength, teamwork, and complex social structures." } ``` ### Understanding the Results [Section titled “Understanding the Results”](#understanding-the-results) The API returns a summary indicating the likelihood of AI-generated content, along with a detailed breakdown of the text. This allows you to flag potentially inauthentic user submissions, such as AI-written reviews or comments. For more details, follow the [Detect AI-Generated Text](/guides/ai-detector/ai-text-detection/) guide. ## Detect Plagiarism [Section titled “Detect Plagiarism”](#detect-plagiarism) For platforms that rely on original user submissions—such as publishing platforms, educational forums, or creative communities—plagiarism poses a significant threat. Submitting copied content can lead to copyright infringement issues, damage your platform’s credibility, and devalue the contributions of your authentic users. The Copyleaks Plagiarism Checker empowers you to verify the originality of every submission, protecting your platform and upholding your content standards. ### Submitting Content for Plagiarism Detection [Section titled “Submitting Content for Plagiarism Detection”](#submitting-content-for-plagiarism-detection) To check for plagiarism, send a POST request to the `/v3/scans/submit/file/{scanId}` endpoint. Example Plagiarism Detection Request ```json { "base64": "SGVsbG8gd29ybGQh", "filename": "file.txt", "properties": { "webhooks": { "status": "https://yoursite.com/webhook/{STATUS}/my-custom-id" }, "sandbox": true } } ``` ### Understanding the Results [Section titled “Understanding the Results”](#understanding-the-results-1) The API will notify you via webhooks when the scan is complete. You can then export the results to see if any plagiarism was detected. For more details, follow the [Detect Plagiarism in Text](/guides/authenticity/detect-plagiarism-text/) guide. ## 💬 Support [Section titled “💬 Support”](#-support) Need help implementing content moderation for your platform? Our team understands the unique challenges of UGC platforms and can provide tailored guidance. Contact [Copyleaks Support](https://help.copyleaks.com/hc/en-us/requests/new) or engage with our developer community on [StackOverflow](https://stackoverflow.com/questions/tagged/copyleaks-api) using the `copyleaks-api` tag. ## 📈 Next Steps [Section titled “📈 Next Steps”](#-next-steps) Ready to implement effective content moderation for your platform? [Text Moderation Guide ](/guides/moderation/moderate-text/)Step-by-step guide to integrating Copyleaks Text Moderation API into your platform. [Moderation Labels ](/reference/data-types/moderation/text-moderation-labels/)Detailed information about all supported content categories. [Detect AI Content ](/guides/ai-detector/ai-text-detection/)Identify AI-generated content in user submissions. [Book a Demo ](https://copyleaks.com/book-a-demo)Get personalized guidance on implementing content moderation. ## Schedule a Live Demo Want to see how Copyleaks can enhance your user-generated content moderation? Our technical team can walk you through live examples of real-time moderation and AI detection. [Book a Demo](https://copyleaks.com/book-a-demo) --- # Overview > Your journey to building with the Copyleaks API begins here. Find everything you need to integrate our powerful content integrity and authenticity tools. Get Started Find user guides, quickstarts, tutorials, API workflows, implementation use cases, and more to help you integrate and get the most out of Copyleaks. ## Begin Your Integration Follow our Quickstart guide for a step-by-step walkthrough of your first API call. [Quickstart](/get-started/quickstart) ## Guides [Section titled “Guides”](#guides) * Authenticity [Detect Plagiarism in Text ](/guides/authenticity/detect-plagiarism-text)Analyze plagiarism, AI-generated text, and writing quality via API. Supports async calls with webhooks and data masking. [Embed Hosted Web Report ](/guides/display/embed-hosted-web-report)Provides a seamless way to display detailed plagiarism and AI detection reports. [Install Open Source Report ](/guides/display/install-open-source-report)Integrating Copyleaks' web report module into your application to display plagiarism detection, AI content detection, and writing assistance reports. * AI Detection [Detect AI-Generated Content ](/guides/ai-detector/ai-text-detection)Detect AI-generated text via sync or async API calls. This guide covers sync detection—see the Authenticity API Guide for async. * Writing [Assess Grammar and Writing Quality ](/guides/writing/check-grammar)Get writing and grammar suggestions via API. Authenticate, submit text, and access full details in the docs. * Moderation [Moderate Text ](/guides/moderation/moderate-text)Scan and moderate text content for unsafe or policy-relevant material across 10+ categories. ## Official SDKs [Section titled “Official SDKs”](#official-sdks) [Python ](/resources/sdks/python) [JavaScript ](/resources/sdks/javascript) [Java ](/resources/sdks/java) [C# ](/resources/sdks/csharp) [PHP ](/resources/sdks/php) [Ruby ](/resources/sdks/ruby) ## Use Cases [Section titled “Use Cases”](#use-cases) [Academic Integrity ](/concepts/use-cases/academic-integrity)Uphold academic standards by detecting plagiarism and identifying AI-generated content in student submissions. [Content Integrity for Publishers ](/concepts/use-cases/publishers)Ensure originality and prevent copyright infringement before publishing. [User-Generated Content Platforms ](/concepts/use-cases/user-generated-content-platforms)Maintain a safe online environment by scanning user-generated content. ## Features [Section titled “Features”](#features) [Data Hubs ](/concepts/features/data-hubs)Learn how to compare multiple documents against each other using Copyleaks' private and shared databases to find similarities and prevent plagiarism. [Embed Hosted Web Report ](/guides/display/embed-hosted-web-report/)Ready-to-use UI hosted by Copyleaks for quick, secure, and fully-managed integration. [Detecting Text Manipulation ](/concepts/features/text-manipulation)Identify sophisticated attempts to bypass detection. [AI Logic ](/concepts/features/ai-logic/)Gain insight into the “why” behind our AI detection results and how to interpret them. --- # Quickstart > Get started with the Copyleaks API in under 5 minutes. This guide will walk you through creating an account, authenticating, and running your first AI detection scan. Get Started Welcome to the Copyleaks Quickstart! This guide will walk you through the essential steps to get you up and running with the Copyleaks API in just a few minutes. Let’s begin. ## 🚀 Let’s Get You Started [Section titled “🚀 Let’s Get You Started”](#-lets-get-you-started) 1. #### Create Your Account [Section titled “Create Your Account”](#create-your-account) Before you start, ensure you have the following: * An active Copyleaks account. If you don’t have one, **[sign up for free](https://api.copyleaks.com/signup)**. * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)**. 2. #### Installation [Section titled “Installation”](#installation) Choose your preferred method for making API calls. * HTTP You can interact with the API using any standard HTTP client. For a quicker setup, we provide a Postman collection. See our [Postman guide](/resources/postman) for instructions. * cURL * Ubuntu/Debian ```bash sudo apt-get install curl ``` * Windows Download it from [curl.se](https://curl.se). * macOS ```bash brew install curl ``` * Python ```bash sudo apt-get install curl ``` * JavaScript Download it from [curl.se](https://curl.se). * Java ```bash brew install curl ``` * Ubuntu/Debian ```bash pip install copyleaks ``` * Windows ```bash npm install plagiarism-checker ``` * macOS [Download from Maven](https://central.sonatype.com/artifact/com.copyleaks.sdk/copyleaks-java-sdk?smo=true) 3. #### Login [Section titled “Login”](#login) To perform a scan, we first need to generate an access token. For that, we will use the [login](/reference/actions/account/login) endpoint. The API key can be found on the [Copyleaks API Dashboard](https://api.copyleaks.com/dashboard). Upon successful authentication, you will receive a token that must be attached to subsequent API calls via the Authorization: Bearer `` header. This token remains valid for 48 hours. * HTTP ```http POST https://id.copyleaks.com/v3/account/login/api Headers Content-Type: application/json Body { "email": "your@email.address", "key": "00000000-0000-0000-0000-000000000000" } ``` * cURL ```bash export COPYLEAKS_EMAIL="your@email.address" export COPYLEAKS_API_KEY="your-api-key-here" curl --request POST \ --url https://id.copyleaks.com/v3/account/login/api \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data "{ \"email\": \"${COPYLEAKS_EMAIL}\", \"key\": \"${COPYLEAKS_API_KEY}\" }" ``` * Python ```python from copyleaks.copyleaks import Copyleaks EMAIL_ADDRESS = "your@email.address" API_KEY = "your-api-key-here" # Login to Copyleaks auth_token = Copyleaks.login(EMAIL_ADDRESS, API_KEY) print("Logged successfully!\nToken:", auth_token) ``` * JavaScript ```javascript const { Copyleaks } = require('plagiarism-checker'); const EMAIL_ADDRESS = "your@email.address"; const API_KEY = "your-api-key-here"; async function login() { const copyleaks = new Copyleaks(); const loginResult = await copyleaks.loginAsync(EMAIL_ADDRESS, API_KEY); console.log('Logged successfully!\nToken:', loginResult); return loginResult; } ``` * Java ```java import com.copyleaks.sdk.api.Copyleaks; String EMAIL_ADDRESS = "your@email.address"; String API_KEY = "00000000-0000-0000-0000-000000000000"; // Login to Copyleaks try { String authToken = Copyleaks.login(EMAIL_ADDRESS, API_KEY); System.out.println("Logged successfully!\nToken: " + authToken); } catch (CommandException e) { System.out.println("Failed to login: " + e.getMessage()); System.exit(1); } ``` **Response** ```json { "access_token": "", ".issued": "2025-07-31T10:19:40.0690015Z", ".expires": "2025-08-02T10:19:40.0690016Z" } ``` Note Save this token! It’s valid for 48 hours and can be reused for subsequent API calls. 4. #### Detect AI-Generated Text [Section titled “Detect AI-Generated Text”](#detect-ai-generated-text) Now let’s test some text. We’ll start with a sample that’s clearly AI-generated: * HTTP ```http POST https://api.copyleaks.com/v2/writer-detector/my-first-scan/check Authorization: Bearer your-access-token-here Content-Type: application/json { "text": "Artificial intelligence has revolutionized numerous industries by automating complex tasks and providing data-driven insights. Machine learning algorithms can analyze vast datasets to identify patterns that humans might miss. In healthcare, AI assists with diagnosis and drug discovery.", "sandbox": true } ``` * cURL ```bash curl --location "https://api.copyleaks.com/v2/writer-detector/my-first-scan/check" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer " \ --data "{ \"text\": \"Lions are social animals, living in groups called prides, typically consisting of several females, their offspring, and a few males. Female lions are the primary hunters, working together to catch prey. Lions are known for their strength, teamwork, and complex social structures.\", \"sandbox\": true }" ``` * Python ```python from copyleaks.models.submit.ai_detection_document import NaturalLanguageDocument scan_id = "my-first-scan" sample_text = "Lions are social animals, living in groups called prides, typically consisting of several females, their offspring, and a few males. Female lions are the primary hunters, working together to catch prey. Lions are known for their strength, teamwork, and complex social structures." document = NaturalLanguageDocument(sample_text) document.set_sandbox(True) response = Copyleaks.AiDetectionClient.submit_natural_language( auth_token, scan_id, document) print("Response:") print(response) print("AI Score:") print(str(response['summary']['ai']*100) + "%") ``` * JavaScript ```javascript const { CopyleaksNaturalLanguageSubmissionModel } = require('plagiarism-checker'); function logSuccess(response) { console.log('Success', response); console.log('AI Score:', response.summary.ai*100, '%'); } function logError(error) { console.error('Error', error); } async function detect(loginResult) { const copyleaks = new Copyleaks(); const sampleText = "Lions are social animals, living in groups called prides, typically consisting of several females, their offspring, and a few males. Female lions are the primary hunters, working together to catch prey. Lions are known for their strength, teamwork, and complex social structures."; const submission = new CopyleaksNaturalLanguageSubmissionModel(sampleText); submission.sandbox = true; copyleaks.aiDetectionClient .submitNaturalTextAsync(loginResult, Date.now() + 1, submission) .then((response) => { logSuccess(response); }) .catch((error) => { logError(error); }); } async function main() { const loginResult = await login(); await detect(loginResult); } main() ``` * Java ```java import com.copyleaks.sdk.api.models.AiDetectionDocument; import com.copyleaks.sdk.api.models.AiDetectionResponse; String scanId = "my-first-scan"; String sampleText = "Artificial intelligence has revolutionized numerous industries by automating complex tasks and providing data-driven insights. Machine learning algorithms can analyze vast datasets to identify patterns that humans might miss."; AiDetectionDocument submission = new AiDetectionDocument(sampleText); submission.setSandbox(true); try { AiDetectionResponse response = Copyleaks.aiDetectionClient.submitNaturalLanguage(authToken, scanId, submission); System.out.println("AI Score: " + response.getSummary().getAi()); } catch (CommandException e) { System.out.println("Error: " + e.getMessage()); } ``` **Response** AI Detection Results ```json { "summary": { "ai": 0.95, // 95% likely to be AI-generated "human": 0.05 // 5% likely to be human-written }, "results": [ { "classification": 2, // 2 = AI-generated, 1 = human-written "probability": 0.95 } ] } ``` ## 🎉 Congratulations! [Section titled “🎉 Congratulations!”](#-congratulations) **You have just:** * ✅ Authenticated with the Copyleaks API * ✅ Made your first AI detection request * ✅ Interpreted the results ### What’s Next? [Section titled “What’s Next?”](#whats-next) [Check for Plagiarism ](/guides/authenticity/detect-plagiarism-text)Detect plagiarism in text documents using the Copyleaks API. Search billions of sources to find unoriginal content. [Detect AI-Generated Content ](/guides/ai-detector/ai-text-detection)Detect AI-generated text via sync or async API calls. This guide covers sync detection—see the Authenticity API Guide for async. [Assess Grammar and Writing Quality ](/guides/writing/check-grammar)Get writing and grammar suggestions via API. Authenticate, submit text, and access full details in the docs. [Moderate Text ](/guides/moderation/moderate-text)Scan and moderate text content for unsafe or policy-relevant material across 10+ categories. ## Ready to scale beyond the basics? Get a personalized demo and discover how to process thousands of documents seamlessly, integrate Copyleaks into your existing systems, and achieve enterprise-grade accuracy for your specific use case. [Book a Demo](https://copyleaks.com/book-a-demo) --- # 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 Detector The Copyleaks AI Detection API is a powerful tool to determine if a given text was written by a human or generated by an AI. The API is synchronous, meaning you get the results in the same API call. This guide will walk you through the process of submitting text for AI detection and understanding the results. ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. #### Before you begin [Section titled “Before you begin”](#before-you-begin) Before you start, ensure you have the following: * An active Copyleaks account. If you don’t have one, **[sign up for free](https://api.copyleaks.com/signup)**. * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)**. 2. #### Installation [Section titled “Installation”](#installation) Choose your preferred method for making API calls. * HTTP You can interact with the API using any standard HTTP client. For a quicker setup, we provide a Postman collection. See our [Postman guide](/resources/postman) for instructions. * cURL * Ubuntu/Debian ```bash sudo apt-get install curl ``` * Windows Download it from [curl.se](https://curl.se). * macOS ```bash brew install curl ``` * Python ```bash sudo apt-get install curl ``` * JavaScript Download it from [curl.se](https://curl.se). * Java ```bash brew install curl ``` * Ubuntu/Debian ```bash pip install copyleaks ``` * Windows ```bash npm install plagiarism-checker ``` * macOS [Download from Maven](https://central.sonatype.com/artifact/com.copyleaks.sdk/copyleaks-java-sdk?smo=true) 3. #### Login [Section titled “Login”](#login) To perform a scan, we first need to generate an access token. For that, we will use the [login](/reference/actions/account/login) endpoint. The API key can be found on the [Copyleaks API Dashboard](https://api.copyleaks.com/dashboard). Upon successful authentication, you will receive a token that must be attached to subsequent API calls via the Authorization: Bearer `` header. This token remains valid for 48 hours. * HTTP ```http POST https://id.copyleaks.com/v3/account/login/api Headers Content-Type: application/json Body { "email": "your@email.address", "key": "00000000-0000-0000-0000-000000000000" } ``` * cURL ```bash export COPYLEAKS_EMAIL="your@email.address" export COPYLEAKS_API_KEY="your-api-key-here" curl --request POST \ --url https://id.copyleaks.com/v3/account/login/api \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data "{ \"email\": \"${COPYLEAKS_EMAIL}\", \"key\": \"${COPYLEAKS_API_KEY}\" }" ``` * Python ```python from copyleaks.copyleaks import Copyleaks EMAIL_ADDRESS = "your@email.address" API_KEY = "your-api-key-here" # Login to Copyleaks auth_token = Copyleaks.login(EMAIL_ADDRESS, API_KEY) print("Logged successfully!\nToken:", auth_token) ``` * JavaScript ```javascript const { Copyleaks } = require('plagiarism-checker'); const EMAIL_ADDRESS = "your@email.address"; const API_KEY = "your-api-key-here"; async function login() { const copyleaks = new Copyleaks(); const loginResult = await copyleaks.loginAsync(EMAIL_ADDRESS, API_KEY); console.log('Logged successfully!\nToken:', loginResult); return loginResult; } ``` * Java ```java import com.copyleaks.sdk.api.Copyleaks; String EMAIL_ADDRESS = "your@email.address"; String API_KEY = "00000000-0000-0000-0000-000000000000"; // Login to Copyleaks try { String authToken = Copyleaks.login(EMAIL_ADDRESS, API_KEY); System.out.println("Logged successfully!\nToken: " + authToken); } catch (CommandException e) { System.out.println("Failed to login: " + e.getMessage()); System.exit(1); } ``` **Response** ```json { "access_token": "", ".issued": "2025-07-31T10:19:40.0690015Z", ".expires": "2025-08-02T10:19:40.0690016Z" } ``` Note Save this token! It’s valid for 48 hours and can be reused for subsequent API calls. 4. #### Submit for Analysis [Section titled “Submit for Analysis”](#submit-for-analysis) Use the [Writer Detector Endpoint](/reference/actions/writer-detector/check) to send text for analysis. You need to provide a unique `scanId` for each submission. Tip For testing, set `"sandbox": true`. Sandbox mode is free and returns mock results. * HTTP ```http POST https://api.copyleaks.com/v2/writer-detector/my-scan-1/check Headers Authorization: Bearer Content-Type: application/json Body { "text": "Lions are social animals, living in groups called prides, typically consisting of several females, their offspring, and a few males. Female lions are the primary hunters, working together to catch prey. Lions are known for their strength, teamwork, and complex social structures.", "sandbox": true } ``` * cURL ```bash curl -X POST "https://api.copyleaks.com/v2/writer-detector/my-scan-1/check" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "text": "Lions are social animals, living in groups called prides, typically consisting of several females, their offspring, and a few males. Female lions are the primary hunters, working together to catch prey. Lions are known for their strength, teamwork, and complex social structures.", "sandbox": true }' ``` * Python ```python from copyleaks.copyleaks import Copyleaks from copyleaks.models.submit.document import NaturalLanguageDocument scan_id = "my-scan-1" sample_text = "Lions are social animals, living in groups called prides..." natural_language_submission = NaturalLanguageDocument(sample_text) natural_language_submission.set_sandbox(True) response = Copyleaks.AiDetectionClient.submit_natural_language(auth_token, scan_id, natural_language_submission) print(response) ``` * Node.js ```javascript const { Copyleaks, CopyleaksNaturalLanguageSubmissionModel } = require('plagiarism-checker'); const scanId = "my-ai-scan"; const sampleText = "Lions are social animals, living in groups called prides..."; const submission = new CopyleaksNaturalLanguageSubmissionModel(sampleText); submission.sandbox = true; const response = await copyleaks.aiDetectionClient.submitNaturalTextAsync(authToken, scanId, submission); console.log(response); ``` * Java ```java import classes.Copyleaks; import models.submissions.CopyleaksNaturalLanguageSubmissionModel; import models.responses.AIDetectionResponse; String scanId = "my-ai-scan"; String sampleText = "Lions are social animals, living in groups called prides..."; CopyleaksNaturalLanguageSubmissionModel submission = new CopyleaksNaturalLanguageSubmissionModel(sampleText); submission.setSandbox(true); AIDetectionResponse response = Copyleaks.aiDetectionClient.submitNaturalLanguage(authToken, scanId, submission); System.out.println("AI Score: " + response.getSummary().getAi()); ``` 5. #### Interpreting The Response [Section titled “Interpreting The Response”](#interpreting-the-response) For a complete breakdown of the response structure, see the [AI Detection Response](/reference/data-types/ai-detector/ai-detector) documentation. 6. #### 🎉Congratulations! [Section titled “🎉Congratulations!”](#congratulations) You have successfully submitted text for AI detection. You can now use the JSON response in your application to take further action based on the findings. ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) [API Reference ](/reference/actions/writer-detector/check)Explore the full API reference for the AI Detection endpoint. [AI Logic ](/concepts/features/ai-logic/)Learn how to use AI logic can help you interpret the results of AI text detection. [Accuracy & 3rd Party Evaluations ](https://copyleaks.com/blog/ai-detector-continues-top-accuracy-third-party)Discover how Copyleaks AI Detector maintains top accuracy in third-party evaluations. --- # Detect Plagiarism in Text > A comprehensive guide to using the Copyleaks Plagiarism Checker API for robust originality verification. Authenticity The Copyleaks API is the most powerful way to analyze your content for plagiarism. This API is asynchronous - you submit a scan, and Copyleaks notifies your server via webhooks when the results are ready to be retrieved. This guide will walk you through the process of submitting a scan, enabling plagiarism detection, and exporting the results. ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. #### Before you begin [Section titled “Before you begin”](#before-you-begin) Before you start, ensure you have the following: * An active Copyleaks account. If you don’t have one, **[sign up for free](https://api.copyleaks.com/signup)**. * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)**. 2. #### Installation [Section titled “Installation”](#installation) Choose your preferred method for making API calls. * HTTP You can interact with the API using any standard HTTP client. For a quicker setup, we provide a Postman collection. See our [Postman guide](/resources/postman) for instructions. * cURL * Ubuntu/Debian ```bash sudo apt-get install curl ``` * Windows Download it from [curl.se](https://curl.se). * macOS ```bash brew install curl ``` * Python ```bash sudo apt-get install curl ``` * JavaScript Download it from [curl.se](https://curl.se). * Java ```bash brew install curl ``` * Ubuntu/Debian ```bash pip install copyleaks ``` * Windows ```bash npm install plagiarism-checker ``` * macOS [Download from Maven](https://central.sonatype.com/artifact/com.copyleaks.sdk/copyleaks-java-sdk?smo=true) 3. #### Login [Section titled “Login”](#login) To perform a scan, we first need to generate an access token. For that, we will use the [login](/reference/actions/account/login) endpoint. The API key can be found on the [Copyleaks API Dashboard](https://api.copyleaks.com/dashboard). Upon successful authentication, you will receive a token that must be attached to subsequent API calls via the Authorization: Bearer `` header. This token remains valid for 48 hours. * HTTP ```http POST https://id.copyleaks.com/v3/account/login/api Headers Content-Type: application/json Body { "email": "your@email.address", "key": "00000000-0000-0000-0000-000000000000" } ``` * cURL ```bash export COPYLEAKS_EMAIL="your@email.address" export COPYLEAKS_API_KEY="your-api-key-here" curl --request POST \ --url https://id.copyleaks.com/v3/account/login/api \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data "{ \"email\": \"${COPYLEAKS_EMAIL}\", \"key\": \"${COPYLEAKS_API_KEY}\" }" ``` * Python ```python from copyleaks.copyleaks import Copyleaks EMAIL_ADDRESS = "your@email.address" API_KEY = "your-api-key-here" # Login to Copyleaks auth_token = Copyleaks.login(EMAIL_ADDRESS, API_KEY) print("Logged successfully!\nToken:", auth_token) ``` * JavaScript ```javascript const { Copyleaks } = require('plagiarism-checker'); const EMAIL_ADDRESS = "your@email.address"; const API_KEY = "your-api-key-here"; async function login() { const copyleaks = new Copyleaks(); const loginResult = await copyleaks.loginAsync(EMAIL_ADDRESS, API_KEY); console.log('Logged successfully!\nToken:', loginResult); return loginResult; } ``` * Java ```java import com.copyleaks.sdk.api.Copyleaks; String EMAIL_ADDRESS = "your@email.address"; String API_KEY = "00000000-0000-0000-0000-000000000000"; // Login to Copyleaks try { String authToken = Copyleaks.login(EMAIL_ADDRESS, API_KEY); System.out.println("Logged successfully!\nToken: " + authToken); } catch (CommandException e) { System.out.println("Failed to login: " + e.getMessage()); System.exit(1); } ``` **Response** ```json { "access_token": "", ".issued": "2025-07-31T10:19:40.0690015Z", ".expires": "2025-08-02T10:19:40.0690016Z" } ``` Note Save this token! It’s valid for 48 hours and can be reused for subsequent API calls. 4. #### Submit for Scanning [Section titled “Submit for Scanning”](#submit-for-scanning) Use the [Submit File Endpoint](/reference/actions/scans/submit-file) to send content for analysis. You need to provide a unique `scanId` for each submission. Tip For testing, set `"sandbox": true`. Sandbox mode is free and returns mock results. * HTTP ```http PUT https://api.copyleaks.com/v3/scans/submit/file/my-plagiarism-scan Headers Authorization: Bearer Content-Type: application/json Body { "base64": "SGVsbG8gd29ybGQh", "filename": "file.txt", "properties": { "webhooks": { "status": "https://your-server.com/webhook/{STATUS}" }, "sandbox": true } } ``` * cURL ```bash curl -X PUT "https://api.copyleaks.com/v3/scans/submit/file/my-plagiarism-scan" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "base64": "SGVsbG8gd29ybGQh", "filename": "file.txt", "properties": { "webhooks": { "status": "https://your-server.com/webhook/{STATUS}" }, "sandbox": true, "scanning": { "internet": true, }, "cheatDetection": false, } }' ``` * Python ```python import base64 from copyleaks.copyleaks import Copyleaks from copyleaks.models.submit.document import FileDocument from copyleaks.models.submit.properties.scan_properties import ScanProperties scan_id = "my-plagiarism-scan" base64_content = base64.b64encode(b'Hello world.').decode('utf8') scan_properties = ScanProperties("https://your-server.com/webhook/{STATUS}") scan_properties.set_sandbox(True) scan_properties.set_plagiarism_scan(True) # Enable Plagiarism scan file_submission = FileDocument(base64_content, "file.txt") file_submission.set_properties(scan_properties) Copyleaks.submit_file(auth_token, scan_id, file_submission) print("Sent to scanning...") ``` * Node.js ```javascript const { Copyleaks, CopyleaksFileSubmissionModel } = require('plagiarism-checker'); const scanId = "my-plagiarism-scan"; const base64Content = Buffer.from('Hello world').toString('base64'); const submission = new CopyleaksFileSubmissionModel( base64Content, 'file.txt', { webhooks: { status: 'https://your-server.com/webhook/{STATUS}' }, sandbox: true, plagiarism: { scan: true } // Enable Plagiarism scan } ); await copyleaks.submitFileAsync(authToken, scanId, submission); console.log('Sent to scanning...'); ``` * Java ```java import classes.Copyleaks; import models.submissions.CopyleaksFileSubmissionModel; import models.submissions.properties.*; import java.util.Base64; import java.nio.charset.StandardCharsets; String scanId = "my-plagiarism-scan"; String base64Content = Base64.getEncoder().encodeToString("Hello world".getBytes(StandardCharsets.UTF_8)); SubmissionWebhooks webhooks = new SubmissionWebhooks("https://your-server.com/webhook/{STATUS}"); SubmissionProperties properties = new SubmissionProperties(webhooks); properties.setSandbox(true); properties.setPlagiarism(new SubmissionPlagiarism(true)); // Enable Plagiarism scan CopyleaksFileSubmissionModel submission = new CopyleaksFileSubmissionModel(base64Content, "file.txt", properties); Copyleaks.submitFile(authToken, scanId, submission); System.out.println("Sent to scanning..."); ``` 5. #### Wait for Completion Webhook [Section titled “Wait for Completion Webhook”](#wait-for-completion-webhook) The scan can take some time. Once it’s complete, Copyleaks will send a [completed webhook](/reference/data-types/authenticity/webhooks/scan-completed) to the status URL you provided. This webhook contains a summary of the scan results, including any `result` IDs for found plagiarism matches. 6. #### Export Detailed Results [Section titled “Export Detailed Results”](#export-detailed-results) After the `completed` webhook arrives, use the [export endpoint](/reference/actions/downloads/export) to retrieve the detailed plagiarism [`results`](/reference/data-types/authenticity/results/new-plagiarism-result) using the `result` IDs you received in the completion webhook. We will also export the Crawled Version. The `crawledVersion` webhook contains the text and html version of the document. This can later be used in order to display the report. In addition, you should also specify a `completionWebhook` to receive notifications when the export is ready. * HTTP ```http POST https://api.copyleaks.com/v3/downloads/my-plagiarism-scan/export/ Headers Authorization: Bearer Content-Type: application/json Body { "completionWebhook": { "url": "https://your.server/webhook/export/completed", "headers": { "key": "value", "key2": "value2" }, "maxRetries": 3 }, "developerPayload": "custom_data_identifier", "crawledVersion": { "endpoint": "https://your.server/webhook/export/crawled", "verb": "POST", "headers": { "key": "value", "key2": "value2" } }, "results": [ { "id": "result-1", "endpoint": "https://your.server/webhook/export/result/result-1", "verb": "POST", "headers": { "key": "value", "key2": "value2" } } ] } ``` * cURL ```bash curl -X POST "https://api.copyleaks.com/v3/downloads/my-plagiarism-scan/export/my-export-1" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "completionWebhook": "https://your-server.com/webhook/export/completion", "developerPayload": "custom_data_identifier", "crawledVersion": { "endpoint": "https://your.server/webhook/export/crawled", "verb": "POST", "headers": { "key": "value", "key2": "value2" } }, "results": [ { "id": "", "endpoint": "https://your-server.com/webhook/export/result/1", "verb": "POST" } ] }' ``` * Python ```python from copyleaks.copyleaks import Copyleaks from copyleaks.models.export import Export, ExportResult scan_id = "my-plagiarism-scan" export_id = "my-export-1" export = Export() export.set_completion_webhook('https://your-server.com/webhook/export/completion') # Export a specific plagiarism result result1 = ExportResult() result1.set_id('') result1.set_endpoint('https://your-server.com/webhook/export/result/1', 'POST') export.set_results([result1]) Copyleaks.export(auth_token, scan_id, export_id, export) print("Export initiated.") ``` * Node.js ```javascript const { Export, ExportResult } = require('plagiarism-checker'); const scanId = 'my-plagiarism-scan'; const exportId = 'my-export-1'; const exportRequest = new Export(); exportRequest.setCompletionWebhook('https://your-server.com/webhook/export/{STATUS}'); // Export a specific plagiarism result const result1 = new ExportResult(); result1.setId(''); result1.setEndpoint('https://your-server.com/webhook/export/result/1', 'POST'); exportRequest.setResults([result1]); await copyleaks.exportAsync(authToken, scanId, exportId, exportRequest); console.log('Export initiated.'); ``` * Java ```java import classes.Copyleaks; import models.exports.Export; import models.exports.ExportResult; import java.util.Arrays; String scanId = "my-plagiarism-scan"; String exportId = "my-export-1"; Export exportRequest = new Export(); exportRequest.setCompletionWebhook("https://your-server.com/webhook/export/{STATUS}"); // Export a specific plagiarism result ExportResult result1 = new ExportResult(); result1.setId(""); result1.setEndpoint("https://your-server.com/webhook/export/result/1", "POST"); exportRequest.setResults(Arrays.asList(result1)); Copyleaks.export(authToken, scanId, exportId, exportRequest); System.out.println("Export initiated."); ``` 7. #### 🎉Congratulations! [Section titled “🎉Congratulations!”](#congratulations) You have successfully submitted a scan for plagiarism detection and exported the results. You can now handle the results in your application, display them to users, or take further actions based on the findings. ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn how to securely receive and process notifications from Copyleaks. [Viewing Scan Results ](/concepts/features/how-to-display/)Understand the scan result format and how to display it to your users. --- # Embed Hosted Web Report > This guide explains how to embed the Copyleaks Hosted Web Report in your application, allowing users to view detailed plagiarism and AI detection reports. Display The Copyleaks Hosted Web Report provides a seamless way to display detailed plagiarism and AI detection reports within your application. This guide will walk you through the process of embedding the report. ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. #### Before you begin [Section titled “Before you begin”](#before-you-begin) Before you begin, ensure you have the following: * A way to generate the required JSON data for the report. This is usually done by using the [Copyleaks API](/reference/actions/scans/submit-url/) to perform a scan and then exporting the results. * A publicly accessible server to host the JSON data file. 2. #### Generate the JSON Data [Section titled “Generate the JSON Data”](#generate-the-json-data) The Hosted Web Report requires a JSON file with a specific structure. This file contains all the necessary information to render the report correctly. Note For a detailed explanation of the JSON data structure, refer to the [JSON Schema reference](/reference/data-types/authenticity/webhooks/overview). Here is an example of the JSON data: ```json { "input": { "requestParams": { "headers": { "Authorization": "***token****", "header_key2": "header_value1", "header_key3": "header_value2" } }, "crawledVersion": "https://example.com/api/scans/scanid/scan-source.json", "completedWebhook": "https://example.com/api/scans/scanid/complete_result.json", "writingFeedback": "https://example.com/api/scans/scanid/writing_feedback.json", "result": "https://example.com/api/scans/scanid/results/{RESULT_ID}.json", "pdf": "https://example.com/api/scans/scanid/report.pdf" }, "customizations": { "companyLogo": "https://example.com/logo.svg", "accessExpired": { "httpResponsesCode": [ 403, 401 ], "customMessage": "*Custom Error Message*", "redirectUrl": "https://example.com/login" } } } ``` 3. #### Host the JSON File [Section titled “Host the JSON File”](#host-the-json-file) The JSON file must be hosted on a publicly accessible server. The URL of this file will be used to load the report. **Important Considerations:** * The URL must be publicly accessible. * Your server must allow Cross-Origin Resource Sharing (CORS) to the `https://report.sand-box.info` domain. 4. #### Embed the Report [Section titled “Embed the Report”](#embed-the-report) You can embed the Hosted Web Report in your application using an ` ``` ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) [Export Detailed Results ](/guides/authenticity/detect-plagiarism-text/)Learn how to export the results of a scan to generate the JSON data for the report. [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Explore the different customization options available for the Hosted Web Report. ## 💬 Support [Section titled “💬 Support”](#-support) If you have any questions or need help, please contact our [support team](https://help.copyleaks.com/hc/en-us/requests/new). We’re here to assist you with any integration needs. --- # Install Open Source Web Report > This guide provides detailed instructions for integrating Copyleaks' web report module into your Angular application to display plagiarism detection, AI content detection, and writing assistance reports while maintaining your brand identity. Display This guide provides detailed instructions for integrating Copyleaks’ web report module into your Angular application to display plagiarism detection, AI content detection, and writing assistance reports while maintaining your brand identity. Copyleaks Web Report is an [Angular](https://angular.dev/) module designed to integrate plagiarism and AI detection reporting seamlessly into your application. This module offers a user-friendly, engaging, and flexible interface for presenting plagiarism and AI content reports, showcasing the authenticity and uniqueness of submitted files or text. ### Key Features [Section titled “Key Features”](#key-features) * **Customizable Layouts**: Various layout options for report display * **Responsive Design**: Adapts to different screen sizes for consistent user experience * **API Integration**: Configurable endpoints for efficient data retrieval * **Accessibility Focused**: Inclusive design for a wider range of users * **Error Handling**: Effective management of data retrieval errors ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. #### Before you begin [Section titled “Before you begin”](#before-you-begin) Before you begin, ensure you have: * A [Copyleaks account](https://api.copyleaks.com/signup) with the ability to complete successful scans and store results * Server-side application with access to stored Copyleaks reports * Angular application (version compatibility detailed below) * Familiarity with the Copyleaks’ Authenticity Authenticity API. If you haven’t tried it yet, get started with the [Detect Plagiarism](/guides/authenticity/detect-plagiarism-text/) guide 2. #### Installation [Section titled “Installation”](#installation) First, select the version corresponding to your Angular version: | Angular | @copyleaks/ng-web-report | | ------- | ------------------------ | | 13 | Latest | Then, install the package: * npm ```bash npm install @copyleaks/ng-web-report --save ``` * yarn ```bash yarn add @copyleaks/ng-web-report ``` Finally, ensure the following peer dependencies are installed: | Dependency | Version | | -------------------------- | --------------- | | @angular/localize | ^13.1.1 | | @angular/material | ^13.1.1 | | @angular/flex-layout | ^13.0.0-beta.36 | | scroll-into-view-if-needed | ^2.2.28 | | ngx-skeleton-loader | ^5.0.0 | You can install them using: * npm ```bash npm install @angular/localize@^13.1.1 @angular/material@^13.1.1 @angular/flex-layout@^13.0.0-beta.36 scroll-into-view-if-needed@^2.2.28 ngx-skeleton-loader@^5.0.0 --save ``` * yarn ```bash yarn add @angular/localize@^13.1.1 @angular/material@^13.1.1 @angular/flex-layout@^13.0.0-beta.36 scroll-into-view-if-needed@^2.2.28 ngx-skeleton-loader@^5.0.0 ``` 3. #### Integration [Section titled “Integration”](#integration) The general integration process follows these steps: 1. Create a Copyleaks account 2. Use Copyleaks API to scan for plagiarism 3. Use the [Export Methods](/reference/actions/downloads/export/) to extract data and save it on your server/cloud 4. Create HTTP endpoints to access the stored data 5. Present the data in your website via the Copyleaks web report module 4. #### Implementation [Section titled “Implementation”](#implementation) Add `CopyleaksWebReportModule` and `HttpClientModule` to your module’s imports: app.module.ts ```typescript import { CopyleaksWebReportModule } from '@copyleaks/ng-web-report'; import { HttpClientModule } from '@angular/common/http'; @NgModule({ declarations: [AppComponent], imports: [ // ... CopyleaksWebReportModule, HttpClientModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule {} ``` Create an endpoint configuration object that tells the report component where to fetch data, and then add the component to your template. * your.component.ts your.component.ts ```typescript import { IClsReportEndpointConfigModel, IEndpointDetails } from '@copyleaks/ng-web-report'; @Component({ // ... }) export class YourComponent { public endpointConfig: IClsReportEndpointConfigModel; constructor() { // Define your endpoint configuration this.endpointConfig = { crawledVersion: { url: 'https://your-api.com/copyleaks/{scanId}/source', headers: { 'Authorization': 'Bearer your-token', 'Content-Type': 'application/json' } }, completeResults: { url: 'https://your-api.com/copyleaks/{scanId}/completed', headers: { 'Authorization': 'Bearer your-token', 'Content-Type': 'application/json' } }, result: { url: 'https://your-api.com/copyleaks/{scanId}/results/{RESULT_ID}', headers: { 'Authorization': 'Bearer your-token', 'Content-Type': 'application/json' } } // Optional: progress endpoint for real-time results // progress: { ... } }; } // Event handlers handleError(error: ReportHttpRequestErrorModel): void { // Your error handling logic here console.error('Report request error:', error); } handleUpdate(results: ICompleteResults): void { // Your logic for processing report updates here console.log('Complete results updated:', results); } } ``` * your.component.html your.component.html ```html ``` 5. #### Advanced Customization [Section titled “Advanced Customization”](#advanced-customization) You can add custom actions, tabs, and more to the report interface. Here are a few examples: **Custom Actions** ```html ``` **Custom Tabs** ```html Custom Analysis

Additional Analysis

Your custom analysis content here...

``` 6. #### 🎉 Congratulations! [Section titled “🎉 Congratulations!”](#-congratulations) You have successfully integrated the Copyleaks Web Report into your Angular application. You can now display detailed plagiarism and AI detection reports to your users. ## Query Parameters [Section titled “Query Parameters”](#query-parameters) The report component interprets several query parameters: | Parameter | Type | Description | | ----------- | ------ | --------------------------------------------------- | | contentMode | string | Determines content view type (‘text’ or ‘html’) | | sourcePage | number | Page number in text view pagination (starts from 1) | | suspectPage | number | Page number in text view pagination (starts from 1) | | suspectId | string | Identifier of the selected matching result | | alertCode | string | Code of the selected alert | ## Next Steps [Section titled “Next Steps”](#next-steps) [Package repository on Github ](https://github.com/Copyleaks/ng-web-report)Access the source code and contribute to the development of the Copyleaks Web Report. [Accessibility information (VPAT report) ](https://copyleaks.com/accessibility/)Review the Voluntary Product Accessibility Template (VPAT) report for accessibility compliance. ## Support [Section titled “Support”](#support) Should you require any assistance or have inquiries, please contact [Copyleaks Support](https://help.copyleaks.com/hc/en-us/requests/new) or ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/copyleaks-api) with the `copyleaks-api` tag. We appreciate your interest in Copyleaks and look forward to supporting your efforts to maintain originality and integrity. --- # Moderate Text Content > Scan and moderate text content for unsafe or policy-relevant material across 10+ categories with the Text Moderation API. Moderation The Copyleaks Text Moderation API empowers you to build safer online environments by proactively identifying and flagging harmful or risky content in real-time. With support for a broad range of categories—including hate speech, toxic language, and more—our API provides the tools you need to enforce your community standards effectively. This guide will walk you through submitting text for moderation and building a robust workflow based on the results. ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. #### Before you begin [Section titled “Before you begin”](#before-you-begin) Before you start, ensure you have the following: * An active Copyleaks account. If you don’t have one, **[sign up for free](https://api.copyleaks.com/signup)**. * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)**. 2. #### Installation [Section titled “Installation”](#installation) Choose your preferred method for making API calls. * HTTP You can interact with the API using any standard HTTP client. For a quicker setup, we provide a Postman collection. See our [Postman guide](/resources/postman) for instructions. * cURL * Ubuntu/Debian ```bash sudo apt-get install curl ``` * Windows Download it from [curl.se](https://curl.se). * macOS ```bash brew install curl ``` * Python ```bash sudo apt-get install curl ``` * JavaScript Download it from [curl.se](https://curl.se). * Java ```bash brew install curl ``` * Ubuntu/Debian ```bash pip install copyleaks ``` * Windows ```bash npm install plagiarism-checker ``` * macOS [Download from Maven](https://central.sonatype.com/artifact/com.copyleaks.sdk/copyleaks-java-sdk?smo=true) 3. #### Login [Section titled “Login”](#login) To perform a scan, we first need to generate an access token. For that, we will use the [login](/reference/actions/account/login) endpoint. The API key can be found on the [Copyleaks API Dashboard](https://api.copyleaks.com/dashboard). Upon successful authentication, you will receive a token that must be attached to subsequent API calls via the Authorization: Bearer `` header. This token remains valid for 48 hours. * HTTP ```http POST https://id.copyleaks.com/v3/account/login/api Headers Content-Type: application/json Body { "email": "your@email.address", "key": "00000000-0000-0000-0000-000000000000" } ``` * cURL ```bash export COPYLEAKS_EMAIL="your@email.address" export COPYLEAKS_API_KEY="your-api-key-here" curl --request POST \ --url https://id.copyleaks.com/v3/account/login/api \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data "{ \"email\": \"${COPYLEAKS_EMAIL}\", \"key\": \"${COPYLEAKS_API_KEY}\" }" ``` * Python ```python from copyleaks.copyleaks import Copyleaks EMAIL_ADDRESS = "your@email.address" API_KEY = "your-api-key-here" # Login to Copyleaks auth_token = Copyleaks.login(EMAIL_ADDRESS, API_KEY) print("Logged successfully!\nToken:", auth_token) ``` * JavaScript ```javascript const { Copyleaks } = require('plagiarism-checker'); const EMAIL_ADDRESS = "your@email.address"; const API_KEY = "your-api-key-here"; async function login() { const copyleaks = new Copyleaks(); const loginResult = await copyleaks.loginAsync(EMAIL_ADDRESS, API_KEY); console.log('Logged successfully!\nToken:', loginResult); return loginResult; } ``` * Java ```java import com.copyleaks.sdk.api.Copyleaks; String EMAIL_ADDRESS = "your@email.address"; String API_KEY = "00000000-0000-0000-0000-000000000000"; // Login to Copyleaks try { String authToken = Copyleaks.login(EMAIL_ADDRESS, API_KEY); System.out.println("Logged successfully!\nToken: " + authToken); } catch (CommandException e) { System.out.println("Failed to login: " + e.getMessage()); System.exit(1); } ``` **Response** ```json { "access_token": "", ".issued": "2025-07-31T10:19:40.0690015Z", ".expires": "2025-08-02T10:19:40.0690016Z" } ``` Note Save this token! It’s valid for 48 hours and can be reused for subsequent API calls. 4. #### Submit for Moderation [Section titled “Submit for Moderation”](#submit-for-moderation) Use the [Text Moderation Endpoint](/reference/actions/text-moderation/check) Provide a unique `scanId` for each request. Tip For testing, set `"sandbox": true`. Sandbox mode is free and returns mock results. * HTTP ```http POST https://api.copyleaks.com/v1/text-moderation/my-scan-1/check Authorization: Bearer Content-Type: application/json { "text": "Your text content to be moderated goes here.", "sandbox": true, "language": "en", "labels": [ { "id": "toxic-v1" }, { "id": "profanity-v1" }, { "id": "hate-speech-v1" } ] } ``` * cURL ```bash curl -X POST "https://api.copyleaks.com/v1/text-moderation/my-scan-1/check" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "text": "Copyleaks is a damn useful tool when youre tired of people copying your shit and posting it like its theirs. It doesnt just catch that crap — it can also flag stuff that’s offensive or even sexually suggestive garbage you don’t want in your public content. Platforms are flooded with toxic nonsense and hate these days, and Copyleaks helps clean that up before it turns into a PR nightmare. Whether its racist rants, plagiarism, or just some jerk spewing sexist crap, this tool can spot it.", "sandbox": false, "language": "en", "labels": [ { "id": "toxic-v1" }, { "id": "profanity-v1" }, { "id": "hate-speech-v1" } ] }' ``` * Python ```python from copyleaks.copyleaks import Copyleaks from copyleaks.models.submit.document import TextDocument from copyleaks.models.submit.properties.moderation_properties import ModerationLabel scan_id = "my-moderation-scan" sample_text = "Your text content to be moderated goes here." text_submission = TextDocument(sample_text) text_submission.set_sandbox(True) text_submission.set_language("en") text_submission.set_labels([ModerationLabel("toxic-v1"), ModerationLabel("profanity-v1")]) response = Copyleaks.moderate_text(auth_token, scan_id, text_submission) print(response) ``` * Node.js ```javascript const { Copyleaks, CopyleaksTextModerationModel, ModerationLabel } = require('plagiarism-checker'); const scanId = "my-moderation-scan"; const sampleText = "Your text content to be moderated goes here."; const submission = new CopyleaksTextModerationModel( sampleText, [new ModerationLabel("toxic-v1"), new ModerationLabel("profanity-v1")], 'en', true // sandbox ); const response = await copyleaks.moderateTextAsync(authToken, scanId, submission); console.log(response); ``` * Java ```java import classes.Copyleaks; import models.submissions.CopyleaksTextModerationModel; import models.submissions.properties.ModerationLabel; import models.responses.ModerationResponse; import java.util.Arrays; String scanId = "my-moderation-scan"; String sampleText = "Your text content to be moderated goes here."; CopyleaksTextModerationModel submission = new CopyleaksTextModerationModel( sampleText, Arrays.asList(new ModerationLabel("toxic-v1"), new ModerationLabel("profanity-v1")), "en", true // sandbox ); ModerationResponse response = Copyleaks.moderateText(authToken, scanId, submission); System.out.println(response); ``` 5. #### Interpret The Response [Section titled “Interpret The Response”](#interpret-the-response) The API returns a `legend` array that maps [labels](/reference/data-types/moderation/text-moderation-labels) IDs to numerical indices, and a `moderations` object that pinpoints the exact location of flagged content using those indices. * **`legend`**: A lookup table where each `id` (e.g., “toxic-v1”) corresponds to an `index`. * **`moderations.text.chars`**: Contains parallel arrays: * `starts`: An array of starting character positions for each flagged segment. * `lengths`: An array of character lengths for each segment. * `labels`: An array of numerical indices that correspond to the `legend`. Example Response ```json { "moderations": { "text": { "chars": { "labels": [ 2, 4 ], "starts": [ 27, 100 ], "lengths": [ 2, 8 ] } } }, "legend": [ { "index": 2, "id": "toxic-v1" }, { "index": 4, "id": "profanity-v1" } ] } ``` In this example, the content is flagged for “toxic-v1” starting at character 27 and for “profanity-v1” starting at character 100. 6. #### 🎉Congratulations! [Section titled “🎉Congratulations!”](#congratulations) You have successfully submitted text for moderation. You can now use the JSON response in your application to take further actions based on the findings. ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) [Moderation Labels ](/reference/data-types/moderation/text-moderation-labels/)See a complete list of all supported content moderation labels and their descriptions. [Full API Reference ](/reference/actions/text-moderation/check/)Explore the complete documentation for the Text Moderation endpoint and response object. --- # Assess Grammar & Writing Quality > This document outlines the essential steps for using the Writing Assistant API, covering scan execution and result management. Writing Get started with Copyleaks’ Writing Assistant API to detect and correct over 30 types of writing issues across grammar, mechanics, sentence structure, and word choice. The API is available in two ways: 1. **Sync:** Submit text via an HTTP request and receive the analysis in the response. 2. **Async:** Use the [Authenticity API](/guides/authenticity/detect-plagiarism-text) to submit larger documents and receive results via webhook. Note This guide focuses on the **synchronous** option. For asynchronous submissions, see the **[Authenticity API Guide](/guides/authenticity/detect-plagiarism-text)**. ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. #### Before you begin [Section titled “Before you begin”](#before-you-begin) Before you start, ensure you have the following: * An active Copyleaks account. If you don’t have one, **[sign up for free](https://api.copyleaks.com/signup)**. * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)**. 2. #### Installation [Section titled “Installation”](#installation) Choose your preferred method for making API calls. * HTTP You can interact with the API using any standard HTTP client. For a quicker setup, we provide a Postman collection. See our [Postman guide](/resources/postman) for instructions. * cURL * Ubuntu/Debian ```bash sudo apt-get install curl ``` * Windows Download it from [curl.se](https://curl.se). * macOS ```bash brew install curl ``` * Python ```bash sudo apt-get install curl ``` * JavaScript Download it from [curl.se](https://curl.se). * Java ```bash brew install curl ``` * Ubuntu/Debian ```bash pip install copyleaks ``` * Windows ```bash npm install plagiarism-checker ``` * macOS [Download from Maven](https://central.sonatype.com/artifact/com.copyleaks.sdk/copyleaks-java-sdk?smo=true) 3. #### Login [Section titled “Login”](#login) To perform a scan, we first need to generate an access token. For that, we will use the [login](/reference/actions/account/login) endpoint. The API key can be found on the [Copyleaks API Dashboard](https://api.copyleaks.com/dashboard). Upon successful authentication, you will receive a token that must be attached to subsequent API calls via the Authorization: Bearer `` header. This token remains valid for 48 hours. * HTTP ```http POST https://id.copyleaks.com/v3/account/login/api Headers Content-Type: application/json Body { "email": "your@email.address", "key": "00000000-0000-0000-0000-000000000000" } ``` * cURL ```bash export COPYLEAKS_EMAIL="your@email.address" export COPYLEAKS_API_KEY="your-api-key-here" curl --request POST \ --url https://id.copyleaks.com/v3/account/login/api \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data "{ \"email\": \"${COPYLEAKS_EMAIL}\", \"key\": \"${COPYLEAKS_API_KEY}\" }" ``` * Python ```python from copyleaks.copyleaks import Copyleaks EMAIL_ADDRESS = "your@email.address" API_KEY = "your-api-key-here" # Login to Copyleaks auth_token = Copyleaks.login(EMAIL_ADDRESS, API_KEY) print("Logged successfully!\nToken:", auth_token) ``` * JavaScript ```javascript const { Copyleaks } = require('plagiarism-checker'); const EMAIL_ADDRESS = "your@email.address"; const API_KEY = "your-api-key-here"; async function login() { const copyleaks = new Copyleaks(); const loginResult = await copyleaks.loginAsync(EMAIL_ADDRESS, API_KEY); console.log('Logged successfully!\nToken:', loginResult); return loginResult; } ``` * Java ```java import com.copyleaks.sdk.api.Copyleaks; String EMAIL_ADDRESS = "your@email.address"; String API_KEY = "00000000-0000-0000-0000-000000000000"; // Login to Copyleaks try { String authToken = Copyleaks.login(EMAIL_ADDRESS, API_KEY); System.out.println("Logged successfully!\nToken: " + authToken); } catch (CommandException e) { System.out.println("Failed to login: " + e.getMessage()); System.exit(1); } ``` **Response** ```json { "access_token": "", ".issued": "2025-07-31T10:19:40.0690015Z", ".expires": "2025-08-02T10:19:40.0690016Z" } ``` Note Save this token! It’s valid for 48 hours and can be reused for subsequent API calls. 4. #### Send Request [Section titled “Send Request”](#send-request) Use the [Writing Feedback Endpoint](/reference/actions/writing-assistant/check). Provide a unique `scanId` for each request. Tip For testing, set `"sandbox": true` in the request body. Sandbox mode is free and returns mock results. * HTTP ```http POST https://api.copyleaks.com/v1/writing-feedback/my-scan-1/check Headers Authorization: Bearer Content-Type: application/json Body { "text": "Copyleaks is a online plagarism detector that helps schools, business and content creators to make sure thier work is orginal. It scans textes from internet and databasis to find similerities. The tool is fast, accurate and supports multipal languages. However, some times it gives false possitives, so users should double check results. Overall, its a usefull platform for mantaining content integrity.", "sandbox": true } ``` * cURL ```bash curl -X POST "https://api.copyleaks.com/v1/writing-feedback/my-scan-1/check" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "text": "Copyleaks is a online plagarism detector that helps schools, business and content creators to make sure thier work is orginal. It scans textes from internet and databasis to find similerities. The tool is fast, accurate and supports multipal languages. However, some times it gives false possitives, so users should double check results. Overall, its a usefull platform for mantaining content integrity.", "sandbox": true }' ``` * Python ```python from copyleaks.copyleaks import Copyleaks from copyleaks.models.submit.writing_assistant_document import WritingAssistantDocument scan_id = "my-python-scan" sample_text = "Hello world, this is a test." submission = WritingAssistantDocument(sample_text) submission.set_sandbox(True) response = Copyleaks.WritingAssistantClient.submit_text(auth_token, scan_id, submission) print(response) ``` * JavaScript ```javascript const { CopyleaksWritingAssistantSubmissionModel } = require('plagiarism-checker'); const scanId = 'my-nodejs-scan'; const sampleText = "Hello world, this is a test."; const submission = new CopyleaksWritingAssistantSubmissionModel(sampleText); submission.sandbox = true; const response = await copyleaks.writingAssistantClient.submitTextAsync(authToken, scanId, submission); console.log(response); ``` * Java ```java import classes.Copyleaks; import models.submissions.CopyleaksWritingAssistantSubmissionModel; import models.responses.WritingAssistantResponse; String scanId = "my-java-scan"; String sampleText = "Hello world, this is a test."; CopyleaksWritingAssistantSubmissionModel submission = new CopyleaksWritingAssistantSubmissionModel(sampleText); submission.setSandbox(true); WritingAssistantResponse response = Copyleaks.writingAssistantClient.submitText(authToken, scanId, submission); System.out.println(response); ``` 5. #### Interpret The Response [Section titled “Interpret The Response”](#interpret-the-response) The [Writing Assistant Response](/reference/data-types/writing/writing-assistant) contains detailed feedback under the `corrections` and `score` properties. The `score` provides an overall quality metric and a breakdown by category, while `corrections` pinpoints the exact location and suggested changes for each issue. Example Response Snippet ```json { "score": { "corrections": { "overallScore": 93, "grammarCorrectionsScore": 100 }, "readability": { "readabilityLevelText": "College Student" } }, "corrections": { "text": { "chars": { "types": [18], "starts": [28], "lengths": [9], "operationTexts": ["stretches "] } } } } ``` ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) [Full API Reference ](/reference/actions/writing-assistant/check/)Explore the complete documentation for the Writing Assistant response object. [Correction Types ](/reference/data-types/authenticity/correction-types/)See a detailed list of all supported correction types and languages. --- # Login > Authenticate with the Copyleaks API using your email and API key Account POST **https\://id.copyleaks.com/v3/account/login/api** Login to the Copyleaks API using your email and API key. Once logged in, you will get back a login token that will be used to authenticate yourself when calling the other API methods. After generating the login-token, you should attach the token for your next calls. Attaching the endpoint is done by adding this header to your calls: ```http Authorization: Bearer TOKEN ``` A generated token is valid for **48 hours**. Within this period of time, you can use it multiple times. Before attaching the `Authorization` header for your next endpoint calls, make sure that the token has not expired. If it expired, generate a new one. Handle tokens carefully The Copyleaks API token should be treated as a password. Attackers, who can gain access to this token, can access your private information and modify it. API Rate Limit **12 requests per account/15 minutes** If you exceed the API limit, authentication will be blocked for 5 minutes (Rate Limit Exceeded HTTP 429 - Too Many Requests). ## Request [Section titled “Request”](#request) ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Accept: application/json ``` ### Body [Section titled “Body”](#body) email string required Your Copyleaks account email address key string required Your Copyleaks account API key (UUID format) ## Responses [Section titled “Responses”](#responses) ### Success [Section titled “Success”](#success) * 200 200 OK The command was executed successfully. #### Response Schema The response contains the following fields: access\_token string The authentication token for API access. .issued string The date and time when the token was issued. .expires string The date and time when the token will expire. #### Example Response A typical response from this endpoint: ```json { "access_token": "ACLNSKNSDAACCAJANCOIUiausoo_saidjaskldjoa...", ".issued": "2018-11-24T16:15:38.2431255+02:00", ".expires": "2018-11-26T16:15:38.2431255+02:00" } ``` - 400 400 Bad Request Bad Request - Invalid request format or missing required fields #### Example Response A typical response from this endpoint: ```json { "Key": [ "The key field is required." ] } ``` - 401 401 Unauthorized Unauthorized - Invalid email or API key #### Example Response A typical response from this endpoint: ```json { "message": "Invalid login credentials." } ``` - 429 429 Too Many Requests Too Many Requests - Rate limit exceeded (blocked for 5 minutes) #### Example Response A typical response from this endpoint: ```json { "error": "Rate limit exceeded", } ``` ### Examples [Section titled “Examples”](#examples) * HTTP ```http POST https://id.copyleaks.com/v3/account/login/api Headers Content-Type: application/json Body { "email": "your@email.address", "key": "00000000-0000-0000-0000-000000000000" } ``` * cURL ```bash export COPYLEAKS_EMAIL="your@email.address" export COPYLEAKS_API_KEY="your-api-key-here" curl --request POST \ --url https://id.copyleaks.com/v3/account/login/api \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data "{ \"email\": \"${COPYLEAKS_EMAIL}\", \"key\": \"${COPYLEAKS_API_KEY}\" }" ``` * Python ```python from copyleaks.copyleaks import Copyleaks EMAIL_ADDRESS = "your@email.address" API_KEY = "your-api-key-here" # Login to Copyleaks auth_token = Copyleaks.login(EMAIL_ADDRESS, API_KEY) print("Logged successfully!\nToken:", auth_token) ``` * JavaScript ```javascript const { Copyleaks } = require('plagiarism-checker'); const EMAIL_ADDRESS = "your@email.address"; const API_KEY = "your-api-key-here"; async function login() { const copyleaks = new Copyleaks(); const loginResult = await copyleaks.loginAsync(EMAIL_ADDRESS, API_KEY); console.log('Logged successfully!\nToken:', loginResult); return loginResult; } ``` * Java ```java import com.copyleaks.sdk.api.Copyleaks; String EMAIL_ADDRESS = "your@email.address"; String API_KEY = "00000000-0000-0000-0000-000000000000"; // Login to Copyleaks try { String authToken = Copyleaks.login(EMAIL_ADDRESS, API_KEY); System.out.println("Logged successfully!\nToken: " + authToken); } catch (CommandException e) { System.out.println("Failed to login: " + e.getMessage()); System.exit(1); } ``` --- # Account Actions > Learn how to authenticate and get started with Copyleaks APIs Account Copyleaks APIs allow you to integrate your systems and services with Copyleaks products. You can start working with a Copyleaks API by sending HTTP requests to the Copyleaks servers. To do so, first register to Copyleaks and get your API key. Then, use your API key and email address to login. ## Authentication API [Section titled “Authentication API”](#authentication-api) [POST https://id.copyleaks.com/v3/account/login/api](/reference/actions/account/login) [Get your personal access token by logging in to the Copyleaks API using your email and API key.](/reference/actions/account/login) --- # Export > Export the full raw scan information and push it to your servers. Authenticity POST **https\://api.copyleaks.com/v3/downloads/{scanId}/export/{exportId}** One of the most common patterns when integrating with our services is to submit a scan and download the full results as soon as the scan is completed. When the scan is completed, Copyleaks triggers a ‘Completed’ webhook to inform that the scan has been completed. At this point, you will have all the needed information (i.e. the ‘result ids’) to download and present the reports on your side. Since you may have a large number of documents to download (the results, crawled version of the text and the pdf-report), you may need to send many HTTP REST calls to execute to export the data from our services. The ‘Export’ method makes this process easier by specifying the content you would like to export in a single call, and we will copy all the data according to your request. Then, we will fire an ‘export-completed’ webhook with the export results summary. If you are using a distributed cloud storage system (like AWS buckets, Google buckets or Azure Storage), we can export the data directly to your storage without the involvement of your servers. To do so, create a Signed URL for each data item that you would like to export. By specifying the request method (verb) and optionally added headers, the writing to this storage will be triggered, as per your definition. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) exportId string required A new Id for the export process. `>= 3 characters` `<= 36 characters` Match pattern: `[a-z0-9] !@$^&-+%=_(){}<>';:/.",~`|\` scanId string required The scan ID of the specific scan to export. learn more about [the criteria for creating a Scan ID](/concepts/management/choosing-scan-id). `>= 3 characters` `<= 36 characters` Match pattern: `[a-z0-9] !@$^&-+%=_(){}<>';:/.",~`|\` ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Request Body [Section titled “Request Body”](#request-body) The request body is a JSON object containing the export configuration. completionWebhook string required This webhook event is triggered once the export is completed. completionWebhookHeaders array\[array] Adds headers to the webhook. Example: `[ [ "header-key", "header-value" ], ... ]` maxRetries integer default: "3" How many retries to send before giving up. Using high value (12) may lead to a longer time until the completionWebhook being executed. A low value (1) may lead to errors while your service is temporary having problems. `>= 1` `<= 12` developerPayload string Add a custom developer payload that will then be provided on the [Export-Completed webhook](/reference/data-types/authenticity/webhooks/scan-completed). results array\[object] An array of results to be exported. Learn more about [Result Webhook](/reference/data-types/authenticity/results/new-plagiarism-result). `<= 1000 items` id string required Result identification to be downloaded. You get these identifications from the [completed webhook](/reference/data-types/authenticity/webhooks/scan-completed). endpoint string\ required The HTTP url to upload the data. verb string required The HTTP verb (also called “HTTP Methods”) to upload the data to your specified endpoint. Example: `POST` headers array\[array] (Jagged Array) List of headers to be submitted with the upload request. You may use this field to provide additional request headers, such as “Authorization” header. pdfReport object Download the PDF report. Allowed only when `properties.pdf.create` was set to `true` on the scan submission. endpoint string\ required The HTTP url to upload the data. verb string required The HTTP verb (also called “HTTP Methods”) to upload the data to your specified endpoint. Example: `POST` headers array\[array] (Jagged Array) List of headers to be submitted with the upload request. You may use this field to provide additional request headers, such as “Authorization” header. aiDetection object Export the AI Content detection report. Allowed only when `properties.aiGeneratedText.detect` was set to `true` on the scan submission. Learn more about [AI Content Detection Webhook](/reference/data-types/authenticity/results/ai-detection). endpoint string\ required The HTTP url to upload the data. verb string required The HTTP verb (also called “HTTP Methods”) to upload the data to your specified endpoint. Example: `POST` headers array\[array] (Jagged Array) List of headers to be submitted with the upload request. You may use this field to provide additional request headers, such as “Authorization” header. writingFeedback object Export the Writing Assistant report. Allowed only when `properties.writingFeedback.enable` was set to `true` on the scan submission. Learn more about [Writing Assistant Webhook](/reference/data-types/authenticity/results/writing-assistant). endpoint string\ required The HTTP url to upload the data. verb string required The HTTP verb (also called “HTTP Methods”) to upload the data to your specified endpoint. Example: `POST` headers array\[array] (Jagged Array) List of headers to be submitted with the upload request. You may use this field to provide additional request headers, such as “Authorization” header. overview object Export the Overview report. Allowed only when `properties.overview.enable` was set to `true` on the scan submission. Learn more about [Overview Webhook](/reference/data-types/authenticity/results/ai-overview). endpoint string\ required The HTTP url to upload the data. verb string required The HTTP verb (also called “HTTP Methods”) to upload the data to your specified endpoint. Example: `POST` headers array\[array] (Jagged Array) List of headers to be submitted with the upload request. You may use this field to provide additional request headers, such as “Authorization” header. crawledVersion object Download the crawled version of the submitted text. Learn more about [Crawled-Version Webhook](/reference/data-types/authenticity/results/crawled-version). endpoint string\ required The HTTP url to upload the data. verb string required The HTTP verb (also called “HTTP Methods”) to upload the data to your specified endpoint. Example: `POST` headers array\[array] (Jagged Array) List of headers to be submitted with the upload request. You may use this field to provide additional request headers, such as “Authorization” header. ## Responses [Section titled “Responses”](#responses) * 204 204 No Content The command was executed. The export started. - 400 400 Bad Request Bad request. One or more details in your request is wrong. #### Example Response A typical response from this endpoint: ```json Scan wasn't finished yet. ``` - 401 401 Unauthorized Authorization has been denied for this request. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` - 404 404 Not Found The scan id that was specified doesn't exist. - 409 409 Conflict Conflict. An export task with the same Id already exists in the system. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.10", "title": "Conflict", "status": 409, "traceId": "00-561fe3b2451eb51ce489557a2f34f247-3acd41c0b4ad1295-00" } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http POST https://api.copyleaks.com/v3/downloads/my-scan-123/export/my-export-1 Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN { "results": [ { "id": "my-result-id", "verb": "POST", "headers": [ [ "header-key", "header-value" ] ], "endpoint": "https://yourserver.com/export/export-id/results/my-result-id" } ], "pdfReport": { "verb": "POST", "headers": [ [ "header-key", "header-value" ] ], "endpoint": "https://yourserver.com/export/export-id/pdf-report" } ], "crawledVersion": { "verb": "POST", "headers": [ [ "header-key", "header-value" ] ], "endpoint": "https://yourserver.com/export/export-id/crawled-version" }, "completionWebhook": "https://yourserver.com/export/export-id/completed", "maxRetries": 3 } ``` * cURL ```bash curl --request POST \ --url https://api.copyleaks.com/v3/downloads/my-scan-123/export/my-export-1 \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "results": [ { "id": "my-result-id", "verb": "POST", "headers": [ [ "header-key", "header-value" ] ], "endpoint": "https://yourserver.com/export/export-id/results/my-result-id" } ], "pdfReport": { "verb": "POST", "headers": [ [ "header-key", "header-value" ] ], "endpoint": "https://yourserver.com/export/export-id/pdf-report" }, "crawledVersion": { "verb": "POST", "headers": [ [ "header-key", "header-value" ] ], "endpoint": "https://yourserver.com/export/export-id/crawled-version" }, "completionWebhook": "https://yourserver.com/export/export-id/completed", "maxRetries": 3 }' ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn about the different types of webhooks and how to handle them, including export completion webhooks. [Export Completed Webhook ](/reference/data-types/authenticity/webhooks/scan-completed/)Understand the details provided in the export completed webhook. [How to Display Scan Reports ](/concepts/features/how-to-display/)Learn how to present exported scan data to your users. --- # Downloads Actions > Download your scan reports. The Copyleaks downloads API allows you to download your scan reports. ## Endpoints [Section titled “Endpoints”](#endpoints) [POST v3/downloads/{scanId}/export/{exportId}](/reference/actions/downloads/export) [Export your scan report by providing a scan ID.](/reference/actions/downloads/export) --- # OCR Supported Languages > Languages supported for OCR processing Authenticity GET **https\://api.copyleaks.com/v3/miscellaneous/ocr-languages-list** Get a list of the supported languages for OCR Note This is not a list of supported languages for the API, but only for the OCR files scan ## Request [Section titled “Request”](#request) * HTTP ```http GET https://api.copyleaks.com/v3/miscellaneous/ocr-languages-list ``` * cURL ```bash curl --request GET \ --url https://api.copyleaks.com/v3/miscellaneous/ocr-languages-list ``` ## Response [Section titled “Response”](#response) * 200 200 OK The supported language codes in ISO-639-1 standard. #### Example Response A typical response from this endpoint: ```json [ "af", "sq", "az", "...", "zu" ] ``` *** ## OCR Supported Langauges [Section titled “OCR Supported Langauges”](#ocr-supported-langauges) These are the language codes supported by our OCR scan in `ISO-639-1` standard: Tip We keep updating the list with new languages so we recommend [loading the list in runtime](/reference/actions/miscellaneous/ocr-supported-languages) rather than copying it to your code. **Name** | Code | Language | Code | Language | | ----- | --------------------- | ----- | -------------------- | | af | Afrikaans | am | Amharic | | ar | Arabic | az | Azerbaijani | | be | Belarusian | bg | Bulgarian | | bn | Bengali | bs | Bosnian | | ca | Catalan | ceb | Cebuano | | co | Corsican | cs | Czech | | cy | Welsh | da | Danish | | de | German | el | Greek | | en | English | eo | Esperanto | | es | Spanish | et | Estonian | | eu | Basque | fa | Persian | | fi | Finnish | fr | French | | fy | Frisian | ga | Irish | | gd | Scottish Gaelic | gl | Galician | | gu | Gujarati | ha | Hausa | | haw | Hawaiian | hi | Hindi | | hmn | Hmong | hr | Croatian | | ht | Haitian Creole | hu | Hungarian | | hy | Armenian | id | Indonesian | | ig | Igbo | is | Icelandic | | it | Italian | iw | Hebrew | | ja | Japanese | jw | Javanese | | ka | Georgian | kk | Kazakh | | km | Khmer | kn | Kannada | | ko | Korean | ku | Kurdish | | ky | Kyrgyz | la | Latin | | lb | Luxembourgish | lo | Lao | | lt | Lithuanian | lv | Latvian | | ma | Marathi | mg | Malagasy | | mi | Maori | mk | Macedonian | | ml | Malayalam | mn | Mongolian | | mr | Marathi | ms | Malay | | mt | Maltese | my | Burmese | | ne | Nepali | nl | Dutch | | no | Norwegian | ny | Chichewa | | pl | Polish | ps | Pashto | | pt | Portuguese | ro | Romanian | | ru | Russian | sd | Sindhi | | si | Sinhala | sk | Slovak | | sl | Slovenian | sm | Samoan | | sn | Shona | so | Somali | | sq | Albanian | sr | Serbian | | st | Sesotho | su | Sundanese | | sv | Swedish | sw | Swahili | | ta | Tamil | te | Telugu | | tg | Tajik | th | Thai | | tl | Tagalog | tr | Turkish | | uk | Ukrainian | ur | Urdu | | uz | Uzbek | vi | Vietnamese | | xh | Xhosa | yi | Yiddish | | yo | Yoruba | zh-CN | Chinese (Simplified) | | zh-TW | Chinese (Traditional) | zu | Zulu | --- # Miscellaneous Actions > Get information about supported file types, languages, and more. The Copyleaks miscellaneous API allows you to get information about supported file types, languages, and more. ## Endpoints [Section titled “Endpoints”](#endpoints) [GET v3/miscellaneous/supported-file-types](/reference/actions/miscellaneous/supported-file-types) [Get a list of supported file types.](/reference/actions/miscellaneous/supported-file-types) [GET v3/miscellaneous/ocr-supported-languages](/reference/actions/miscellaneous/ocr-supported-languages) [Get a list of supported languages for OCR.](/reference/actions/miscellaneous/ocr-supported-languages) [GET v3/miscellaneous/supported-cross-languages](/reference/actions/miscellaneous/supported-cross-languages) [Get a list of supported languages for cross-language scans.](/reference/actions/miscellaneous/supported-cross-languages) --- # Cross-Language Plagiarism > Cross-Language Plagiarism detection capabilities Authenticity GET **https\://api.copyleaks.com/v3/miscellaneous/allowed-cross-languages** Cross-language plagiarism detection identifies content that has been translated from one language to another, helping catch plagiarism attempts where text is copied and translated to avoid detection. This document provides information about the languages supported by Copyleaks for cross-language scans. The language codes are provided in the `ISO-639-1` standard. ## Request [Section titled “Request”](#request) * HTTP ```http GET https://api.copyleaks.com/v3/miscellaneous/allowed-cross-languages ``` * cURL ```bash curl --request GET \ --url https://api.copyleaks.com/v3/miscellaneous/allowed-cross-languages ``` ## Response [Section titled “Response”](#response) * 200 200 OK The supported language codes in \`ISO-639-1\` standard. #### Response Schema The response contains the following fields: documentLanguages array\ A list of supported source languages for cross-language scans. resultLanguages array\ A list of supported result languages for cross-language scans. #### Example Response A typical response from this endpoint: Show full example (20 lines) ```json { "documentLanguages": [ "da", "nl", "en", "...", "es" ], "resultLanguages": [ "sq", "bg", "my", "ca", "hr", "cs", "da", "...", "vi" ] } ``` ```json { "documentLanguages": [ "da", "nl", "en", "...", "es" ], "resultLanguages": [ "sq", "bg", "my", "ca", "hr", "cs", // ... truncated ``` ## Supported Languages for Cross-Language Scans [Section titled “Supported Languages for Cross-Language Scans”](#supported-languages-for-cross-language-scans) The following sections list the supported source and result languages for cross-language scans. These language codes are provided in the `ISO-639-1` standard. Tip We keep updating the list with new languages so we recommend [loading the list in runtime](/reference/actions/miscellaneous/supported-cross-languages) rather than copying it to your code. ### Allowed Source Languages [Section titled “Allowed Source Languages”](#allowed-source-languages) The following languages can be used as the source language in a cross-language scan: | Code | Language | Code | Language | | ---- | ---------- | ---- | -------- | | da | Danish | fr | French | | nl | Dutch | de | German | | en | English | it | Italian | | pt | Portuguese | ru | Russian | | es | Spanish | | | ### Allowed Result Languages [Section titled “Allowed Result Languages”](#allowed-result-languages) The following languages can be used as the result language in a cross-language scan: | Code | Language | Code | Language | | ---- | ---------- | ---- | ---------- | | sq | Albanian | gl | Galician | | bg | Bulgarian | ka | Georgian | | ca | Catalan | de | German | | hr | Croatian | el | Greek | | cs | Czech | hi | Hindi | | da | Danish | hu | Hungarian | | nl | Dutch | id | Indonesian | | en | English | it | Italian | | fi | Finnish | lv | Latvian | | fr | French | lt | Lithuanian | | mk | Macedonian | my | Burmese | | fa | Persian | pl | Polish | | pt | Portuguese | ro | Romanian | | ru | Russian | sr | Serbian | | sk | Slovak | sl | Slovenian | | es | Spanish | sv | Swedish | | tr | Turkish | uk | Ukrainian | | ur | Urdu | vi | Vietnamese | --- # Supported File Types > File formats accepted by the API Authenticity GET **https\://api.copyleaks.com/v3/miscellaneous/supported-file-types** Get a list of the supported file types. ## Request [Section titled “Request”](#request) * HTTP ```http GET https://api.copyleaks.com/v3/miscellaneous/supported-file-types ``` * cURL ```bash curl --request GET \ --url https://api.copyleaks.com/v3/miscellaneous/supported-file-types ``` ## Response [Section titled “Response”](#response) * 200 200 OK The command was executed. #### Response Schema The response contains the following fields: textual array\ A list of supported file extensions for textual content scans. ocr array\ A list of supported file extensions for OCR (image-based) scans. #### Example Response A typical response from this endpoint: Show full example (29 lines) ```json { "textual": [ "pdf", "docx", "doc", "txt", "rtf", "xml", "pptx", "ppt", "odt", "chm", "epub", "odp", "ppsx", "pages", "xlsx", "xls", "csv", "LaTeX" ], "ocr": [ "gif", "png", "bmp", "jpg", "jpeg" ] } ``` ```json { "textual": [ "pdf", "docx", "doc", "txt", "rtf", "xml", "pptx", "ppt", "odt", "chm", "epub", "odp", "ppsx", // ... truncated ``` --- # Actions Overview > Explore the Copyleaks API actions for managing scans, detecting AI-generated content, moderating text, and more. Actions Explore the Copyleaks API actions to manage your content integrity and authenticity needs. Each action provides specific functionalities to help you integrate our services effectively. [Account ](/reference/actions/account/overview)Manage your account and login. [Authenticity ](/reference/actions/scans/overview)Submit scans, check status, and manage results. [AI Detector ](/reference/actions/writer-detector/overview)Detect AI-generated text and source code. [Writing ](/reference/actions/writing-assistant/overview)Check grammar and get writing feedback. [Moderation ](/reference/actions/text-moderation/overview)Moderate text for harmful content. --- # Get Repository Information > Get repository information such as credit consumption, metadata values and current status. Authenticity GET **https\://api.copyleaks.com/v3/repositories/repository/{repositoryId}/info** Get repository information such as credit consumption, metadata values and current status. A “Super Admin” or “Admin” role is required. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) repositoryId string required The repository ID to get the info for. The repository ID can be fetched from the [Copyleaks Admin Dashboard](https://admin.copyleaks.com/repositories). ### Headers [Section titled “Headers”](#headers) ```http Authorization: Bearer YOUR_LOGIN_TOKEN ``` ## Responses [Section titled “Responses”](#responses) * 200 200 OK The command was executed. #### Example Response A typical response from this endpoint: ```json { "id": "private-data-hub-id", "name": "Private Data Hub Name", "description": "Your Description", "permission": 4, "status": 0, "maxCredits": 1000, "currentCredits": 1000, "maskingPolicy": 0, "creationTime": "2024-09-09T10:43:52" } ``` - 400 400 Bad Request Bad Request. #### Example Response A typical response from this endpoint: ```json { "repositoryId": [ "The field repositoryId must match the regular expression '^[_A-Za-z0-9]*$'." ] } ``` - 401 401 Unauthorized Unauthorized - Authorization has been denied for this request. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` - 403 403 Forbidden Forbidden. Your organization role does not permit you to perform this request. This operation requires "Super Admin" or "Admin" role. ## Examples [Section titled “Examples”](#examples) * HTTP ```http GET https://api.copyleaks.com/v3/repositories/repository/my-repo-123/info Authorization: Bearer YOUR_LOGIN_TOKEN ``` * cURL ```bash curl --request GET \ --url https://api.copyleaks.com/v3/repositories/repository/my-repo-123/info \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' ``` --- # Private Cloud Hub Actions > Manage your Private Cloud Hubs. Copyleaks Private Cloud Hub API help you maintain your data hubs. ## Endpoints [Section titled “Endpoints”](#endpoints) [GET v3/repositories/repository/{repositoryId}/info](/reference/actions/private-cloud-hub/info) [Get information about your Private Cloud Hubs.](/reference/actions/private-cloud-hub/info) --- # Get Credit Balance > Get your current credit balance. Authenticity GET **https\://api.copyleaks.com/v3/scans/credits** Get your current credit balance. Each credit allow the scan of up to 250 words. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Headers [Section titled “Headers”](#headers) ```http Authorization: Bearer YOUR_LOGIN_TOKEN ``` ## Responses [Section titled “Responses”](#responses) * 200 200 OK The command was executed. #### Response Schema The response contains the following fields: Amount integer The number of credits available. #### Example Response A typical response from this endpoint: ```json { "Amount": 100 } ``` - 401 401 Unauthorized Authorization has been denied for this request. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http GET https://api.copyleaks.com/v3/scans/credits Authorization: Bearer YOUR_LOGIN_TOKEN ``` * cURL ```bash curl --request GET \ --url https://api.copyleaks.com/v3/scans/credits \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' ``` --- # Delete Scans > Delete scans from Copyleaks API. Authenticity PATCH **https\://api.copyleaks.com/v3.1/scans/delete** Delete scans from Copyleaks API. Only completed scans can be deleted. All of the scan results, metadata and information will be removed. The delete is performed in the background, the deletion process can take few minutes. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Request Body [Section titled “Request Body”](#request-body) The request body is a JSON object containing the scans to delete. scans array\ required The list of scans to delete. `<= 10000` items Example: `[ {"id": "Your-scan-id-1"}, {"id": "Your-scan-id-2"} ]` purge boolean default: "false" Deleting and purging a scan through the API will remove all traces of the scan from Copyleaks servers, including Shared Data Hubs and Private Cloud Hubs. Once purged, the scan will be permanently deleted and will not be available for future scans. completionWebhook string Allows you to register to a webhook that will be fired once the removal has been completed. Make sure that your endpoint is listening to a POST method (no body parameters were supplied). Example: `https://yoursite.com/webhook/deleted` headers array\[array] default: "null" Adds user specific headers to the request. This is needed in case the webhook endpoint requires any custom headers. Example: `[ [ "header-key", "header-value" ], ... ]` ## Responses [Section titled “Responses”](#responses) * 202 202 Accepted The request was placed for removal. Note that this process is asynchronous. This means that the actual removal will take place once one of our servers will be free. In order to get notified after the command execution, register to webhook notification (completionWebhook). - 400 400 Bad Request Bad Request. #### Example Response A typical response from this endpoint: ```json { "scans[0].id": [ "The id field is required." ] } ``` - 401 401 Unauthorized Authorization has been denied for this request. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http PATCH https://api.copyleaks.com/v3.1/scans/delete Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN { "scans": [ { "id": "Your-scan-id-1" }, { "id": "Your-scan-id-2" } ], "purge": false } ``` * cURL ```bash curl --request PATCH \ --url https://api.copyleaks.com/v3.1/scans/delete \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "scans": [ { "id": "Your-scan-id-1" }, { "id": "Your-scan-id-2" } ], "purge": false }' ``` --- # Scans Actions > Submit, start, and manage plagiarism scans Authenticity The Copyleaks Authenticity API allows you to integrate your institution’s platform, learning management system or any other e-learning solution with Copyleaks products. ## Endpoints [Section titled “Endpoints”](#endpoints) [PUT v3/scans/submit/url/scanId](/reference/actions/scans/submit-url) [Starting a new process by providing a URL to scan](/reference/actions/scans/submit-url) [PUT v3/scans/submit/file/scanId](/reference/actions/scans/submit-file) [Starting a new process by providing a file to scan](/reference/actions/scans/submit-file) [PUT v3/scans/submit/ocr/scanId](/reference/actions/scans/submit-ocr) [Starting a new process by providing an image file with text to scan](/reference/actions/scans/submit-ocr) [PATCH v3/scans/start](/reference/actions/scans/start) [Start scanning a list of creditsChecked scans](/reference/actions/scans/start) [DELETE v3.1/scans/delete](/reference/actions/scans/delete) [Delete the specific scans from the server, after getting the scan results](/reference/actions/scans/delete) [POST v3/scans/scanId/webhooks/resend](/reference/actions/scans/resend-webhook) [Resend webhooks for existing scans](/reference/actions/scans/resend-webhook) [GET v3/scans/credits](/reference/actions/scans/check-credits) [Get your credit balance](/reference/actions/scans/check-credits) [GET v3/scans/usages/history](/reference/actions/scans/usage-history) [Get your usage history between two dates](/reference/actions/scans/usage-history) [POST v3/downloads/{scanId}/export/{exportId}](/reference/actions/downloads/export) [Export your scan report by providing a scan ID.](/reference/actions/downloads/export) [GET v3/repositories/repository/{repositoryId}/info](/reference/actions/private-cloud-hub/info) [Get information about your Private Cloud Hubs.](/reference/actions/private-cloud-hub/info) [GET v3/miscellaneous/supported-file-types](/reference/actions/miscellaneous/supported-file-types) [Get a list of supported file types.](/reference/actions/miscellaneous/supported-file-types) [GET v3/miscellaneous/ocr-supported-languages](/reference/actions/miscellaneous/ocr-supported-languages) [Get a list of supported languages for OCR.](/reference/actions/miscellaneous/ocr-supported-languages) [GET v3/miscellaneous/supported-cross-languages](/reference/actions/miscellaneous/supported-cross-languages) [Get a list of supported languages for cross-language scans.](/reference/actions/miscellaneous/supported-cross-languages) ## Webhooks [Section titled “Webhooks”](#webhooks) [POST Completed](/reference/data-types/authenticity/webhooks/scan-completed) [Fired on scan completion event](/reference/data-types/authenticity/webhooks/scan-completed) [POST Error](/reference/data-types/authenticity/webhooks/error) [Fired on scan ended with an error](/reference/data-types/authenticity/webhooks/error) [POST Indexed](/reference/data-types/authenticity/webhooks/indexed) [Fires on DB index event](/reference/data-types/authenticity/webhooks/indexed) [POST Credits Checked](/reference/data-types/authenticity/webhooks/credits-checked) [Fired when credits were checked](/reference/data-types/authenticity/webhooks/credits-checked) [POST New Result](/reference/data-types/authenticity/results/new-result) [Fired as soon as we collect a new result (while scanning)](/reference/data-types/authenticity/results/new-result) --- # Resend Webhook > Resend webhooks for existing scans. Authenticity POST **https\://api.copyleaks.com/v3/scans/{scanId}/webhooks/resend** If for some reason you did not receive the webhook to a specific scan or you are interested in resending a webhook, you can do it using the resend webhook. Simply add the Scan Id of the relevant scan and a webhook will be sent to your endpoint. Use this endpoint to resend webhooks for scan with completed status. Valid statuses: success (completed), failed (error’ed), indexed and price-checked. You cannot send the resend webhook for scans that are still running and processed. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) scanId string required The scan id of the scan you would like to resend the wehbook for. ### Headers [Section titled “Headers”](#headers) ```http Authorization: Bearer YOUR_LOGIN_TOKEN ``` ## Responses [Section titled “Responses”](#responses) * 202 202 Accepted The request accepted. The webhook will be sent shortly. - 400 400 Bad Request The scan is not ready yet. Therefore, cannot resend webhook. - 401 401 Unauthorized Authorization has been denied for this request. - 404 404 Not Found No such scan. Check your scanId argument. ## Examples [Section titled “Examples”](#examples) * HTTP ```http POST https://api.copyleaks.com/v3/scans/my-scan-123/webhooks/resend Authorization: Bearer YOUR_LOGIN_TOKEN ``` * cURL ```bash curl --request POST \ --url https://api.copyleaks.com/v3/scans/my-scan-123/webhooks/resend \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' ``` --- # Start Scans > Start scanning a list of price-checked scans. Authenticity PATCH **https\://api.copyleaks.com/v3/scans/start** Start scanning all the files you submitted for a price-check. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Request Body [Section titled “Request Body”](#request-body) The request body is a JSON object containing the scans to start. trigger array\ required A list of scans that you submitted for a check-credits scan and that you would like to submit for a full scan. This array can scan up to 100 submissions. Example: `[ "Your-scan-id-1", "Your-scan-id-2" ]` errorHandling integer default: "0" When set to ignore (ignore = 1) the trigger scans will start running even if some of them are in error mode, when set to cancel (cancel = 0) the request will be cancelled if any error was found. Possible Values: 0 (Cancel), 1 (Ignore). Possible Values: * **0** : Cancel * **1** : Ignore ## Responses [Section titled “Responses”](#responses) * 200 200 OK The command was executed. #### Response Schema The response contains the following fields: success array\ A list of scan IDs that were successfully started. failed array\ A list of scan IDs that failed to start. #### Example Response A typical response from this endpoint: ```json { "success": [ "Your-scan-id" ], "failed": [] } ``` - 400 400 Bad Request Bad request. #### Example Response A typical response from this endpoint: ```json { "trigger": [ "The trigger field is required.", "Cannot be null" ] } ``` - 401 401 Unauthorized Authorization has been denied for this request. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http PATCH https://api.copyleaks.com/v3/scans/start Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN { "trigger": [ "Your-scan-id-1", "Your-scan-id-2" ], "errorHandling": 0 } ``` * cURL ```bash curl --request PATCH \ --url https://api.copyleaks.com/v3/scans/start \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "trigger": [ "Your-scan-id-1", "Your-scan-id-2" ], "errorHandling": 0 }' ``` --- # Submit File > Scan files to find where the content has been used elsewhere and check its originality. Authenticity PUT **https\://api.copyleaks.com/v3/scans/submit/file/{scanId}** Scan files to find where the content has been used elsewhere and check its originality. Using submit-file you can scan various file types for plagiarism and identify copied content. See [supported formats](/reference/actions/miscellaneous/supported-file-types). 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) 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](/concepts/management/choosing-scan-id). `>= 3 characters` `<= 36 characters` Match pattern: `[a-z0-9] !@$^&-+%=_(){}<>';:/.",~`| ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Request Body [Section titled “Request Body”](#request-body) The request body is a JSON object containing the file to scan. base64 string required A base64 data string of a file. If you would like to scan plain text, encode it as base64 and submit it. Example: `aGVsbG8gd29ybGQ=` filename string required The name of the file as it will appear in the Copyleaks scan report Make sure to include the right extension for your filetype. `<= 255` characters Example: `Myfile.pdf` properties object required action integer default: "0" The type of submission action. * `0`: Scan Start scan immediately. * `1`: Check-Credits Check how many credits will be used for this scan. * `2`: Index Only Only index the file in the Copyleaks internal database or Copyleaks Repository (depends on your submit request). No credits will be used. includeHtml boolean By default, Copyleaks will present the report in text format. If set to `true`, Copyleaks will also include html format. * `True` : results will be generated as HTML format, if possible. Otherwise, it will be generated as text format. * `False` : results will be generated as text format. developerPayload string default: "null" Add custom developer payload that will then be provided on the [webhooks](/reference/data-types/authenticity/webhooks/overview). `<= 512 characters` sandbox boolean default: "false" You can test the integration with the Copyleaks API for free using the sandbox mode. You will be able to submit content for a scan and get back mock results, simulating the way Copyleaks will work to make sure that you successfully integrated with the API. Turn off this feature on production environment. **Rate Limiting**: This method has a maximum call rate limit of 100 sandbox scans within 1 hour. See the 429 Response code section at the bottom of this page. expiration integer default: "2880" Specify the maximum life span of a scan in hours on the Copyleaks servers. When expired, the scan will be deleted and will no longer be accessible. `>= 1` `<= 2880` scanMethodAlgorithm integer default: "0" Choose the algorithm goal. You can set this value depending on your use-case. Available Options: * **0 - MaximumCoverage**: prioritize higher similarity score. * **1 - MaximumResults**: prioritize finding more sources. customMetadata array default: "\[]" Add custom properties that will be attached to your document in a Copyleaks repository. If this document is found as a repository result, your custom properties will be added to the result. Example: ```plaintext [ { "key":"Test1", "value":"Test1" }, ... ] ``` author object id string A unique identifier for the author of the content. course object id string A unique course identifier for tracking analytics. assignment object id string A unique assignment identifier for tracking analytics. institution object id string A unique institution identifier for tracking analytics. webhooks object The `webhooks` object is where you define the callback URLs for Copyleaks to send notifications to. This object is **required**. status string required A URL that will be called when the scan status changes. Use the `{STATUS}` placeholder, which will be replaced with `completed`, `error`, `creditsChecked`, or `indexed`. Example: `https://yoursite.com/webhook/{STATUS}` newResult string A URL that will be called when a new result is found during the scan. newResultHeaders array Custom headers to add to the `newResult` webhook. Example: `[["key", "value"]]` statusHeaders array Custom headers to add to the `status` webhook. Example: `[["key", "value"]]` filters object Fine-tune what kind of results are included in the scan report. identicalEnabled boolean default: "true" Enable matching of exact words. minorChangesEnabled boolean default: "true" Enable matching of nearly identical words (e.g., slow/slowly). relatedMeaningEnabled boolean default: "true" Enable matching of paraphrased content. minCopiedWords integer Only show results with at least this many copied words. safeSearch boolean default: "false" Block explicit adult content from scan results. domains array default: "\[]" A list of domains to include or exclude from the scan. domainsMode integer default: "1" `0` to include domains, `1` to exclude them. allowSameDomain boolean default: "false" Allow results from the same domain as the submitted URL. scanning object Define the sources to compare your document against. internet boolean default: "true" Compare your content with online sources. exclude.idPattern string Exclude submissions from results if their ID matches a pattern (e.g., `abc*`). include.idPattern string Include only submissions whose ID matches a pattern. repositories array default: "\[]" An array of Private Cloud Hubs objects to scan against. Each object needs a Private Cloud Hub `id`. copyleaksDb object Configure scanning against the Copyleaks Shared Data Hub. crossLanguages object Configure cross-language plagiarism detection. indexing object Configure where to index the submitted content. repositories array default: "\[]" Specify which repositories to index the scanned document to. copyleaksDb boolean default: "false" Add the submitted document to the Copyleaks Shared Data Hub. exclude object Configure what content to exclude from the scan. quotes boolean default: "false" Exclude quoted text from the scan. citations boolean default: "false" Exclude citations from the scan. references boolean default: "false" Exclude referenced text from the scan. tableOfContents boolean default: "false" Exclude table of contents from the scan. titles boolean default: "false" When the scanned document is an HTML document, exclude titles from the scan. htmlTemplate boolean default: "false" When the scanned document is an HTML document, exclude irrelevant text that appears across the site like the website footer or header. documentTemplateIds array default: "\[]" Exclude template text found in other documents. Provide an array of scan IDs (max 3). pdf object Configure and request a PDF report of the scan results. create boolean default: "false" Set to true to generate a PDF report for this scan. title string Customize the title for the PDF report (max 256 chars). largeLogo string A base64 encoded PNG image (max 100kb) to use as a logo in the report. rtl boolean default: "false" When set to true the text in the report will be aligned from right to left. version integer default: "1" Deprecated Use `reportVersion`. PDF version to generate (1, 2, or 3). reportVersion string default: "latest" Specifies which version of the PDF report to generate (`v1`, `v2`, `v3`, `latest`). Overrides `version`. colors object Customize colors for titles, identical matches, minor changes, etc. in HEX format. displayLanguage string default: "en" When specified, the PDF report will be generated in the selected language. Future updates may also apply this setting to the overview and other components. Currently supported languages: | Code | Language | | :--- | :--------- | | `en` | English | | `es` | Spanish | | `de` | German | | `fr` | French | | `it` | Italian | | `pt` | Portuguese | sensitivityLevel integer default: "3" You can control the level of plagiarism sensitivity that will be identified according to the speed of the scan. If you prefer a faster scan with the results that contains the highest amount of plagiarism choose 1, and if a slower, more comprehensive scan, that will also detect the smallest instances choose 5. Optional Values: Range between 1 (faster) to 5 (slower but more comprehensive) cheatDetection boolean default: "false" When set to true the submitted document will be checked for cheating. If a cheating will be detected, a scan alert will be added to the completed webhook. aiGeneratedText object Configure AI-generated text detection. detect boolean default: "false" Detects whether the text was written by an AI. sensitivity integer default: "2" Control the behavior of the AI detection (1-3). explain object enable boolean default: "false" Enable AI Logic feature for AI detection. sensitiveDataProtection object driversLicense boolean default: "false" Mask driver’s license numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :------------------------------------- | | Australia driver’s license number | | Canada driver’s license number | | United Kingdom driver’s license number | | USA drivers license number | | Japan driver’s license number | | Spain driver’s license number | | Germany driver’s license number | credentials boolean default: "false" Mask credentials from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :------------------------------------------------ | | Authentication token | | Amazon Web Services credentials | | Azure JSON Web Token | | HTTP basic authentication header | | Google Cloud Platform service account credentials | | Google Cloud Platform API key | | JSON Web Token | | Encryption key | | Password | passport boolean default: "false" Mask passports from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :----------------------------- | | Canada passport number | | China passport number | | France passport number | | Germany passport number | | Ireland passport number | | Japan passport number | | Korea passport number | | Mexico passport number | | Spain passport number | | United Kingdom passport number | | USA passport number | | Netherlands passport number | | Poland passport | | Sweden passport number | | Australia passport number | | Singapore passport number | | Taiwan passport number | network boolean default: "false" Mask network identifiers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :---------------- | | IP address | | Local MAC address | | MAC address | url boolean default: "false" Mask url from the scanned document with # characters. Available for users on a plan for 2500 pages or more. emailAddress boolean default: "false" Mask email addresses from the scanned document with # characters. Available for users on a plan for 2500 pages or more. creditCard boolean default: "false" Mask credit card numbers and credit card track numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. phoneNumber boolean default: "false" Mask phone numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. writingFeedback object Configure the automated Writing Assistant. enable boolean default: "false" Enable automated Writing Assistant for grammar, spelling, etc. score object Configure the weighting of different categories in the overall writing score. grammarScoreWeight number default: "1.0" Grammar correction category weight. Range: `0.0` to `1.0`. mechanicsScoreWeight number default: "1.0" Mechanics correction category weight. Range: `0.0` to `1.0`. sentenceStructureScoreWeight number default: "1.0" Sentence structure correction category weight. Range: `0.0` to `1.0`. wordChoiceScoreWeight number default: "1.0" Word choice correction category weight. Range: `0.0` to `1.0`. overview object Enable Gen-AI Overview feature to extract key insights from the scan data. enable boolean default: "false" Enable Gen-AI Overview feature to extract key insights from the scan data. ignoreAIDetection boolean default: "false" Ignore AI detection when generating the scan’s overview. Only applicable if AI detection was enabled. ignorePlagiarismDetection boolean default: "false" Ignore plagiarism detection when generating the scan’s overview. Only applicable if plagiarism detection was enabled. ignoreWritingFeedback boolean default: "false" Ignore writing assistant when generating the scan’s overview. Only applicable if the writing assistant was enabled. ignoreAuthorData boolean default: "false" Ignore the author’s historical data when generating the scan’s overview. Only applicable if author ID added to the request. aiSourceMatch object The [AI Source Match feature](/concepts/features/ai-source-match) enhances plagiarism detection by identifying online sources that are suspected of containing AI-generated text. This allows you to find instances of potential plagiarism and understand if the matched source content itself might have been created by an AI. enable boolean default: "false" Activates or deactivates the AI Source Match functionality. Note This feature requires both `scanning.internet` and `aiGenerateText.detect` to be enabled. Integration Testing For testing purposes, use sandbox mode - it’s free! ## Responses [Section titled “Responses”](#responses) * 201 201 Created The scan was successfully created and is now processing. #### Response Schema The response contains the following fields: scannedDocument object An object containing metadata about the submitted scan. See [Scanned Document](/reference/data-types/scanned-document) for more details. results object An object containing the plagiarism and AI detection results. See [Results Object](/reference/data-types/results-object) for more details. notifications object An object containing alerts and notifications about the scan. See [Notifications Object](/reference/data-types/notifications-object) for more details. writingFeedback object An object containing writing feedback and suggestions. See [Writing Feedback](/reference/data-types/writing-feedback) for more details. status integer The status of the scan. A value of \`0\` indicates the scan is still in progress. See [Scan Status](/reference/data-types/scan-status) for a complete list of statuses. developerPayload string A developer-provided string that is attached to the scan. This can be used to store your own internal identifiers. \`256 characters\` #### Example Response A typical response from this endpoint: Show full example (95 lines) ```json { "scannedDocument": { "scanId": "scan-id32", "totalWords": 2, "totalExcluded": 0, "credits": 0, "expectedCredits": 1, "creationTime": "2025-08-05T07:19:08.181236Z", "metadata": { "filename": "file.txt" }, "enabled": { "plagiarismDetection": true, "aiDetection": false, "explainableAi": false, "writingFeedback": false, "pdfReport": true, "cheatDetection": false, "aiSourceMatch": false }, "detectedLanguage": "en" }, "results": { "score": { "identicalWords": 1, "minorChangedWords": 0, "relatedMeaningWords": 0, "aggregatedScore": 50 }, "internet": [ { "url": "http://example.com/", "id": "2a1b402420", "title": "Example Domain", "introduction": "Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without...", "matchedWords": 1, "identicalWords": 1, "similarWords": 0, "paraphrasedWords": 0, "totalWords": 28, "metadata": { "authors": [] }, "tags": [] } ], "database": [], "batch": [], "repositories": [] }, "notifications": { "alerts": [ { "code": "suspected-ai-text", "title": "Potential AI-Generated Text Detected", "message": "We are unable to verify that the text was written by a human.", "severity": 4, "additionalData": "{\"results\": [{\"classification\": 2, \"probability\": 0.7307997032499992, \"matches\": [ {\"text\": {\"chars\": {\"starts\": [0], \"lengths\": [1453]}, \"words\": {\"starts\": [0], \"lengths\": [230]}}}]}], \"summary\": {\"human\": 0.0, \"ai\": 1.0}, \"modelVersion\": \"v8.0\"}", "category": 2 } ] }, "writingFeedback": { "textStatistics": { "sentenceCount": 5, "averageWordLength": 4.7, "averageSentenceLength": 12.8, "readingTimeSeconds": 21, "speakingTimeSeconds": 29.5 }, "score": { "grammarCorrectionsCount": 1, "grammarCorrectionsScore": 93, "grammarScoreWeight": 1, "mechanicsCorrectionsCount": 1, "mechanicsCorrectionsScore": 93, "mechanicsScoreWeight": 1, "sentenceStructureCorrectionsCount": 1, "sentenceStructureCorrectionsScore": 93, "sentenceStructureScoreWeight": 1, "wordChoiceCorrectionsCount": 0, "wordChoiceCorrectionsScore": 100, "wordChoiceScoreWeight": 1, "overallScore": 94 }, "readability": { "score": 95, "readabilityLevel": 1, "readabilityLevelText": "5th Grader", "readabilityLevelDescription": "Very easy to read" } }, "status": 0, "developerPayload": "" } ``` ```json { "scannedDocument": { "scanId": "scan-id32", "totalWords": 2, "totalExcluded": 0, "credits": 0, "expectedCredits": 1, "creationTime": "2025-08-05T07:19:08.181236Z", "metadata": { "filename": "file.txt" }, "enabled": { "plagiarismDetection": true, "aiDetection": false, "explainableAi": false, // ... truncated ``` - 400 400 Bad Request The filename field is required. #### Example Response A typical response from this endpoint: ```json { "filename": [ "The filename field is required." ] } ``` - 401 401 Unauthorized Authentication failed or API key is invalid. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` - 409 409 Conflict Conflict. An export task with the same Id already exists in the system. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.10", "title": "Conflict", "status": 409, "traceId": "00-561fe3b2451eb51ce489557a2f34f247-3acd41c0b4ad1295-00" } ``` - 429 429 Too Many Requests Rate limit exceeded. Please retry after the specified time. #### Example Response A typical response from this endpoint: ```json { "error": "Rate limit exceeded" } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http PUT https://api.copyleaks.com/v3/scans/submit/file/my-scan-123 Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN { "base64": "SGVsbG8gd29ybGQh", "filename": "file.txt", "properties": { "webhooks": { "status": "https://my-server.com/webhook/{STATUS}" }, "sandbox": true } } ``` * cURL ```bash curl --request PUT \ --url https://api.copyleaks.com/v3/scans/submit/file/my-scan-123 \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "base64": "SGVsbG8gd29ybGQh", "filename": "file.txt", "properties": { "webhooks": { "status": "https://my-server.com/webhook/{STATUS}" }, "sandbox": true } }' ``` --- # Submit File (OCR) > Scan images with textual content to find where the content has been used before and check its originality. Authenticity PUT **https\://api.copyleaks.com/v3/scans/submit/ocr/{scanId}** Scan images with textual content to find where the content has been used before and check its originality. Using submit-ocr you can scan various image file types for plagiarism and identify infringed content. Only the textual content in the picture will be scanned and not the graphics. See [supported formats](/reference/actions/miscellaneous/supported-file-types). 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) 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](/concepts/management/choosing-scan-id). `>= 3 characters` `<= 36 characters` Match pattern: `[a-z0-9] !@$^&-+%=_(){}<>';:/.",~`| ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Request Body [Section titled “Request Body”](#request-body) The request body is a JSON object containing the image file to scan and a `properties` object to configure the scan. base64 string required A base64 data string of a file. If you would like to scan plain text, encode it as base64 and submit it. Example: `aGVsbG8gd29ybGQ=` filename string required The name of the file as it will appear in the Copyleaks scan report. Make sure to include the right extension for your filetype. `<= 255` characters Example: `image.jpg` langCode string required The language of the text in the image. See [supported languages](/reference/actions/miscellaneous/ocr-supported-languages). Example: `en` properties object required Configuration options for the scan. action integer default: "0" The type of submission action. * `0`: Scan Start scan immediately. * `1`: Check-Credits Check how many credits will be used for this scan. * `2`: Index Only Only index the file in the Copyleaks internal database or Copyleaks Repository (depends on your submit request). No credits will be used. includeHtml boolean By default, Copyleaks will present the report in text format. If set to `true`, Copyleaks will also include html format. * `True` : results will be generated as HTML format, if possible. Otherwise, it will be generated as text format. * `False` : results will be generated as text format. developerPayload string default: "null" Add custom developer payload that will then be provided on the [webhooks](/reference/data-types/authenticity/webhooks/overview). `<= 512 characters` sandbox boolean default: "false" You can test the integration with the Copyleaks API for free using the sandbox mode. You will be able to submit content for a scan and get back mock results, simulating the way Copyleaks will work to make sure that you successfully integrated with the API. Turn off this feature on production environment. **Rate Limiting**: This method has a maximum call rate limit of 100 sandbox scans within 1 hour. See the 429 Response code section at the bottom of this page. expiration integer default: "2880" Specify the maximum life span of a scan in hours on the Copyleaks servers. When expired, the scan will be deleted and will no longer be accessible. `>= 1` `<= 2880` scanMethodAlgorithm integer default: "0" Choose the algorithm goal. You can set this value depending on your use-case. Available Options: * **0 - MaximumCoverage**: prioritize higher similarity score. * **1 - MaximumResults**: prioritize finding more sources. customMetadata array default: "\[]" Add custom properties that will be attached to your document in a Copyleaks repository. If this document is found as a repository result, your custom properties will be added to the result. Example: ```plaintext [ { "key":"Test1", "value":"Test1" }, ... ] ``` author object id string A unique identifier for the author of the content. course object id string A unique course identifier for tracking analytics. assignment object id string A unique assignment identifier for tracking analytics. institution object id string A unique institution identifier for tracking analytics. webhooks object The `webhooks` object is where you define the callback URLs for Copyleaks to send notifications to. This object is **required**. status string required A URL that will be called when the scan status changes. Use the `{STATUS}` placeholder, which will be replaced with `completed`, `error`, `creditsChecked`, or `indexed`. Example: `https://yoursite.com/webhook/{STATUS}` newResult string A URL that will be called when a new result is found during the scan. newResultHeaders array Custom headers to add to the `newResult` webhook. Example: `[["key", "value"]]` statusHeaders array Custom headers to add to the `status` webhook. Example: `[["key", "value"]]` filters object Fine-tune what kind of results are included in the scan report. identicalEnabled boolean default: "true" Enable matching of exact words. minorChangesEnabled boolean default: "true" Enable matching of nearly identical words (e.g., slow/slowly). relatedMeaningEnabled boolean default: "true" Enable matching of paraphrased content. minCopiedWords integer Only show results with at least this many copied words. safeSearch boolean default: "false" Block explicit adult content from scan results. domains array default: "\[]" A list of domains to include or exclude from the scan. domainsMode integer default: "1" `0` to include domains, `1` to exclude them. allowSameDomain boolean default: "false" Allow results from the same domain as the submitted URL. scanning object Define the sources to compare your document against. internet boolean default: "true" Compare your content with online sources. exclude.idPattern string Exclude submissions from results if their ID matches a pattern (e.g., `abc*`). include.idPattern string Include only submissions whose ID matches a pattern. repositories array default: "\[]" An array of Private Cloud Hubs objects to scan against. Each object needs a Private Cloud Hub `id`. copyleaksDb object Configure scanning against the Copyleaks Shared Data Hub. crossLanguages object Configure cross-language plagiarism detection. indexing object Configure where to index the submitted content. repositories array default: "\[]" Specify which repositories to index the scanned document to. copyleaksDb boolean default: "false" Add the submitted document to the Copyleaks Shared Data Hub. exclude object Configure what content to exclude from the scan. quotes boolean default: "false" Exclude quoted text from the scan. citations boolean default: "false" Exclude citations from the scan. references boolean default: "false" Exclude referenced text from the scan. tableOfContents boolean default: "false" Exclude table of contents from the scan. titles boolean default: "false" When the scanned document is an HTML document, exclude titles from the scan. htmlTemplate boolean default: "false" When the scanned document is an HTML document, exclude irrelevant text that appears across the site like the website footer or header. documentTemplateIds array default: "\[]" Exclude template text found in other documents. Provide an array of scan IDs (max 3). pdf object Configure and request a PDF report of the scan results. create boolean default: "false" Set to true to generate a PDF report for this scan. title string Customize the title for the PDF report (max 256 chars). largeLogo string A base64 encoded PNG image (max 100kb) to use as a logo in the report. rtl boolean default: "false" When set to true the text in the report will be aligned from right to left. version integer default: "1" Deprecated Use `reportVersion`. PDF version to generate (1, 2, or 3). reportVersion string default: "latest" Specifies which version of the PDF report to generate (`v1`, `v2`, `v3`, `latest`). Overrides `version`. colors object Customize colors for titles, identical matches, minor changes, etc. in HEX format. displayLanguage string default: "en" When specified, the PDF report will be generated in the selected language. Future updates may also apply this setting to the overview and other components. Currently supported languages: | Code | Language | | :--- | :--------- | | `en` | English | | `es` | Spanish | | `de` | German | | `fr` | French | | `it` | Italian | | `pt` | Portuguese | sensitivityLevel integer default: "3" You can control the level of plagiarism sensitivity that will be identified according to the speed of the scan. If you prefer a faster scan with the results that contains the highest amount of plagiarism choose 1, and if a slower, more comprehensive scan, that will also detect the smallest instances choose 5. Optional Values: Range between 1 (faster) to 5 (slower but more comprehensive) cheatDetection boolean default: "false" When set to true the submitted document will be checked for cheating. If a cheating will be detected, a scan alert will be added to the completed webhook. aiGeneratedText object Configure AI-generated text detection. detect boolean default: "false" Detects whether the text was written by an AI. sensitivity integer default: "2" Control the behavior of the AI detection (1-3). explain object enable boolean default: "false" Enable AI Logic feature for AI detection. sensitiveDataProtection object driversLicense boolean default: "false" Mask driver’s license numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :------------------------------------- | | Australia driver’s license number | | Canada driver’s license number | | United Kingdom driver’s license number | | USA drivers license number | | Japan driver’s license number | | Spain driver’s license number | | Germany driver’s license number | credentials boolean default: "false" Mask credentials from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :------------------------------------------------ | | Authentication token | | Amazon Web Services credentials | | Azure JSON Web Token | | HTTP basic authentication header | | Google Cloud Platform service account credentials | | Google Cloud Platform API key | | JSON Web Token | | Encryption key | | Password | passport boolean default: "false" Mask passports from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :----------------------------- | | Canada passport number | | China passport number | | France passport number | | Germany passport number | | Ireland passport number | | Japan passport number | | Korea passport number | | Mexico passport number | | Spain passport number | | United Kingdom passport number | | USA passport number | | Netherlands passport number | | Poland passport | | Sweden passport number | | Australia passport number | | Singapore passport number | | Taiwan passport number | network boolean default: "false" Mask network identifiers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :---------------- | | IP address | | Local MAC address | | MAC address | url boolean default: "false" Mask url from the scanned document with # characters. Available for users on a plan for 2500 pages or more. emailAddress boolean default: "false" Mask email addresses from the scanned document with # characters. Available for users on a plan for 2500 pages or more. creditCard boolean default: "false" Mask credit card numbers and credit card track numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. phoneNumber boolean default: "false" Mask phone numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. writingFeedback object Configure the automated Writing Assistant. enable boolean default: "false" Enable automated Writing Assistant for grammar, spelling, etc. score object Configure the weighting of different categories in the overall writing score. grammarScoreWeight number default: "1.0" Grammar correction category weight. Range: `0.0` to `1.0`. mechanicsScoreWeight number default: "1.0" Mechanics correction category weight. Range: `0.0` to `1.0`. sentenceStructureScoreWeight number default: "1.0" Sentence structure correction category weight. Range: `0.0` to `1.0`. wordChoiceScoreWeight number default: "1.0" Word choice correction category weight. Range: `0.0` to `1.0`. overview object Enable Gen-AI Overview feature to extract key insights from the scan data. enable boolean default: "false" Enable Gen-AI Overview feature to extract key insights from the scan data. ignoreAIDetection boolean default: "false" Ignore AI detection when generating the scan’s overview. Only applicable if AI detection was enabled. ignorePlagiarismDetection boolean default: "false" Ignore plagiarism detection when generating the scan’s overview. Only applicable if plagiarism detection was enabled. ignoreWritingFeedback boolean default: "false" Ignore writing assistant when generating the scan’s overview. Only applicable if the writing assistant was enabled. ignoreAuthorData boolean default: "false" Ignore the author’s historical data when generating the scan’s overview. Only applicable if author ID added to the request. aiSourceMatch object The [AI Source Match feature](/concepts/features/ai-source-match) enhances plagiarism detection by identifying online sources that are suspected of containing AI-generated text. This allows you to find instances of potential plagiarism and understand if the matched source content itself might have been created by an AI. enable boolean default: "false" Activates or deactivates the AI Source Match functionality. Note This feature requires both `scanning.internet` and `aiGenerateText.detect` to be enabled. Integration Testing For testing purposes, use sandbox mode - it’s free! ## Responses [Section titled “Responses”](#responses) * 201 201 Created The scan was successfully created and is now processing. #### Response Schema The response contains the following fields: scannedDocument object \[object Object] results object An object containing the plagiarism and AI detection results. See [Results Object](/reference/data-types/results-object) for more details. notifications object An object containing alerts and notifications about the scan. See [Notifications Object](/reference/data-types/notifications-object) for more details. writingFeedback object An object containing writing feedback and suggestions. See [Writing Feedback](/reference/data-types/writing-feedback) for more details. status integer The status of the scan. A value of \`0\` indicates the scan is still in progress. See [Scan Status](/reference/data-types/scan-status) for a complete list of statuses. developerPayload string A developer-provided string that is attached to the scan. This can be used to store your own internal identifiers. \`256 characters\` #### Example Response A typical response from this endpoint: Show full example (95 lines) ```json { "scannedDocument": { "scanId": "scan-id32", "totalWords": 2, "totalExcluded": 0, "credits": 0, "expectedCredits": 1, "creationTime": "2025-08-05T07:19:08.181236Z", "metadata": { "filename": "file.txt" }, "enabled": { "plagiarismDetection": true, "aiDetection": false, "explainableAi": false, "writingFeedback": false, "pdfReport": true, "cheatDetection": false, "aiSourceMatch": false }, "detectedLanguage": "en" }, "results": { "score": { "identicalWords": 1, "minorChangedWords": 0, "relatedMeaningWords": 0, "aggregatedScore": 50.0 }, "internet": [ { "url": "http://example.com/", "id": "2a1b402420", "title": "Example Domain", "introduction": "Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without...", "matchedWords": 1, "identicalWords": 1, "similarWords": 0, "paraphrasedWords": 0, "totalWords": 28, "metadata": { "authors": [] }, "tags": [] } ], "database": [], "batch": [], "repositories": [] }, "notifications": { "alerts": [ { "code": "suspected-ai-text", "title": "Potential AI-Generated Text Detected", "message": "We are unable to verify that the text was written by a human.", "severity": 4, "additionalData": "{"results": [{"classification": 2, "probability": 0.7307997032499992, "matches": [ {"text": {"chars": {"starts": [0], "lengths": [1453]}, "words": {"starts": [0], "lengths": [230]}}}]}], "summary": {"human": 0.0, "ai": 1.0}, "modelVersion": "v8.0", "translationProvider": 0, "explain": {"patterns": {"statistics": {"aiCount": [18.38596534729004, 1.4073526859283447, 2.917997121810913, 3.4344568252563477, 2.4015376567840576, 1.58811354637146, 2.324068546295166, 8.947664260864258, 1.6268479824066162, 3.9767396450042725, 1.3944411277770996, 4.648137092590332, 15.093534469604492, 4.389907360076904, 18.734575271606445, 1.4073526859283447, 3.3957223892211914, 4.196235179901123, 1.6397595405578613, 1.9367238283157349, 3.938005208969116, 9.980583190917969, 7.566134452819824, 85.03508758544922, 5.706879615783691, 428.94140625, 58.77622985839844, 35.015625, 47.52120590209961, 227.6015625], "humanCount": [1.1367287635803223, 0.3948078751564026, 0.5908869504928589, 0.0794915184378624, 0.0397457592189312, 0.20932766795158386, 0.2808700203895569, 1.5845309495925903, 0.041070617735385895, 0.041070617735385895, 0.45442652702331543, 0.076841801404953, 0.5604152083396912, 0.06226835772395134, 0.6399067044258118, 0.3948078751564026, 0.5352429151535034, 0.3020677864551544, 0.18283049762248993, 0.2676214575767517, 0.049019768834114075, 0.06094349920749664, 0.014573445543646812, 2.1263980865478516, 0.7286722660064697, 8.128008842468262, 5.878292083740234, 3.120574712753296, 7.039435863494873, 40.785186767578125], "proportion": [16.17445182800293, 3.5646519660949707, 4.938333988189697, 43.205326080322266, 60.4224853515625, 7.586734771728516, 8.274534225463867, 5.646884918212891, 39.610992431640625, 96.82687377929688, 3.068573474884033, 60.48969650268555, 26.932769775390625, 70.49980926513672, 29.277040481567383, 3.5646519660949707, 6.344264507293701, 13.89169979095459, 8.968741416931152, 7.2368035316467285, 80.335037231... [truncated] "category": 2 } ] }, "writingFeedback": { "textStatistics": { "sentenceCount": 5, "averageWordLength": 4.7, "averageSentenceLength": 12.8, "readingTimeSeconds": 21.0, "speakingTimeSeconds": 29.5 }, "score": { "grammarCorrectionsCount": 1, "grammarCorrectionsScore": 93, "grammarScoreWeight": 1.0, "mechanicsCorrectionsCount": 1, "mechanicsCorrectionsScore": 93, "mechanicsScoreWeight": 1.0, "sentenceStructureCorrectionsCount": 1, "sentenceStructureCorrectionsScore": 93, "sentenceStructureScoreWeight": 1.0, "wordChoiceCorrectionsCount": 0, "wordChoiceCorrectionsScore": 100, "wordChoiceScoreWeight": 1.0, "overallScore": 94 }, "readability": { "score": 95, "readabilityLevel": 1, "readabilityLevelText": "5th Grader", "readabilityLevelDescription": "Very easy to read" } }, "status": 0, "developerPayload": "" } ``` ```json { "scannedDocument": { "scanId": "scan-id32", "totalWords": 2, "totalExcluded": 0, "credits": 0, "expectedCredits": 1, "creationTime": "2025-08-05T07:19:08.181236Z", "metadata": { "filename": "file.txt" }, "enabled": { "plagiarismDetection": true, "aiDetection": false, "explainableAi": false, // ... truncated ``` - 400 400 Bad Request The filename field is required. #### Example Response A typical response from this endpoint: ```json { "filename": [ "The filename field is required." ] } ``` - 401 401 Unauthorized Authentication failed or API key is invalid. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` - 409 409 Conflict Conflict. An export task with the same Id already exists in the system. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.10", "title": "Conflict", "status": 409, "traceId": "00-561fe3b2451eb51ce489557a2f34f247-3acd41c0b4ad1295-00" } ``` - 429 429 Too Many Requests Rate limit exceeded. Please retry after the specified time. #### Example Response A typical response from this endpoint: ```json { "error": "Rate limit exceeded", } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http PUT https://api.copyleaks.com/v3/scans/submit/ocr/my-scan-123 Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN { "base64": "YOUR_BASE64_HERE", "filename": "image.jpg", "langCode": "en", "properties": { "webhooks": { "status": "https://my-server.com/webhook/{STATUS}" }, "sandbox": true } } ``` * cURL ```bash curl --request PUT \ --url https://api.copyleaks.com/v3/scans/submit/ocr/my-scan-123 \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "base64": "YOUR_BASE64_HERE", "filename": "image.jpg", "langCode": "en", "properties": { "webhooks": { "status": "https://my-server.com/webhook/{STATUS}" }, "sandbox": true } }' ``` --- # Submit URL > Scan a URL to check for plagiarism, AI-generated content, and get writing assistance. Authenticity PUT **https\://api.copyleaks.com/v3/scans/submit/url/{scanId}** Submit a URL to be scanned for plagiarism, AI-generated content, and writing analysis. Copyleaks will crawl the URL, extract its content, and scan it against its vast database and the internet. Once submitted, the scan will be processed, and you can monitor its progress using webhooks or by checking the scan status. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) 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](/concepts/management/choosing-scan-id). `>= 3 characters` `<= 36 characters` Match pattern: `[a-z0-9] !@$^&-+%=_(){}<>';:/.",~`| ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Request Body [Section titled “Request Body”](#request-body) The request body is a JSON object containing the URL to scan and a `properties` object to configure the scan. url string required The URL to be scanned. e.g., `https://copyleaks.com` verb string Describes the HTTP method that is going to be executed on the specified url. Supported Values: `GET`, `POST`, `PUT` headers array\[array] Custom headers for the request. If specified, no Copyleaks headers are attached (otherwise defaults are used). Use `Set-Cookie` for cookies. Multiple values supported. Example: `[["header-key", "header-value"], ...]` properties object required Configuration options for the scan. action integer default: "0" The type of submission action. * `0`: Scan Start scan immediately. * `1`: Check-Credits Check how many credits will be used for this scan. * `2`: Index Only Only index the file in the Copyleaks internal database or Copyleaks Repository (depends on your submit request). No credits will be used. includeHtml boolean By default, Copyleaks will present the report in text format. If set to `true`, Copyleaks will also include html format. * `True` : results will be generated as HTML format, if possible. Otherwise, it will be generated as text format. * `False` : results will be generated as text format. developerPayload string default: "null" Add custom developer payload that will then be provided on the [webhooks](/reference/data-types/authenticity/webhooks/overview). `<= 512 characters` sandbox boolean default: "false" You can test the integration with the Copyleaks API for free using the sandbox mode. You will be able to submit content for a scan and get back mock results, simulating the way Copyleaks will work to make sure that you successfully integrated with the API. Turn off this feature on production environment. **Rate Limiting**: This method has a maximum call rate limit of 100 sandbox scans within 1 hour. See the 429 Response code section at the bottom of this page. expiration integer default: "2880" Specify the maximum life span of a scan in hours on the Copyleaks servers. When expired, the scan will be deleted and will no longer be accessible. `>= 1` `<= 2880` scanMethodAlgorithm integer default: "0" Choose the algorithm goal. You can set this value depending on your use-case. Available Options: * **0 - MaximumCoverage**: prioritize higher similarity score. * **1 - MaximumResults**: prioritize finding more sources. customMetadata array default: "\[]" Add custom properties that will be attached to your document in a Copyleaks repository. If this document is found as a repository result, your custom properties will be added to the result. Example: ```plaintext [ { "key":"Test1", "value":"Test1" }, ... ] ``` author object id string A unique identifier for the author of the content. course object id string A unique course identifier for tracking analytics. assignment object id string A unique assignment identifier for tracking analytics. institution object id string A unique institution identifier for tracking analytics. webhooks object The `webhooks` object is where you define the callback URLs for Copyleaks to send notifications to. This object is **required**. status string required A URL that will be called when the scan status changes. Use the `{STATUS}` placeholder, which will be replaced with `completed`, `error`, `creditsChecked`, or `indexed`. Example: `https://yoursite.com/webhook/{STATUS}` newResult string A URL that will be called when a new result is found during the scan. newResultHeaders array Custom headers to add to the `newResult` webhook. Example: `[["key", "value"]]` statusHeaders array Custom headers to add to the `status` webhook. Example: `[["key", "value"]]` filters object Fine-tune what kind of results are included in the scan report. identicalEnabled boolean default: "true" Enable matching of exact words. minorChangesEnabled boolean default: "true" Enable matching of nearly identical words (e.g., slow/slowly). relatedMeaningEnabled boolean default: "true" Enable matching of paraphrased content. minCopiedWords integer Only show results with at least this many copied words. safeSearch boolean default: "false" Block explicit adult content from scan results. domains array default: "\[]" A list of domains to include or exclude from the scan. domainsMode integer default: "1" `0` to include domains, `1` to exclude them. allowSameDomain boolean default: "false" Allow results from the same domain as the submitted URL. scanning object Define the sources to compare your document against. internet boolean default: "true" Compare your content with online sources. exclude.idPattern string Exclude submissions from results if their ID matches a pattern (e.g., `abc*`). include.idPattern string Include only submissions whose ID matches a pattern. repositories array default: "\[]" An array of Private Cloud Hubs objects to scan against. Each object needs a Private Cloud Hub `id`. copyleaksDb object Configure scanning against the Copyleaks Shared Data Hub. crossLanguages object Configure cross-language plagiarism detection. indexing object Configure where to index the submitted content. repositories array default: "\[]" Specify which repositories to index the scanned document to. copyleaksDb boolean default: "false" Add the submitted document to the Copyleaks Shared Data Hub. exclude object Configure what content to exclude from the scan. quotes boolean default: "false" Exclude quoted text from the scan. citations boolean default: "false" Exclude citations from the scan. references boolean default: "false" Exclude referenced text from the scan. tableOfContents boolean default: "false" Exclude table of contents from the scan. titles boolean default: "false" When the scanned document is an HTML document, exclude titles from the scan. htmlTemplate boolean default: "false" When the scanned document is an HTML document, exclude irrelevant text that appears across the site like the website footer or header. documentTemplateIds array default: "\[]" Exclude template text found in other documents. Provide an array of scan IDs (max 3). pdf object Configure and request a PDF report of the scan results. create boolean default: "false" Set to true to generate a PDF report for this scan. title string Customize the title for the PDF report (max 256 chars). largeLogo string A base64 encoded PNG image (max 100kb) to use as a logo in the report. rtl boolean default: "false" When set to true the text in the report will be aligned from right to left. version integer default: "1" Deprecated Use `reportVersion`. PDF version to generate (1, 2, or 3). reportVersion string default: "latest" Specifies which version of the PDF report to generate (`v1`, `v2`, `v3`, `latest`). Overrides `version`. colors object Customize colors for titles, identical matches, minor changes, etc. in HEX format. displayLanguage string default: "en" When specified, the PDF report will be generated in the selected language. Future updates may also apply this setting to the overview and other components. Currently supported languages: | Code | Language | | :--- | :--------- | | `en` | English | | `es` | Spanish | | `de` | German | | `fr` | French | | `it` | Italian | | `pt` | Portuguese | sensitivityLevel integer default: "3" You can control the level of plagiarism sensitivity that will be identified according to the speed of the scan. If you prefer a faster scan with the results that contains the highest amount of plagiarism choose 1, and if a slower, more comprehensive scan, that will also detect the smallest instances choose 5. Optional Values: Range between 1 (faster) to 5 (slower but more comprehensive) cheatDetection boolean default: "false" When set to true the submitted document will be checked for cheating. If a cheating will be detected, a scan alert will be added to the completed webhook. aiGeneratedText object Configure AI-generated text detection. detect boolean default: "false" Detects whether the text was written by an AI. sensitivity integer default: "2" Control the behavior of the AI detection (1-3). explain object enable boolean default: "false" Enable AI Logic feature for AI detection. sensitiveDataProtection object driversLicense boolean default: "false" Mask driver’s license numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :------------------------------------- | | Australia driver’s license number | | Canada driver’s license number | | United Kingdom driver’s license number | | USA drivers license number | | Japan driver’s license number | | Spain driver’s license number | | Germany driver’s license number | credentials boolean default: "false" Mask credentials from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :------------------------------------------------ | | Authentication token | | Amazon Web Services credentials | | Azure JSON Web Token | | HTTP basic authentication header | | Google Cloud Platform service account credentials | | Google Cloud Platform API key | | JSON Web Token | | Encryption key | | Password | passport boolean default: "false" Mask passports from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :----------------------------- | | Canada passport number | | China passport number | | France passport number | | Germany passport number | | Ireland passport number | | Japan passport number | | Korea passport number | | Mexico passport number | | Spain passport number | | United Kingdom passport number | | USA passport number | | Netherlands passport number | | Poland passport | | Sweden passport number | | Australia passport number | | Singapore passport number | | Taiwan passport number | network boolean default: "false" Mask network identifiers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. **Supported Types:** | Type | | :---------------- | | IP address | | Local MAC address | | MAC address | url boolean default: "false" Mask url from the scanned document with # characters. Available for users on a plan for 2500 pages or more. emailAddress boolean default: "false" Mask email addresses from the scanned document with # characters. Available for users on a plan for 2500 pages or more. creditCard boolean default: "false" Mask credit card numbers and credit card track numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. phoneNumber boolean default: "false" Mask phone numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more. writingFeedback object Configure the automated Writing Assistant. enable boolean default: "false" Enable automated Writing Assistant for grammar, spelling, etc. score object Configure the weighting of different categories in the overall writing score. grammarScoreWeight number default: "1.0" Grammar correction category weight. Range: `0.0` to `1.0`. mechanicsScoreWeight number default: "1.0" Mechanics correction category weight. Range: `0.0` to `1.0`. sentenceStructureScoreWeight number default: "1.0" Sentence structure correction category weight. Range: `0.0` to `1.0`. wordChoiceScoreWeight number default: "1.0" Word choice correction category weight. Range: `0.0` to `1.0`. overview object Enable Gen-AI Overview feature to extract key insights from the scan data. enable boolean default: "false" Enable Gen-AI Overview feature to extract key insights from the scan data. ignoreAIDetection boolean default: "false" Ignore AI detection when generating the scan’s overview. Only applicable if AI detection was enabled. ignorePlagiarismDetection boolean default: "false" Ignore plagiarism detection when generating the scan’s overview. Only applicable if plagiarism detection was enabled. ignoreWritingFeedback boolean default: "false" Ignore writing assistant when generating the scan’s overview. Only applicable if the writing assistant was enabled. ignoreAuthorData boolean default: "false" Ignore the author’s historical data when generating the scan’s overview. Only applicable if author ID added to the request. aiSourceMatch object The [AI Source Match feature](/concepts/features/ai-source-match) enhances plagiarism detection by identifying online sources that are suspected of containing AI-generated text. This allows you to find instances of potential plagiarism and understand if the matched source content itself might have been created by an AI. enable boolean default: "false" Activates or deactivates the AI Source Match functionality. Note This feature requires both `scanning.internet` and `aiGenerateText.detect` to be enabled. Integration Testing For testing purposes, use sandbox mode - it’s free! ## Responses [Section titled “Responses”](#responses) * 201 201 Created The scan was successfully created and is now processing. #### Response Schema The response contains the following fields: scannedDocument object An object containing metadata about the submitted scan. See [Scanned Document](/reference/data-types/scanned-document) for more details. results object An object containing the plagiarism and AI detection results. See [Results Object](/reference/data-types/results-object) for more details. notifications object An object containing alerts and notifications about the scan. See [Notifications Object](/reference/data-types/notifications-object) for more details. writingFeedback object An object containing writing feedback and suggestions. See [Writing Feedback](/reference/data-types/writing-feedback) for more details. status integer The status of the scan. A value of \`0\` indicates the scan is still in progress. See [Scan Status](/reference/data-types/scan-status) for a complete list of statuses. developerPayload string A developer-provided string that is attached to the scan. This can be used to store your own internal identifiers. \`256 characters\` #### Example Response A typical response from this endpoint: Show full example (93 lines) ```json { "scannedDocument": { "scanId": "scan-id23", "totalWords": 42, "totalExcluded": 0, "credits": 0, "expectedCredits": 1, "creationTime": "2025-08-05T06:46:31.501305Z", "metadata": {}, "enabled": { "plagiarismDetection": true, "aiDetection": false, "explainableAi": false, "writingFeedback": false, "pdfReport": true, "cheatDetection": false, "aiSourceMatch": false }, "detectedLanguage": "en" }, "results": { "score": { "identicalWords": 1, "minorChangedWords": 0, "relatedMeaningWords": 0, "aggregatedScore": 2.4 }, "internet": [ { "url": "http://example.com/", "id": "2a1b402420", "title": "Example Domain", "introduction": "Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without...", "matchedWords": 1, "identicalWords": 1, "similarWords": 0, "paraphrasedWords": 0, "totalWords": 28, "metadata": { "authors": [] }, "tags": [] } ], "database": [], "batch": [], "repositories": [] }, "notifications": { "alerts": [ { "code": "suspected-ai-text", "title": "Potential AI-Generated Text Detected", "message": "We are unable to verify that the text was written by a human.", "severity": 4, "additionalData": "", "category": 2 } ] }, "writingFeedback": { "textStatistics": { "sentenceCount": 5, "averageWordLength": 4.7, "averageSentenceLength": 12.8, "readingTimeSeconds": 21, "speakingTimeSeconds": 29.5 }, "score": { "grammarCorrectionsCount": 1, "grammarCorrectionsScore": 93, "grammarScoreWeight": 1, "mechanicsCorrectionsCount": 1, "mechanicsCorrectionsScore": 93, "mechanicsScoreWeight": 1, "sentenceStructureCorrectionsCount": 1, "sentenceStructureCorrectionsScore": 93, "sentenceStructureScoreWeight": 1, "wordChoiceCorrectionsCount": 0, "wordChoiceCorrectionsScore": 100, "wordChoiceScoreWeight": 1, "overallScore": 94 }, "readability": { "score": 95, "readabilityLevel": 1, "readabilityLevelText": "5th Grader", "readabilityLevelDescription": "Very easy to read" } }, "status": 0, "developerPayload": "" } ``` ```json { "scannedDocument": { "scanId": "scan-id23", "totalWords": 42, "totalExcluded": 0, "credits": 0, "expectedCredits": 1, "creationTime": "2025-08-05T06:46:31.501305Z", "metadata": {}, "enabled": { "plagiarismDetection": true, "aiDetection": false, "explainableAi": false, "writingFeedback": false, "pdfReport": true, // ... truncated ``` - 400 400 Bad Request The url field is required. #### Example Response A typical response from this endpoint: ```json { "url": [ "The url field is required." ] } ``` - 401 401 Unauthorized Authentication failed or API key is invalid. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` - 409 409 Conflict Conflict. An export task with the same Id already exists in the system. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.10", "title": "Conflict", "status": 409, "traceId": "00-561fe3b2451eb51ce489557a2f34f247-3acd41c0b4ad1295-00" } ``` - 429 429 Too Many Requests Rate limit exceeded. #### Example Response A typical response from this endpoint: ```json { "error": "Rate limit exceeded" } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http PUT https://api.copyleaks.com/v3/scans/submit/url/my-scan-123 Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN { "url": "https://copyleaks.com/ai-content-detector", "properties": { "webhooks": { "status": "https://my-server.com/webhook/{STATUS}" }, "sandbox": true, "aiGeneratedText": { "detect": true } } } ``` * cURL ```bash curl --request POST \ --url https://api.copyleaks.com/v3/scans/submit/url/my-scan-123 \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://copyleaks.com/ai-content-detector", "properties": { "webhooks": { "status": "https://my-server.com/webhook/{STATUS}" }, "sandbox": true, "aiGeneratedText": { "detect": true } } }' ``` * Python ```python import requests url = "https://api.copyleaks.com/v3/scans/submit/file/{scanId}" payload = { "base64": "SGVsbG8gd29ybGQh", "filename": "file.txt", "properties": { "webhooks": { "status": "https://yoursite.com/webhook/{STATUS}/my-custom-id" } } } headers = { "Authorization": "", "Content-Type": "application/json", "Accept": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` * JavaScript ```javascript const copyleaks = require('copyleaks'); const EMAIL_ADDRESS = "your@email.address"; const API_KEY = "00000000-0000-0000-0000-000000000000"; // Login to Copyleaks const login = async () => { try { const authToken = await copyleaks.login(EMAIL_ADDRESS, API_KEY); console.log('Logged successfully!\nToken:', authToken); return authToken; } catch (error) { console.error('Failed to login:', error); process.exit(1); } }; ``` * Java ```java import com.copyleaks.sdk.api.Copyleaks; import com.copyleaks.sdk.api.exceptions.CommandException; String EMAIL_ADDRESS = "your@email.address"; String API_KEY = "00000000-0000-0000-0000-000000000000"; // Login to Copyleaks try { String authToken = Copyleaks.login(EMAIL_ADDRESS, API_KEY); System.out.println("Logged successfully!\nToken: " + authToken); } catch (CommandException e) { System.out.println("Failed to login: " + e.getMessage()); System.exit(1); } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Check for AI-Generated Text ](/guides/ai-detector/ai-text-detection/)Learn how to use Copyleaks to detect AI-generated text, including from the latest models. [Check for Plagiarism ](/guides/authenticity/detect-plagiarism-text/)Learn how to use Copyleaks to detect plagiarism by comparing your content against billions of online sources and internal documents. [Check Grammar and Writing Quality ](/guides/writing/check-grammar/)Learn how to use Copyleaks to check for grammar mistakes and get suggestions for improving your writing. --- # Usage History > Get your usage history between two dates. Authenticity GET **https\://api.copyleaks.com/v3/scans/usages/history** This endpoint allows you to export your usage history between two dates. The output results will be exported to a csv file and it will be attached to the response. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Query Parameters [Section titled “Query Parameters”](#query-parameters) start string required The start date to collect usage history from. Format: `dd-MM-yyyy` Example: `01-01-2020` end string required The end date to collect usage history from. Format: `dd-MM-yyyy` Example: `31-01-2020` ### Headers [Section titled “Headers”](#headers) ```http Authorization: Bearer YOUR_LOGIN_TOKEN ``` ## Responses [Section titled “Responses”](#responses) * 200 200 OK The data was exported. Example: csv file will be attached to the response. - 400 400 Bad Request Bad request. Wrong input parameters were provided. #### Example Response A typical response from this endpoint: ```json Value cannot be null. (Parameter ''end' time is missing') ``` - 401 401 Unauthorized Authorization has been denied for this request. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http GET https://api.copyleaks.com/v3/scans/usages/history?start=01-01-2020&end=31-01-2020 Authorization: Bearer YOUR_LOGIN_TOKEN ``` * cURL ```bash curl --request GET \ --url 'https://api.copyleaks.com/v3/scans/usages/history?start=01-01-2020&end=31-01-2020' \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' ``` --- # Moderate Text > Instantly flag hateful, explicit, toxic, or otherwise risky content in any text. Moderation POST **https\://api.copyleaks.com/v1/text-moderation/{scanId}/check** The Copyleaks Text Moderation API provides real-time content moderation capabilities to help you maintain safe and appropriate content across your platform. This API automatically scans and flags potentially harmful content across multiple categories, enabling you to take appropriate action to protect your users and maintain community standards. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) 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](/concepts/management/choosing-scan-id). `>= 3 characters` `<= 36 characters` Match pattern: `[a-z0-9] !@$^&-+%=_(){}<>';:/.",~`| ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Request Body [Section titled “Request Body”](#request-body) The request body is a JSON object containing the text to scan. text string required Text to produce Text Moderation report for. `>= 1 characters` `<= 25000 characters` sandbox boolean default: "false" Use sandbox mode to test your integration with the Copyleaks API without consuming any credits. Submit content for Text Moderation and get returned mock results, simulating Copyleaks’ API functionality to ensure you have successfully integrated the API. This feature is intended to be used for development purposes only. language string The language code of your content. The selected language should be on the Supported Languages list above. If the ‘language’ field is not specified, our system will automatically detect the language of the content. Example: `"en"` labels array\[object] A list of label configurations to be used for the moderation process. id string Identifier for the label. [List of moderation labels](/reference/data-types/moderation/text-moderation-labels/). `>= 1 characters` `<= 32 characters` ## Responses [Section titled “Responses”](#responses) * 200 200 OK The scan was Created. #### Response Schema The response contains the following fields: modelVersion string The version of the moderation model used. moderations object An object containing the moderation results for the text. See [Text Moderation Response](/reference/data-types/moderation/text-moderation-response) for more details. legend array\ A legend mapping label indices to label IDs. See [Text Moderation Labels](/reference/data-types/moderation/text-moderation-labels) for more details. scannedDocument object Metadata about the moderation scan. See [Scanned Document](/reference/data-types/scanned-document) for more details. #### Example Response A typical response from this endpoint: Show full example (87 lines) ```json { "modelVersion": "v1", "moderations": { "text": { "chars": { "labels": [ 4, 4, 4, 2, 7, 6 ], "starts": [ 15, 73, 138, 287, 407, 446 ], "lengths": [ 4, 4, 4, 14, 12, 24 ] } } }, "legend": [ { "index": 0, "id": "other-v1" }, { "index": 1, "id": "adult-v1" }, { "index": 2, "id": "toxic-v1" }, { "index": 3, "id": "violent-v1" }, { "index": 4, "id": "profanity-v1" }, { "index": 5, "id": "self-harm-v1" }, { "index": 6, "id": "harassment-v1" }, { "index": 7, "id": "hate-speech-v1" }, { "index": 8, "id": "drugs-v1" }, { "index": 9, "id": "firearms-v1" }, { "index": 10, "id": "cybersecurity-v1" } ], "scannedDocument": { "scanId": "scan-id", "totalWords": 86, "totalExcluded": 0, "actualCredits": 1, "expectedCredits": 1, "creationTime": "2025-08-06T08:05:20.6787519Z" } } ``` ```json { "modelVersion": "v1", "moderations": { "text": { "chars": { "labels": [ 4, 4, 4, 2, 7, 6 ], "starts": [ 15, // ... truncated ``` - 400 400 Bad Request Bad Request. #### Example Response A typical response from this endpoint: ```json { "ErrorMessage": "Id Label my-label is not supported", "ErrorCode": "Bad Request" } ``` - 401 401 Unauthorized Authorization has been denied for this request. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` - 409 409 Conflict A scan with the same Id already exists in the system. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.10", "title": "Conflict", "status": 409, "traceId": "00-561fe3b2451eb51ce489557a2f34f247-3acd41c0b4ad1295-00" } ``` - 429 429 Too Many Requests Too many requests have been sent. The request has been rejected. #### Example Response A typical response from this endpoint: ```json { "error": "Rate limit exceeded", } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http POST https://api.copyleaks.com/v1/text-moderation/my-scan-123/check Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN { "text": "Your text content to be moderated goes here.", "sandbox": true, "labels": [ { "id": "toxic-v1" }, { "id": "profanity-v1" }, { "id": "hate-speech-v1" } ] } ``` * cURL ```bash curl --request POST \ --url https://api.copyleaks.com/v1/text-moderation/my-scan-123/check \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "text": "Your text content to be moderated goes here.", "sandbox": true, "labels": [ { "id": "toxic-v1" }, { "id": "profanity-v1" }, { "id": "hate-speech-v1" } ] }' ``` --- # Text Moderation Actions > Moderate text for harmful content. Moderation The Copyleaks text moderation API allows you to moderate text for harmful content. ## Endpoints [Section titled “Endpoints”](#endpoints) [POST v1/text-moderation/{scanId}/check](/reference/actions/text-moderation/check) [Check text for harmful content.](/reference/actions/text-moderation/check) --- # Detect Source Code > Differentiate between human-written and AI-written source code. AI Detector POST **https\://api.copyleaks.com/v2/writer-detector/source-code/{scanId}/check** Deprecation Notice AI Code Detection will be discontinued on **August 29, 2025**. Please remove AI code detection integrations before the sunset date. Use Copyleaks AI Content Detection to differentiate between human-written and AI-written source code. This endpoint will receive submitted source code to be checked. At the end of the processing stage, the result will be shown as classifications. Source code classification is divided into sections. Each section may have a different classification. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) 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](/concepts/management/choosing-scan-id). `>= 3 characters` `<= 36 characters` Match pattern: `[a-z0-9] !@$^&-+%=_(){}<>';:/.",~`| ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Request Body [Section titled “Request Body”](#request-body) The request body is a JSON object containing the source code to scan. text string required A text string. Supported Languages: * Ruby * javascript * typescript * python * C++ * C * Java * C# * PHP `>= 255 characters` `<= 25000 characters` filename string required The name of the file. Make sure to include the right extension for your file type. Example: `Myfile.py` sandbox boolean default: "false" Use sandbox mode to test your integration with the Copyleaks API for free. code object comments boolean default: "false" When set to true, the scan will ignore comments in the source code. ## Responses [Section titled “Responses”](#responses) * 200 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\ An array of classification results for different sections of the code. See [AI Detection Response](/reference/data-types/authenticity/results/ai-detection) for more details. summary object A summary of the overall classification (human vs. AI). scannedDocument object Metadata about the scan. See [Scanned Document](/reference/data-types/scanned-document) for more details. explain object Data for the AI Logic feature, explaining the classification. See [AI Logic](/concepts/features/ai-logic) for more details. #### Example Response A typical response from this endpoint: Show full example (115 lines) ```json { "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": "check", "totalWords": 221, "totalExcluded": 0, "actualCredits": 1, "expectedCredits": 1, "creationTime": "2023-01-10T10:07:58.9459512Z" }, "explain": { "patterns": { "statistics": { "aiCount": [ 15.9636, 39.5495, 84.7079, 119.871, 9.9233, 185.667, 14.4536, 19.1995 ], "humanCount": [ 0.8076, 1.5076, 3.8228, 8.5071, 0.3769, 4.2536, 0.3231, 1.1845 ] }, "text": { "chars": { "starts": [ 31, 55, 303, 909, 961, 987, 1129, 1775 ], "lengths": [ 23, 32, 23, 33, 25, 30, 30, 19 ] }, "words": { "starts": [ 5, 9, 45, 135, 144, 148, 169, 257 ], "lengths": [ 4, 6, 3, 6, 4, 5, 5, 3 ] } } } } } ``` ```json { "modelVersion": "v5", "results": [ { "classification": 2, "probability": 1, "matches": [ { "text": { "chars": { "starts": [ 0 ], "lengths": [ 1509 // ... truncated ``` - 400 400 Bad Request Bad request. #### Example Response A typical response from this endpoint: ```json { "ErrorMessage": "Language not supported", "ErrorCode": "unsupported-lang" } ``` - 401 401 Unauthorized Authorization has been denied for this request. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` - 429 429 Too Many Requests Too many requests have been sent. The request has been rejected. #### Example Response A typical response from this endpoint: ```json { "error": "Rate limit exceeded", } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http POST https://api.copyleaks.com/v2/writer-detector/source-code/my-scan-123/check Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN { "text": "import sqlite3 def connect_to_database(): return sqlite3.connect(\"pharmacy.db\") def retrieve_medication_data(medication_id): connection = connect_to_database() cursor = connection.cursor() cursor.execute(\"SELECT * FROM medications WHERE id=?\", (medication_id,)) medication_data = cursor.fetchone() connection.close() return medication_data # Example usage medication_data = retrieve_medication_data(\"ABC123\") print(medication_data)", "filename": "MyFile.py" } ``` * cURL ```bash curl --request POST \ --url https://api.copyleaks.com/v2/writer-detector/source-code/my-scan-123/check \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "text": "import sqlite3 def connect_to_database(): return sqlite3.connect(\"pharmacy.db\") def retrieve_medication_data(medication_id): connection = connect_to_database() cursor = connection.cursor() cursor.execute(\"SELECT * FROM medications WHERE id=?\", (medication_id,)) medication_data = cursor.fetchone() connection.close() return medication_data # Example usage medication_data = retrieve_medication_data(\"ABC123\") print(medication_data)", "filename": "MyFile.py" }' ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [AI Text Detection ](/guides/ai-detector/ai-text-detection/)Learn how to use the AI Detection API for natural language. [AI Logic ](/concepts/features/ai-logic/)Understand how AI logic can help you interpret the results of AI text detection. [Technical Specifications ](/reference/data-types/authenticity/technical-specifications/)Review the technical specifications for supported file types and other limits. --- # Detect Natural Language > Differentiate between human-written and AI-written text. AI Detector 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. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) 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](/concepts/management/choosing-scan-id). `>= 3 characters` `<= 36 characters` Match pattern: `[a-z0-9] !@$^&-+%=_(){}<>';:/.",~|` ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Request Body [Section titled “Request Body”](#request-body) 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. | 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"` explain boolean default: "false" beta Enable AI Logic feature for AI detection. Example: ```json { "text": "Your text here", "explain": true } ``` For further information, please check the [AI Logic](/concepts/features/ai-logic) for a detailed breakdown of its structure and usage, and for full AI Detection response please check the [AI Detection Response](/reference/data-types/authenticity/results/ai-detection). 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` ## Responses [Section titled “Responses”](#responses) * 200 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\ An array of classification results for different sections of the text. See [AI Detection Response](/reference/data-types/authenticity/results/ai-detection) for more details. summary object A summary of the overall classification (human vs. AI). scannedDocument object Metadata about the scan. See [Scanned Document](/reference/data-types/scanned-document) for more details. explain object Data for the AI Logic feature, explaining the classification. See [AI Logic](/concepts/features/ai-logic) for more details. #### Example Response A typical response from this endpoint: Show full example (115 lines) ```json { "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": "check", "totalWords": 221, "totalExcluded": 0, "actualCredits": 1, "expectedCredits": 1, "creationTime": "2023-01-10T10:07:58.9459512Z" }, "explain": { "patterns": { "statistics": { "aiCount": [ 15.9636, 39.5495, 84.7079, 119.871, 9.9233, 185.667, 14.4536, 19.1995 ], "humanCount": [ 0.8076, 1.5076, 3.8228, 8.5071, 0.3769, 4.2536, 0.3231, 1.1845 ] }, "text": { "chars": { "starts": [ 31, 55, 303, 909, 961, 987, 1129, 1775 ], "lengths": [ 23, 32, 23, 33, 25, 30, 30, 19 ] }, "words": { "starts": [ 5, 9, 45, 135, 144, 148, 169, 257 ], "lengths": [ 4, 6, 3, 6, 4, 5, 5, 3 ] } } } } } ``` ```json { "modelVersion": "v5", "results": [ { "classification": 2, "probability": 1, "matches": [ { "text": { "chars": { "starts": [ 0 ], "lengths": [ 1509 // ... truncated ``` - 400 400 Bad Request Bad request. #### Example Response A typical response from this endpoint: ```json { "ErrorMessage": "Language not supported", "ErrorCode": "unsupported-lang" } ``` - 401 401 Unauthorized Authorization has been denied for this request. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` - 429 429 Too Many Requests Too many requests have been sent. The request has been rejected. #### Example Response A typical response from this endpoint: ```json { "error": "Rate limit exceeded", } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http 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 } ``` * cURL ```bash 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 }' ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Detect AI-Generated Text ](/guides/ai-detector/ai-text-detection/)Learn how to use the AI Detection API to check if content was written by a human or generated by an AI. [AI Logic ](/concepts/features/ai-logic/)Understand how AI logic can help you interpret the results of AI text detection. [AI Detection Webhook ](/reference/data-types/authenticity/results/ai-detection/)Learn about the webhook that delivers AI detection results. --- # Get Credit Balance > Get the amount of available credits in your account wallet. GET **https\://api.copyleaks.com/v2/writer-detector/credits** Get the amount of available credits in your account wallet. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Headers [Section titled “Headers”](#headers) ```http Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Examples [Section titled “Examples”](#examples) * HTTP ```http GET https://api.copyleaks.com/v2/writer-detector/credits Authorization: Bearer YOUR_LOGIN_TOKEN ``` * cURL ```bash curl --request GET \ --url https://api.copyleaks.com/v2/writer-detector/credits \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' ``` ## Responses [Section titled “Responses”](#responses) * 200 200 OK The command was executed. #### Response Schema The response contains the following fields: credits integer The number of AI detection credits available. #### Example Response A typical response from this endpoint: ```json { "credits": 382 } ``` - 401 401 Unauthorized Authorization has been denied for this request. --- # AI Detector Actions > Detect the writer of a text. AI Detector The Copyleaks AI Detector API allows you to predict whether a text was written by a human or an AI. ## Endpoints [Section titled “Endpoints”](#endpoints) [POST v2/writer-detector/{scanId}/check](/reference/actions/writer-detector/check) [Detect whether a text was written by a human or an AI.](/reference/actions/writer-detector/check) [POST v2/writer-detector/source-code/{scanId}/check Deprecated](/reference/actions/writer-detector/check-source-code) [Detect whether a source code was written by a human or an AI.](/reference/actions/writer-detector/check-source-code) --- # Submit Text > Generate grammar, spelling, and sentence corrections for a given text. Writing POST **https\://api.copyleaks.com/v1/writing-feedback/{scanId}/check** Use Copyleaks Writing Assistant to generate grammar, spelling and sentence corrections for a given text. This endpoint will receive submitted text to be checked. The response will show the suggested corrections to the input text. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) 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](/concepts/management/choosing-scan-id). `>= 3 characters` `<= 36 characters` Match pattern: `[a-z0-9] !@$^&-+%=_(){}<>';:/.",~`| ### Headers [Section titled “Headers”](#headers) ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` ### Request Body [Section titled “Request Body”](#request-body) The request body is a JSON object containing the text to scan. text string required Text to produce Writing Assistant report for. `>= 1 characters` `<= 25000 characters` sandbox boolean default: "false" Use sandbox mode to test your integration with the Copyleaks API without consuming any credits. Submit content for Writing Assistant and get returned mock results, simulating Copyleaks’s API functionality to ensure you have successfully integrated the API. This feature is intended to be used for development purposes only. score object grammarScoreWeight number\ default: "1.0" Grammar correction category weight in the overall score. `>= 0.0 <=1.0` mechanicsScoreWeight number\ default: "1.0" Mechanics correction category weight in the overall score. `>= 0.0 <=1.0` sentenceStructureScoreWeight number\ default: "1.0" Sentence structure correction category weight in the overall score. `>= 0.0 <=1.0` wordChoiceScoreWeight number\ default: "1.0" Word choice correction category weight in the overall score. `>= 0.0 <=1.0` language string The language code of your content. The selected language should be on the Supported Languages list above. If the ‘language’ field is not supplied , our system will automatically detect the language of the content. Example: `"en"` ## Responses [Section titled “Responses”](#responses) * 200 200 OK The command was executed. #### Response Schema The response contains the following fields: score object An object containing the overall score, readability, and text statistics. See [Score](/reference/data-types/writing-feedback/score) for more details. corrections object An object containing the detailed corrections for the text. See [Corrections](/reference/data-types/writing-feedback/corrections) for more details. scannedDocument object Metadata about the scan. See [Scanned Document](/reference/data-types/scanned-document) for more details. #### Example Response A typical response from this endpoint: Show full example (102 lines) ```json { "score": { "corrections": { "grammarCorrectionsCount": 2, "grammarCorrectionsScore": 87, "grammarScoreWeight": 1, "mechanicsCorrectionsCount": 9, "mechanicsCorrectionsScore": 38, "mechanicsScoreWeight": 1, "sentenceStructureCorrectionsCount": 0, "sentenceStructureCorrectionsScore": 100, "sentenceStructureScoreWeight": 1, "wordChoiceCorrectionsCount": 1, "wordChoiceCorrectionsScore": 93, "wordChoiceScoreWeight": 1, "overallScore": 79 }, "readability": { "score": 59, "readabilityLevel": 5, "readabilityLevelText": "10th to 12th Grader", "readabilityLevelDescription": "Fairly difficult to read" }, "statistics": { "sentenceCount": 5, "averageSentenceLength": 12.2, "averageWordLength": 5.5, "readingTimeSeconds": 16, "speakingTimeSeconds": 28.2 } }, "corrections": { "text": { "chars": { "types": [ 5, 18, 3, 18, 18, 18, 18, 10, 18, 16, 18, 18 ], "starts": [ 13, 22, 61, 104, 118, 136, 179, 233, 288, 347, 353, 374 ], "lengths": [ 2, 10, 9, 6, 8, 35, 13, 9, 12, 4, 8, 11 ], "operationTexts": [ "an ", "plagiarism ", "businesses ", "their ", "original.", "texts from the internet and data bases ", "similarities.", "multilingual ", "positives, ", "it's ", "useful ", "maintaining " ] } } }, "scannedDocument": { "scanId": "{scanId}", "totalWords": 61, "totalExcluded": 0, "actualCredits": 1, "expectedCredits": 1, "creationTime": "2025-08-06T08:00:08.0429909Z" } } ``` ```json { "score": { "corrections": { "grammarCorrectionsCount": 2, "grammarCorrectionsScore": 87, "grammarScoreWeight": 1, "mechanicsCorrectionsCount": 9, "mechanicsCorrectionsScore": 38, "mechanicsScoreWeight": 1, "sentenceStructureCorrectionsCount": 0, "sentenceStructureCorrectionsScore": 100, "sentenceStructureScoreWeight": 1, "wordChoiceCorrectionsCount": 1, "wordChoiceCorrectionsScore": 93, "wordChoiceScoreWeight": 1, // ... truncated ``` - 400 400 Bad Request Bad request. #### Example Response A typical response from this endpoint: ```json { "ErrorMessage": "Language not supported", "ErrorCode": "Bad Request" } ``` - 401 401 Unauthorized Authorization has been denied for this request. #### Example Response A typical response from this endpoint: ```json { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00" } ``` - 402 402 Payment Required User does not have enough credits. #### Example Response A typical response from this endpoint: ```json Writing Feedback is not enabled to your account. ``` - 429 429 Too Many Requests Too many requests have been sent. The request has been rejected. #### Example Response A typical response from this endpoint: ```json { "error": "Rate limit exceeded", } ``` ## Examples [Section titled “Examples”](#examples) * HTTP ```http POST https://api.copyleaks.com/v1/writing-feedback/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." } ``` * cURL ```bash curl --request POST \ --url https://api.copyleaks.com/v1/writing-feedback/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." }' ``` --- # Get Correction Types > Get a list of correction types supported within the Writing Assistant API. Writing GET **https\://api.copyleaks.com/v1/writing-feedback/correction-types/{language\_code}** Get a list of correction types supported within the Writing Assistant API. Correction types apply to all supported languages. The supplied language code for this request is used to determine the language of the texts returned. 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 >** Need Help? Not sure how to generate your login token? Read **[here](/reference/actions/account/login/)**. ## Request [Section titled “Request”](#request) ### Path Parameters [Section titled “Path Parameters”](#path-parameters) language\_code string required The language for the returned texts to be in. Language codes are in ISO 639-1 standard. Supported Values: en - English ### Headers [Section titled “Headers”](#headers) ```http Authorization: Bearer YOUR_LOGIN_TOKEN ``` ## Response [Section titled “Response”](#response) * 200 200 OK The command was executed. #### Example Response A typical response from this endpoint: Show full example (242 lines) ```json { "correctionTypes": [ { "title": "General", "description": "A general correction detected.", "message": "A general correction detected", "id": 1, "category": 2 }, { "title": "Subject Verb Disagreement", "description": "The subject and verb do not agree in number.", "message": "Subject-verb disagreement detected", "id": 2, "category": 2 }, { "title": "Noun Form", "description": "Using an incorrect form of a noun (such as pluralization or possessive form) in a sentence.", "message": "Use a different noun form", "id": 3, "category": 2 }, { "title": "Verb Form", "description": "Using an incorrect form of a verb (such as tense, aspect, or agreement) in a sentence results.", "message": "Use a different verb form", "id": 4, "category": 2 }, { "title": "Article", "description": "Using the wrong article (a, an, or the) or omitting an article inappropriately in a sentence.", "message": "Use the appropriate article", "id": 5, "category": 2 }, { "title": "Preposition", "description": "Using the wrong preposition or misplacing a preposition in a sentence.", "message": "Incorrect preposition usage", "id": 6, "category": 2 }, { "title": "Pronoun", "description": "Using an incorrect pronoun or misplacing a pronoun in a sentence.", "message": "Incorrect pronoun usage", "id": 7, "category": 2 }, { "title": "Part of Speech", "description": "Misusing or misidentifying a word's grammatical category, such as confusing a noun with a verb.", "message": "Incorrect part of speech", "id": 8, "category": 2 }, { "title": "Conjunction", "description": "Misusing or misplacing conjunctions, which are words that connect words, phrases, or clauses in a sentence.", "message": "Incorrect conjunction usage", "id": 9, "category": 2 }, { "title": "Misused Word", "description": "Words that are used incorrectly or inappropriately in a given context.", "message": "Use a different word to convey the message", "id": 10, "category": 3 }, { "title": "Homophone", "description": "Confusing two words that phonetically sound similar but have a different meaning (e.g., "their" and "there" or "to" and "too").", "message": "Incorrect homophone usage detected", "id": 11, "category": 3 }, { "title": "Capitalization", "description": "Word was not capitalized correctly (e.g. “paris” should be “Paris”).", "message": "Incorrect capitalization", "id": 12, "category": 4 }, { "title": "Hyphen", "description": "Incorrect or inconsistent use of hyphens in a sentence.", "message": "Hyphen usage is incorrect", "id": 13, "category": 4 }, { "title": "Punctuation", "description": "Incorrect use of punctuation marks, such as commas, periods, semicolons, or colons.", "message": "Incorrect punctuation usage", "id": 14, "category": 4 }, { "title": "Comma", "description": "Incorrect use of commas in sentences.", "message": "Incorrect comma usage", "id": 15, "category": 4 }, { "title": "Apostrophe", "description": "Incorrect use of apostrophes in sentences.", "message": "Incorrect apostrophe usage", "id": 16, "category": 4 }, { "title": "Space", "description": "Missing or extra spaces detected in sentence.", "message": "Missing or extra spaces", "id": 17, "category": 4 }, { "title": "Spelling", "description": "Misspelling of a word.", "message": "Misspelling detected", "id": 18, "category": 4 }, { "title": "Fused Sentence", "description": "When two independent clauses are incorrectly joined without appropriate punctuation or conjunction.", "message": "Fused sentence detected", "id": 19, "category": 1 }, { "title": "Comma Splice", "description": "Two independent clauses are incorrectly joined by a comma without a coordinating conjunction or appropriate punctuation.", "message": "Comma splice detected", "id": 20, "category": 1 }, { "title": "Sentence Fragments", "description": "When a group of words appears to be a sentence but is incomplete because it lacks a subject, a predicate, or both.", "message": "Ensure your sentence has a complete subject and predicate", "id": 21, "category": 1 }, { "title": "Ineffective Construction", "description": "Refers to sentences or phrases that are poorly constructed or lack clarity, making it difficult for readers to understand the intended meaning.", "message": "Revise the sentence for better clarity and structure", "id": 22, "category": 1 }, { "title": "Extra Words", "description": "Sentences that contain unnecessary or redundant words, which can be removed for clearer and more concise writing.", "message": "Sentence contains extra words", "id": 23, "category": 1 }, { "title": "Missing Words", "description": "Identifies sentences that are missing essential words, resulting in incomplete or unclear meaning.", "message": "Sentence with missing words", "id": 24, "category": 1 }, { "title": "Adjective Gender Agreement", "description": "Detects errors in the gender agreement between adjectives and nouns.", "message": "Gender agreement mismatch in adjectives", "id": 25, "category": 2 }, { "title": "Adjective Number Agreement", "description": "Highlights discrepancies in the number agreement between adjectives and nouns for improved grammatical precision.", "message": "Number agreement error with adjectives", "id": 26, "category": 2 }, { "title": "Article Gender Agreement", "description": "Agreement between articles and nouns in terms of gender is incorrect, ensuring grammatical accuracy.", "message": "Gender agreement error in articles", "id": 27, "category": 2 }, { "title": "Article Number Agreement", "description": "Number mismatch between articles and nouns creating inconsistency in how they refer to the same or similar elements in a sentence.", "message": "Number agreement error in articles", "id": 28, "category": 2 }, { "title": "Noun Gender Agreement", "description": "Lack of agreement between nouns and their associated genders, ensuring grammatical harmony.", "message": "Gender agreement error with nouns", "id": 29, "category": 2 }, { "title": "Subjunctive Mood", "description": "Identifies the incorrect usage of the subjunctive mood in sentences, ensuring proper expression of hypothetical or unreal situations.", "message": "Subjunctive mood misuse", "id": 30, "category": 2 }, { "title": "Compound Word Error", "description": "Identifies incorrect compound word usage.", "message": "Compound word usage error", "id": 31, "category": 2 }, { "title": "Mood Inconsistency", "description": "Detects inconsistencies in the expression of mood within a sentence, ensuring cohesive writing.", "message": "Inconsistency in mood detected", "id": 32, "category": 2 }, { "title": "Accent Error", "description": "Highlights deviations in accents, promoting uniform language usage.", "message": "Incorrect or missing usage of accents", "id": 33, "category": 4 }, { "title": "Homoglyph Error", "description": "Non-standard characters that resemble standard ones have been detected.", "message": "Homoglyphs detected in text", "id": 34, "category": 2 } ] } ``` ```json { "correctionTypes": [ { "title": "General", "description": "A general correction detected.", "message": "A general correction detected", "id": 1, "category": 2 }, { "title": "Subject Verb Disagreement", "description": "The subject and verb do not agree in number.", "message": "Subject-verb disagreement detected", "id": 2, "category": 2 // ... truncated ``` - 400 400 Bad Request Bad request. Language not supported. #### Example Response A typical response from this endpoint: ```json { "ErrorMessage": "Language not supported", "ErrorCode": "unsupported-lang" } ``` ### Body [Section titled “Body”](#body) correctionTypes array\[object] List of correction types and corresponding user interface information. title string Shortened capitalized name of the correction. message string A short explanation of the correction. description string A longer, more explicit explanation of the correction. id integer An identifier for the correction type. category integer Unsigned Integer Category of the correction type. **Available Values:** `1` : Sentence Structure `2` : Grammar `3` : Word Choice `4` : Mechanics `>= 1` ## Examples [Section titled “Examples”](#examples) * HTTP ```http GET https://api.copyleaks.com/v1/writing-feedback/correction-types/en Authorization: Bearer YOUR_LOGIN_TOKEN ``` * cURL ```bash curl --request GET \ --url https://api.copyleaks.com/v1/writing-feedback/correction-types/en \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' ``` --- # Writing Assistant Actions > Assess and improve writing with feedback on grammar, spelling, and sentence structure. Writing The Copyleaks Writing Assistant API allows you to get feedback on your writing. It provides suggestions for improving grammar, spelling, and sentence structure, helping you enhance the quality of your text. ## Endpoints [Section titled “Endpoints”](#endpoints) [POST v1/writing-feedback/{scanId}/check](/reference/actions/writing-assistant/check) [Submit text for writing feedback and receive suggestions for improvement.](/reference/actions/writing-assistant/check) [GET v1/writing-feedback/correction-types/{language\_code}](/reference/actions/writing-assistant/correction-types) [Get a list of supported correction types.](/reference/actions/writing-assistant/correction-types) --- # AI Detection Response > Response structure and field definitions for the Copyleaks AI Content Detection API, including classification results and detailed explanations. AI Detector The Copyleaks AI Content Detection API returns a comprehensive response that includes classification results, probability scores, and detailed explanations of the AI detection analysis. This response structure provides both high-level insights and granular details about detected AI-generated content patterns. ## Response Properties [Section titled “Response Properties”](#response-properties) modelVersion string The version of the AI detection model used (e.g., “v9.0”). results array\ An array of classification results for different sections of the text. result array\[object] An array of all the classifications. The sections contain their position, classification and the probability for that classification. classification integer Indicates the text classification. **Available Options:** `1` - Human `2` - AI Generated Text probability number\ deprecated The classification confidence. Caution We plan to remove this value by July 2026. matches array\[object] Provides information about the match objects that have been found in the text. text object Describes the text positions for the result (textual version). chars object Positions of the characters in that sepcific result. starts array\[integer] Character match start positions. lengths array\[integer] Character match lengths. words object Positions of the words in that sepcific result. starts array\[integer] Words match start positions. length array\[integer] Words match lengths. html object Describes the text positions for the result (html version). Default: `null` chars object Positions of the characters in that sepcific result. starts array\[integer] Character match start positions. length array\[integer] Character match lengths. groupIds array\[integer] Group identifiers associated with each word. words object Positions of the words in that sepcific result. starts array\[integer] Words match start positions. length array\[integer] Words match lengths. groupIds array\[integer] Group identifiers associated with each word. summary object An object containing the overall proportion of human vs. AI-written content. summary object Aggregated detection results. human number\ Indicates the confidence in which this text was written by a human. ai number\ Indicates the confidence in which this text was written by AI. scannedDocument object Metadata about the scan. scanId string The unique scan id provided by you. totalWords integer Unsigned Integer Total number of words found in the scanned text. totalExcluded integer Unsigned Integer Number of excluded words in the submitted content. credits integer Overall credits used for the scan. creationTime string\ The creation time of the scan. Timezone: UTC+0 metadata object finalUrl string\ The submitted url after all http redirects. canonicalUrl string\ Extracted canonical url from the scanned document. publishDate string\ Publication date of the scanned document. creationDate string\ Creation date of the scanned document. lastModificationDate string\ Last modification date of the scanned document. author string Scanned document author. organization string Scanned document organization. filename string Scanned document filename. explain object Data for the AI Logic feature, providing a detailed explanation of the detection patterns. This is only present when AI Logic is enabled in the request. explain object beta Example: `{}` patterns object statistics object aiCount array\[number] The number of occurrences of AI-generated text patterns per 1 million texts. humanCount array\[number] The number of occurrences of human-written text patterns per 1 million texts. text object chars object starts array\[number] Start positions of character matches. lengths array\[number] Lengths of the character matches. words object starts array\[number] Start positions of word matches. lengths array\[number] Lengths of the word matches. ## Example Response [Section titled “Example Response”](#example-response) ```json { "modelVersion": "v9.0", "results": [ { "classification": 2, "probability": 0.7316979, "matches": [ { "text": { "chars": { "starts": [0], "lengths": [554] }, "words": { "starts": [0], "lengths": [73] } } } ] } ], "summary": { "human": 0.0, "ai": 1.0 }, "scannedDocument": { "scanId": "scan-id", "totalWords": 73, "totalExcluded": 0, "actualCredits": 1, "expectedCredits": 1, "creationTime": "2025-08-10T08:33:05.22225Z" }, "explain": { "patterns": { "statistics": { "aiCount": [1.2066389, 9.673915, 34.41001], "humanCount": [0.18481831, 0.13894142, 0.33555666], "proportion": [6.5287843, 69.625854, 102.54607], "source": [1, 1, 1] }, "text": { "chars": { "starts": [10, 96, 136], "lengths": [25, 33, 33] }, "words": { "starts": [1, 12, 17], "lengths": [4, 4, 5] } } } } } ``` ## Classification Codes [Section titled “Classification Codes”](#classification-codes) | Code | Classification | Description | | ---- | -------------- | ------------------------------------------------------------- | | 0 | Human | Content is likely written by a human | | 1 | Mixed | Content contains both human-written and AI-generated segments | | 2 | AI-generated | Content is likely generated by artificial intelligence | ## Next Steps [Section titled “Next Steps”](#next-steps) [AI Content Detection Guide ](/guides/ai-detector/ai-text-detection/)Learn how to use the AI Content Detection API to identify AI-generated text. [AI Detection API Reference ](/reference/actions/writer-detector/check/)Explore the complete API reference for AI content detection. [AI Logic Feature ](/concepts/features/ai-logic/)Understand how AI Logic provides transparency in AI detection results. --- # Moderation > Explore the data types related to content moderation. AI Detector This section provides detailed information about the data types related to AI Detection. [AI Detector Response ](/reference/data-types/moderation/text-moderation-labels)A snapshot of AI Detection results detected by Copyleaks. --- # Correction Types > Writing assistant correction categories Each detected correction has an attached type. These types may be used to understand what error was detected and show it in the user interface. You are able to fetch the list of correction types programmatically using the following [endpoint](/reference/actions/writing-assistant/correction-types). ## Categories [Section titled “Categories”](#categories) | id | Category | | -- | ------------------ | | 1 | Sentence Structure | | 2 | Grammar | | 3 | Word Choice | | 4 | Mechanics | ## Types [Section titled “Types”](#types) | ID | Title | Message | Description | Category | | ---- | -------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -------- | | `1` | General | A general correction detected | A general correction detected. | 2 | | `2` | Subject Verb Disagreement | Subject-verb disagreement detected | The subject and verb do not agree in number. | 2 | | `3` | Noun Form | Use a different noun form | Using an incorrect form of a noun (such as pluralization or possessive form) in a sentence. | 2 | | `4` | Verb Form | Use a different verb form | Using an incorrect form of a verb (such as tense, aspect, or agreement) in a sentence results. | 2 | | `5` | Article | Use the appropriate article | Using the wrong article (a, an, or the) or omitting an article inappropriately in a sentence. | 2 | | `6` | Preposition | Incorrect preposition usage | Using the wrong preposition or misplacing a preposition in a sentence. | 2 | | `7` | Pronoun | Incorrect pronoun usage | Using an incorrect pronoun or misplacing a pronoun in a sentence. | 2 | | `8` | Part of Speech | Incorrect part of speech | Misusing or misidentifying a word’s grammatical category, such as confusing a noun with a verb. | 2 | | `9` | Conjunction | Incorrect conjunction usage | Misusing or misplacing conjunctions, which are words that connect words, phrases, or clauses in a sentence. | 2 | | `10` | Misused Word | Use a different word to convey the message | Words that are used incorrectly or inappropriately in a given context. | 3 | | `11` | Homophone | Incorrect homophone usage detected | Confusing two words that phonetically sound similar but have a different meaning (e.g., “their” and “there” or “to” and “too”). | 3 | | `12` | Capitalization | Incorrect capitalization | Word was not capitalized correctly (e.g., “paris” should be “Paris”). | 4 | | `13` | Hyphen | Hyphen usage is incorrect | Incorrect or inconsistent use of hyphens in a sentence. | 4 | | `14` | Punctuation | Incorrect punctuation usage | Incorrect use of punctuation marks, such as commas, periods, semicolons, or colons. | 4 | | `15` | Comma | Incorrect comma usage | Incorrect use of commas in sentences. | 4 | | `16` | Apostrophe | Incorrect apostrophe usage | Incorrect use of apostrophes in sentences. | 4 | | `17` | Space | Missing or extra spaces | Missing or extra spaces detected in sentence. | 4 | | `18` | Spelling | Misspelling detected | Misspelling of a word. | 4 | | `19` | Fused Sentence | Fused sentence detected | When two independent clauses are incorrectly joined without appropriate punctuation or conjunction. | 1 | | `20` | Comma Splice | Comma splice detected | Two independent clauses are incorrectly joined by a comma without a coordinating conjunction or appropriate punctuation. | 1 | | `21` | Sentence Fragments | Ensure your sentence has a complete subject and predicate | When a group of words appears to be a sentence but is incomplete because it lacks a subject, a predicate, or both. | 1 | | `22` | Ineffective Construction | Revise the sentence for better clarity and structure | Refers to sentences or phrases that are poorly constructed or lack clarity, making it difficult for readers to understand the intended meaning. | 1 | | `23` | Extra Words | Sentence contains extra words | Sentences that contain unnecessary or redundant words, which can be removed for clearer and more concise writing. | 1 | | `24` | Missing Words | Sentence with missing words | Identifies sentences that are missing essential words, resulting in incomplete or unclear meaning. | 1 | | `25` | Adjective Gender Agreement | Gender agreement mismatch in adjectives | Detects errors in the gender agreement between adjectives and nouns. | 2 | | `26` | Adjective Number Agreement | Number agreement error with adjectives | Highlights discrepancies in the number agreement between adjectives and nouns for improved grammatical precision. | 2 | | `27` | Article Gender Agreement | Gender agreement error in articles | Agreement between articles and nouns in terms of gender is incorrect , ensuring grammatical accuracy. | 2 | | `28` | Article Number Agreement | Number agreement error in articles | Number mismatch between articles and nouns creating inconsistency in how they refer to the same or similar elements in a sentence. | 2 | | `29` | Noun Gender Agreement | Gender agreement error with nouns | Lack of agreement between nouns and their associated genders, ensuring grammatical harmony. | 2 | | `30` | Subjunctive Mood | Subjunctive mood misuse | Identifies the incorrect usage of the subjunctive mood in sentences, ensuring proper expression of hypothetical or unreal situations. | 2 | | `31` | Compound Word Error | Compound word usage error | Identifies incorrect compound word usage. | 2 | | `32` | Mood Inconsistency | Inconsistency in mood detected | Detects inconsistencies in the expression of mood within a sentence, ensuring cohesive writing. | 2 | | `33` | Accent Error | Incorrect or missing usage of accents | Highlights deviations in accents, promoting uniform language usage. | 4 | | `34` | Homoglyph Error | Homoglyphs detected in text | Non-standard characters that appear identical or very similar but have a different meaning have been detected. | 2 | ## Next Steps [Section titled “Next Steps”](#next-steps) [Assess Grammar & Writing Quality ](/guides/writing/check-grammar/)Learn how to use the Writing Assistant API to detect and correct writing issues. [Writing Assistant API Reference ](/reference/actions/writing-assistant/check/)Explore the complete API reference for writing assistant, including request and response details. --- # Authenticity > Explore the data types related to authenticity, including plagiarism, AI detection, and webhooks. Authenticity This section provides detailed information about the data types related to authenticity. [Private Cloud Hub ](/reference/data-types/authenticity/private-cloud-hub/overview)Explore the data types related to the Private Cloud Hub. [Results ](/reference/data-types/authenticity/results/overview)Detailed information about the results you can get from a scan. [Webhooks ](/reference/data-types/authenticity/webhooks/overview)Detailed information about the webhooks you can subscribe to for asynchronous event notifications. [Scanned Document ](/reference/data-types/authenticity/scanned-document)Provides metadata and information about a scan that has been submitted to the Copyleaks API. [Result Tags ](/reference/data-types/authenticity/result-tags)Tags used in scan results [Scan Alerts ](/reference/data-types/authenticity/scan-alerts)All available alert type codes [Technical Specifications ](/reference/data-types/authenticity/technical-specifications)API limits, requirements, and constraints --- # Masking Policy > Data masking and privacy controls Private Cloud Hub Copyleaks Private Cloud Hub allows the user to choose how to share data in Private Cloud Hubs between its users. The Masking Policy determines how data will be shown to users when a document from the Private Cloud Hub is matched against in a scan. ## Available Values [Section titled “Available Values”](#available-values) | ID | Masking Level | Description | | ----- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **0** | **No Masking** | Users will be able to see the entire document. | | **1** | **Mask Other User Documents** | If the user who initiated the scan is also the contributor of the document to the Private Cloud Hub - No masking will be applied. Otherwise, all document characters and words that do not match identically will be replaced and masked with a sequence of hashtags. | | **2** | **Mask All Documents** | All document characters that do not match identically will be replaced with a sequence of hashtags. | ## Next Steps [Section titled “Next Steps”](#next-steps) [Private Cloud Hub Roles ](/reference/data-types/authenticity/private-cloud-hub/roles/)Understand user roles and permissions within the Private Cloud Hub. [Private Cloud Hub Status ](/reference/data-types/authenticity/private-cloud-hub/status/)Check the status of your Private Cloud Hub, including storage capacity and usage. [Compare Multiple Documents ](/concepts/features/data-hubs/)Learn how to compare documents within your Private Cloud Hub and against other sources. --- # Private Cloud Hub > Explore the data types related to the Private Cloud Hub. This section provides detailed information about the data types related to the Private Cloud Hub. [Masking Policy ](/reference/data-types/authenticity/private-cloud-hub/masking-policy)Data masking and privacy controls. [Roles ](/reference/data-types/authenticity/private-cloud-hub/roles)User roles and permissions. [Status ](/reference/data-types/authenticity/private-cloud-hub/status)Private Cloud Hub status codes and meanings. --- # Roles > User roles and permissions Private Cloud Hub Private Cloud Hub provides a set of roles to control user access to your Hub. This is handy when having multiple users working with the same Private Cloud Hub. ## Available Roles [Section titled “Available Roles”](#available-roles) | ID | Role | Permissions | | ----- | --------------- | --------------------------------------------------------------------------------------------------------------------------- | | **1** | **Viewer** | - Access partial info of the repository metadata - Scan against the repository documents | | **2** | **Contributor** | - Full “Viewer” permissions - Insert new documents to the repository - Delete their submitted documents from the repository | | **3** | **Admin** | - Full “Contributor” permissions - Invite other users to use the repository - Delete documents from the repository | | **4** | **Super Admin** | - Full “Admin” permissions - Delete all documents, including the entire repository - Control and view billing information | ## Next Steps [Section titled “Next Steps”](#next-steps) [Private Cloud Hub Status ](/reference/data-types/authenticity/private-cloud-hub/status/)Check the status of your Private Cloud Hub, including storage capacity and usage. [Masking Policy ](/reference/data-types/authenticity/private-cloud-hub/masking-policy/)Learn about configuring masking policies for sensitive data within your Private Cloud Hub. [Compare Multiple Documents ](/concepts/features/data-hubs/)Understand how to compare documents within your Private Cloud Hub and against other sources. --- # Status > Private Cloud Hub status codes and meanings Private Cloud Hub Each Private Cloud Hub maintains a status that can be used to know its state. This value can be used to identify issues with your Copyleaks Private Cloud Hubs. ## Available Values [Section titled “Available Values”](#available-values) | ID | Status | Description | | ----- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | | **0** | **Running** | Private Cloud Hub is healthy. | | **1** | **Pending For Deletion** | Private Cloud Hub is pending for deletion with all its documents and metadata. Private Cloud Hub is not available for use. | | **2** | **Error** | Private Cloud Hub is not healthy. It’s recommended to contact [Copyleaks Support](https://api.copyleaks.com/support/contactus) for help. | | **3** | **Updating** | Maintenance processes are taking place. The Private Cloud Hub may not be available. | | **4** | **Payment Required** | Private Cloud Hub is suspended because of missing or failed payment. | ## Next Steps [Section titled “Next Steps”](#next-steps) [Private Cloud Hub Roles ](/reference/data-types/authenticity/private-cloud-hub/roles/)Understand user roles and permissions within the Private Cloud Hub. [Masking Policy ](/reference/data-types/authenticity/private-cloud-hub/masking-policy/)Learn about configuring masking policies for sensitive data within your Private Cloud Hub. [Compare Multiple Documents ](/concepts/features/data-hubs/)Understand how to compare documents within your Private Cloud Hub and against other sources. --- # Result Tags > Tags used in scan results Authenticity When scanning with Copyleaks, each result in your returned [Completion Webhook](/reference/data-types/authenticity/webhooks/scan-completed) may include one or more result tags. These tags provide additional context or metadata about the scan results. Below you can find a full list of possible tags. ### Tag Types [Section titled “Tag Types”](#tag-types) Each tag is accompanied by a unique code, a title, and a description. Note that the title and description of these tags may be subject to change over time. Note The title and description of the tags may change. | Code | Title | Description | | ---------------------- | ------------------------ | ------------------------------------------------------ | | cross-language | Cross Language | Suspected cross-lingual plagiarism detected | | code-license | License: \[Code License] | The file is licensed under \[Code License] license. | | suspected-ai-generated | Suspected AI-Generated | This result is suspected to contain AI-generated text. | | ai-source-match | AI Source Match | This result is suspected to contain AI-generated text. | ## Next Steps [Section titled “Next Steps”](#next-steps) [Completed Webhook ](/reference/data-types/authenticity/webhooks/scan-completed)Learn more about the completed webhook and the information it provides. [AI Text Detection ](/guides/ai-detector/ai-text-detection/)Understand how AI-generated content is detected and tagged in scan results. [Cross-Language Plagiarism ](/reference/actions/miscellaneous/supported-cross-languages/)Explore how cross-language plagiarism is identified and tagged. --- # AI Detection > A snapshot of AI Detection results detected by Copyleaks. It provides the data from the matched results. Results modelVersion string The version of the AI Content Detection used. Example: `v5` result array\[object] An array of all the classifications. The sections contain their position, classification and the probability for that classification. classification integer Indicates the text classification. **Available Options:** `1` - Human `2` - AI Generated Text probability number\ deprecated The classification confidence. Caution We plan to remove this value by July 2026. matches array\[object] Provides information about the match objects that have been found in the text. text object Describes the text positions for the result (textual version). chars object Positions of the characters in that sepcific result. starts array\[integer] Character match start positions. lengths array\[integer] Character match lengths. words object Positions of the words in that sepcific result. starts array\[integer] Words match start positions. length array\[integer] Words match lengths. html object Describes the text positions for the result (html version). Default: `null` chars object Positions of the characters in that sepcific result. starts array\[integer] Character match start positions. length array\[integer] Character match lengths. groupIds array\[integer] Group identifiers associated with each word. words object Positions of the words in that sepcific result. starts array\[integer] Words match start positions. length array\[integer] Words match lengths. groupIds array\[integer] Group identifiers associated with each word. summary object Aggregated detection results. human number\ Indicates the confidence in which this text was written by a human. ai number\ Indicates the confidence in which this text was written by AI. explain object beta Example: `{}` patterns object statistics object aiCount array\[number] The number of occurrences of AI-generated text patterns per 1 million texts. humanCount array\[number] The number of occurrences of human-written text patterns per 1 million texts. text object chars object starts array\[number] Start positions of character matches. lengths array\[number] Lengths of the character matches. words object starts array\[number] Start positions of word matches. lengths array\[number] Lengths of the word matches. ## Example [Section titled “Example”](#example) ```json { "modelVersion": "v5", "results": [ { "classification": 2, "probability": 1, "matches": [ { "text": { "chars": { "starts": [ 0 ], "lengths": [ 1509 ] }, "words": { "starts": [ 0 ], "lengths": [ 221 ] } } } ] } ], "summary": { "human": 0, "ai": 1 }, "explain": { "patterns": { "statistics": { "aiCount": [ 15.9636, 39.5495, 84.7079, 119.8710, 9.9233, 185.6670, 14.4536, 19.1995 ], "humanCount": [ 0.8076, 1.5076, 3.8228, 8.5071, 0.3769, 4.2536, 0.3231, 1.1845 ] }, "text": { "chars": { "starts": [31, 55, 303, 909, 961, 987, 1129, 1775], "lengths": [23, 32, 23, 33, 25, 30, 30, 19] }, "words": { "starts": [5, 9, 45, 135, 144, 148, 169, 257], "lengths": [4, 6, 3, 6, 4, 5, 5, 3] } } } } } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Detect AI-Generated Text ](/guides/ai-detector/ai-text-detection/)Learn how to use the AI Detection API to check if content was written by a human or generated by an AI. [AI Logic ](/concepts/features/ai-logic/)Understand how AI logic can help you interpret the results of AI text detection. [Export Method ](/reference/actions/downloads/export/)Learn how to export scan results, including AI detection data. --- # AI Overview > Copyleaks’ Gen AI thoroughly analyzes each scan, summarizing content, identifying central themes, pinpointing key insights, and leveraging historical data to provide a richer, context-driven perspective. Results Copyleaks’ Gen AI thoroughly analyzes each scan, summarizing content, identifying central themes, pinpointing key insights, and leveraging historical data to provide a richer, context-driven perspective. overview string A markdown-formatted string containing the Gen-AI overview of the scan. modelVersion string The version of the model used for the Overview generation. ## Example [Section titled “Example”](#example) ```json { "overview": "### Historical Author Data:\n- Four scans analyzed with an average plagiarism similarity of 13.18%\n- 4 instances of AI-generated content detected\n\n### Current Plagiarism Detection:\n- 0% overall plagiarism\n- Main sources: \n - yard.com (3.0%, 74 words)\n - brainly.com (3.2%, 45 words)\n - llcattorney.com (1.3%, 29 words)\n - montrosedemocrats.org (3.0%, 12 words)\n\n### AI Content Detection:\n- 100% AI-written content detected\n\n### Writing Assistant:\n- 100% writing quality with no errors in grammar, sentence structure, word choice, and mechanics.", "modelVersion": "v1" } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [GenAI Scan Overview ](/concepts/features/gen-ai-scan-overview/)Learn more about the GenAI Scan feature and its capabilities. [AI Logic ](/concepts/features/ai-logic/)Understand how AI logic can help you interpret the results of AI text detection. [Export Method ](/reference/actions/downloads/export/)Learn how to export scan results, including the AI Overview. --- # Crawled Version > A snapshot of the submitted document. It shows how Copyleaks viewed your submitted file. Results A snapshot of the submitted document. It shows how Copyleaks viewed your submitted file. ## Webhook HTTP verb [Section titled “Webhook HTTP verb”](#webhook-http-verb) The HTTP verb for this webhook is upon developer request. You need to specify your verb while executing the [Export method](/reference/actions/downloads/export) See `crawledVersion.verb` field. Tip We recommend you use the HTTP verb `PUT`. It will allow Copyleaks to override an existing file as needed. The crawled version is available in textual format, and if the `properties.includeHtml` field (in the `submit` method) is set to `true`, it is also in HTML format. metadata object words integer Number of words in the text. excluded integer Number of excluded words in the text. text object value string The crawled version of the submitted text. exclude object starts array The start position of the section to exclude. lengths array The length, in characters, of the section to exclude. reasons array The reason why this section was excluded. pages object startPosition array A list of pages start positions of the text. ## Example [Section titled “Example”](#example) ```json { "metadata": { "words": 30, "excluded": 2 }, "html": { "value": "

Example Domain

This domain is established to be used for illustrative examples in documents.", "exclude": { "starts": [ 16 ], "lengths": [ 14 ], "reasons": [ 3 ], "groupIds": [ 1 ] } }, "text": { "value": "Example Domain This domain is established to be used for illustrative examples in documents.", "exclude": { "starts": [ 0 ], "lengths": [ 14 ], "reasons": [ 3 ] }, "pages": { "startPosition": [ 0 ] } } } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Export Method ](/reference/actions/downloads/export/)Learn how to use the export method to retrieve detailed scan results. [How to Display Scan Reports ](/concepts/features/how-to-display/)Understand how to present crawled versions and other scan data to your users. --- # New Plagiarism Result > A snapshot of specific results detected by Copyleaks. It provides the data from the matched results. Results A snapshot of specific results detected by Copyleaks. It provides the data from the matched results. ## Webhook HTTP verb [Section titled “Webhook HTTP verb”](#webhook-http-verb) The HTTP verb for this webhook is upon developer request. You need to specify your verb while executing the [Export method](/reference/actions/downloads/export) See `results.verb` field. Tip We recommend you use the HTTP verb `PUT`. It will allow Copyleaks to override an existing file as needed. statistics object identical integer Number of exact words in the text. minorChanges integer Number of nearly identical words with small differences like slow becomes slowly. relatedMeaning integer Number of paraphrased words stating similar ideas with different words. text object value string The text of the specific result that was found to contain similar content to the submitted text. pages object startPosition array A list of pages’ start positions of the text, the first startPosition is the start position of the first page. ## Example [Section titled “Example”](#example) ```json { "statistics": { "identical": 0, "minorChanges": 0, "relatedMeaning": 0 }, "text": { "value": "Hello world!", "pages": { "startPosition": [ 0 ] }, "comparison": { "identical": { "source": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } }, "suspected": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } } }, "minorChanges": { "source": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } }, "suspected": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } } }, "relatedMeaning": { "source": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } }, "suspected": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } } } } }, "html": { "value": "

Hello world!

", "comparison": { "identical": { "groupId": [ 0 ], "source": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } }, "suspected": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } } }, "minorChanges": { "groupId": [ 0 ], "source": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } }, "suspected": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } } }, "relatedMeaning": { "groupId": [ 0 ], "source": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } }, "suspected": { "chars": { "starts": [ 0 ], "lengths": [ 1 ] }, "words": { "starts": [ 0 ], "lengths": [ 1 ] } } } } } } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Export Method ](/reference/actions/downloads/export/)Learn how to use the export method to retrieve detailed scan results. [How to Display Scan Reports ](/concepts/features/how-to-display/)Understand how to present plagiarism results to your users effectively. --- # New Result > A new result was found during the scan process. Results The new results webhook is triggered when a new plagiarism result is found during the scan process. **When you receive this webhook, the scan is still in progress.** score number The current score of the scan up to this point. developerPayload string The developer payload that was provided in the submit method. internet object id string Unique result ID to identify the result. title string Document title. Mostly extracted from the document content. introduction string Document brief introduction. Mostly extracted from the document content. matchedWords integer Unsigned Integer Total matched words between this result and the scanned document. url string\ Public URL of the resource. metadata object tags array\[object] database object id integer Unique result ID to identify this result. title string Document title. Mostly extracted from the document content. introduction string Document brief introduction. Mostly extracted from the document content. matchedWords integer Unsigned Integer Total matched words between this result and the scanned document. scanId string In case a result was found in the Copyleaks internal database, and was submitted by you, this will show the scan id of the specific result. Otherwise, this field will remain empty. metadata object finalUrl string\ Final result url after all http redirects. canonicalUrl string\ Extracted canonical url from the result. publishDate string\ Publication date of the result. creationDate string\ Creation date of the result. lastModificationDate string\ Last modification date of the result. author string Result author. organization string Result organization. filename string Result filename. tags array\[object] code string Unique ID that signifies the type of result tag. title string A simple name for this tag. description string Short text describing this tag. batch object id string Unique result ID to identify this result. title string Document title. Mostly extracted from the document content. introduction string Document brief introduction. Mostly extracted from the document content. matchedWords integer Unsigned Integer Total matched words between this result and the scanned document. scanId string The batch id that is unique for all scans in this batch. metadata object finalUrl string\ Final result url after all http redirects. canonicalUrl string\ Extracted canonical url from the result. publishDate string\ Publication date of the result. creationDate string\ Creation date of the result. lastModificationDate string\ Last modification date of the result. author string Result author. organization string Result organization. filename string Result filename. tags array\[object] code string Unique ID that signifies the type of result tag. title string A simple name for this tag. description string Short text describing this tag. repositories object id string Unique result ID to identify this result. title string Document title. Mostly extracted from the document content. introduction string Document brief introduction. Mostly extracted from the document content. matchedWords integer Unsigned Integer Total matched words between this result and the scanned document. repositoryId string The repository Id that has the result. scanId string The scanId of the matched results in the repository. metadata object finalUrl string\ Final result url after all http redirects. canonicalUrl string\ Extracted canonical url from the result. publishDate string\ Publication date of the result. creationDate string\ Creation date of the result. lastModificationDate string\ Last modification date of the result. author string Result author. organization string Result organization. filename string Result filename. submittedBy string Email of the user which added this document to the repository. tags array\[object] code string Unique ID that signifies the type of result tag. title string A simple name for this tag. description string Short text describing this tag. ## Example [Section titled “Example”](#example) ```json { "score": 0, "developerPayload": "string", "internet": [ { "id": "string", "title": "string", "introduction": "string", "matchedWords": 0, "url": "string", "metadata": { "finalUrl": "string", "canonicalUrl": "string", "author": "string", "organization": "string", "filename": "string", "publishDate": "string", "creationDate": "string", "lastModificationDate": "string" } } ], "database": [ { "id": "string", "title": "string", "introduction": "string", "matchedWords": 0, "scanId": "string", "metadata": { "finalUrl": "string", "canonicalUrl": "string", "author": "string", "organization": "string", "filename": "string", "publishDate": "string", "creationDate": "string", "lastModificationDate": "string" } } ], "batch": [ { "id": "string", "title": "string", "introduction": "string", "matchedWords": 0, "scanId": "string", "metadata": { "finalUrl": "string", "canonicalUrl": "string", "author": "string", "organization": "string", "filename": "string", "publishDate": "string", "creationDate": "string", "lastModificationDate": "string" } } ], "repositories": [ { "id": "string", "title": "string", "introduction": "string", "matchedWords": 0, "repositoryId": "string", "scanId": "string", "metadata": { "finalUrl": "string", "canonicalUrl": "string", "author": "string", "organization": "string", "filename": "string", "publishDate": "string", "creationDate": "string", "lastModificationDate": "string", "submittedBy": "string" } } ] } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn about the different types of webhooks and how to handle them. [Export Method ](/reference/actions/downloads/export/)Learn how to export scan results, including new plagiarism results. [How to Display Scan Reports ](/concepts/features/how-to-display/)Understand how to present new results to your users effectively. --- # Results Data Types > Explore the various data structures for scan results, including plagiarism, AI detection, and writing feedback. This section provides detailed information about the different types of results you can receive from a Copyleaks scan. Each result type has a specific data structure, which is detailed in the pages below. [AI Detection ](/reference/data-types/authenticity/results/ai-detection)A snapshot of AI Detection results, providing data from the matched results. [AI Overview ](/reference/data-types/authenticity/results/ai-overview)A summary of the scan's findings, generated by our AI. [Crawled Version ](/reference/data-types/authenticity/results/crawled-version)A snapshot of the submitted document as viewed by Copyleaks. [New Plagiarism Result ](/reference/data-types/authenticity/results/new-plagiarism-result)A snapshot of specific plagiarism results detected by Copyleaks. [Writing Assistant ](/reference/data-types/authenticity/results/writing-assistant)A snapshot of writing feedback and corrections. --- # Writing Assistant > A snapshot of Writing Assistant results detected by Copyleaks. It provides the data from the matched results. A snapshot of Writing Assistant results detected by Copyleaks. It provides the data from the matched results. scanType string The type of the scan. ## Example [Section titled “Example”](#example) ```json { "scanType": "sandbox", "corrections": { "text": { "chars": { "types": [ 4, 14 ], "starts": [ 3, 11 ], "lengths": [ 5, 5 ], "operationTexts": [ "loves ", "dance." ] } } } } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Assess Grammar & Writing Quality ](/guides/writing/check-grammar/)Learn how to use the Writing Assistant API to detect and correct writing issues. [Correction Types ](/reference/data-types/authenticity/correction-types/)See a detailed list of all supported correction types and languages. [Export Method ](/reference/actions/downloads/export/)Learn how to export scan results, including writing assistant data. --- # Scan Alerts > All available alert type codes Authenticity When submitting documents, you may receive various types of alerts. These alerts provide important information about your scan results and any issues that occurred during processing. As an API user, you can use these alerts to improve the user experience by supporting more detection features and handling cases of failure. Alerts are triggered for different scenarios, including: * Features that failed to execute * Text manipulation attempts and suspicious behavior * Private Cloud Hub issues Scan alerts are found in the [scan completion webhook](/reference/data-types/authenticity/webhooks/scan-completed) at: ```plaintext notifications.alerts[] ``` Note Alert titles and messages may change over time as we improve our system. Each alert includes a specific code, category, and detailed message to help you understand what occurred. ## Categories [Section titled “Categories”](#categories) | id | Category | | -- | ------------------ | | 1 | General | | 2 | AiContentDetection | | 3 | CheatingDetection | | 4 | WritingAssistant | | 5 | CrossLanguage | | 6 | InternalDatabase | | 7 | Repository | | 8 | ExcludeTemplate | | 9 | PdfReport | ## Alerts [Section titled “Alerts”](#alerts) | Code | Title | Message | Category | Additional Data | | ----------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------- | | suspected-ai-text | Suspected Cheating: AI Text Detected | We are unable to verify that the text was written by a human. | 2 | [AI Content Detection Response](/reference/data-types/authenticity/results/ai-detection) | | ai-detection-failed | AI Detection Failed | We were unable to validate that there was no AI text in the submitted document due to an internal error. | 2 | | | file-type-not-supported | AI Detection Not Executed: File Type not Supported | The submitted file type is currently not supported for AI detection. | 2 | | | ai-detection-lang-not-supported | AI Detection Not Executed: Language not Supported | The submitted language is currently not supported for AI detection. | 2 | | | ai-detection-text-too-short | AI Detection Not Executed: Text too Short | The submitted text is too short for AI content detection. | 2 | | | ai-insights-lang-unsupported | AI Insights: Unsupported Language | The submitted language is currently not supported for AI Insights. | 2 | | | ai-logic-source-code-unsupported | AI Logic: Source Code Unsupported | AI Logic does not support source code files. | 2 | | | suspected-cheating-detected | Advanced Detection: Hidden Characters | We have detected the possible use of hidden characters to cheat the plagiarism scan. | 3 | | | suspected-character-replacement | Advanced Detection: Character Replacement | We have detected possible use of special characters to cheat the plagiarism scan. | 3 | | | suspected-white-text | Suspected Cheating: Invisible Text | We have detected a possible use of invisible text, switch to the textual version of the document to see all text. | 3 | | | text-mostly-excluded | Advanced Detection: Major Text Exclusion | We have detected a possible cheating attempt to exclude the majority of text. | 3 | | | cheat-detection-failed | Advanced Detection Failed | We were unable to validate that there was no cheating in the submitted document. | 3 | | | writing-feedback-failed | Writing Assistant Failed | We were unable to produce a Writing Assistant report. | 4 | | | writing-feedback-lang-not-supported | Writing Assistant Not Executed: Language not Supported | The submitted language is currently not supported for Writing Assistant. | 4 | | | cross-language-same-as-doc-lang | Cross Language: Same Document Language | Submitted language and cross-language text are the same language. No credits were used. | 5 | | | cross-language-unsupported-doc-lang | Cross Language: Unsupported Document Language | Your submitted document language is not supported for cross-language plagiarism detection. Cross language feature has been disabled for this scan. | 5 | | | internal-db-forbidden-for-team | Shared Data Hub Team Policy Violation | Your organization does not allow scanning files against Copyleaks Shared Data Hub, this scan was not added or scanned against the Copyleaks Shared Data Hub. If you still wish to use the Shared Data Hub please contact your organization admin. | 6 | | | unable-to-index | Add to Database Failed | We were unable to add your file to the database due to an internal error. | 6 | | | repository-index-failed | Not Able to Index Against Repository | You do not have permission to index against `{RepositoryName}` or the repository does not exist. | 7 | | | repository-scan-failed | Not Able to Scan Against Repository | You do not have permission to scan against `{RepositoryName}`. | 7 | | | repository-full | This Private Cloud Hub is Full | Indexing to private cloud hub `{RepositoryName}` failed because the private cloud hub storage capacity has been reached. | 7 | | | document-template-not-found | Document Template Not Found | We were unable to find the following exclusion document template:`{ScanIds}`. | 8 | | | pdf-generation-failed | Unable to Generate PDF Report | The PDF report was not able to be generated. | 9 | | ## Next Steps [Section titled “Next Steps”](#next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn how to receive and process notifications from Copyleaks, including scan alerts. [Technical Specifications ](/reference/data-types/authenticity/technical-specifications/)Review API limits and other technical details that might impact scan alerts. [Text Manipulation Detection ](/concepts/features/text-manipulation/)Understand how to detect and handle various text manipulation attempts. [AI Text Detection ](/guides/ai-detector/ai-text-detection/)Learn more about detecting AI-generated text and related alerts. --- # Scanned Document > Detailed reference for the Scanned Document object, which contains metadata about a submitted scan. Authenticity The `scannedDocument` object provides metadata and information about a scan that has been submitted to the Copyleaks API. scanId string The unique identifier for the scan that you provided during submission. totalWords integer The total number of words detected in the submitted content. totalExcluded integer The total number of words that were excluded from the scan based on your `exclude` settings. credits integer The number of credits consumed by the scan. This will be `0` until the scan is completed. expectedCredits integer The number of credits that are expected to be consumed by the scan upon completion. creationTime string The Coordinated Universal Time (UTC) timestamp indicating when the scan was created. Format: `YYYY-MM-DDTHH:mm:ss.sssssssZ` metadata object An object containing metadata about the submitted file. For example, it can contain the `filename`. enabled object An object indicating which scan features were enabled for this scan. plagiarismDetection boolean Indicates if plagiarism detection was enabled. aiDetection boolean Indicates if AI-generated text detection was enabled. explainableAi boolean Indicates if the AI Logic (explainable AI) feature was enabled. writingFeedback boolean Indicates if the Writing Assistant feature was enabled. pdfReport boolean Indicates if the generation of a PDF report was enabled. cheatDetection boolean Indicates if cheat detection was enabled. aiSourceMatch boolean Indicates if AI source matching was enabled. detectedLanguage string The language code (ISO 639-1) of the language detected in the submitted content. --- # Technical Specifications > API limits, requirements, and constraints Authenticity This page describes the technical specifications of the Copyleaks API. ## Page Definition [Section titled “Page Definition”](#page-definition) A page is defined as up to **250 words**. This means that every 250 words (or portion thereof) in your document counts as one page for billing purposes. How Page Counting Works: * 1-250 words = 1 page * 251-500 words = 2 pages * 501-750 words = 3 pages * etc. ## Input Limits [Section titled “Input Limits”](#input-limits) ### Supported File Types [Section titled “Supported File Types”](#supported-file-types) | Type | File Types List | | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | Textual: | `html`, `htm`, `txt`, `csv`, `rtf`, `xml`, `md` | | Non-Textual: | `pdf`, `docx`, `doc`, `pptx`, `ppt`, `odt`, `chm`, `epub`, `odp`, `ppsx`, `pages`, `xlsx`, `xls`, `LaTeX` | | Source code: | `ts`, `py`, `go`, `cs`, `c`, `h`, `idc`, `cpp`, `hpp`, `c++`, `h++`, `cc`, `hh`, `java`, `js`, `swift`, `rb`, `pl`, `php`, `sh`, `m`, `scala`, `css` | Note You can access this list programmatically, for more info [click here](/reference/actions/miscellaneous/supported-file-types). ### Supported Textual File Types [Section titled “Supported Textual File Types”](#supported-textual-file-types) The supported online format are all supported file types are also supported when online. Submitted by URL. ### Supported Image Types (OCR) [Section titled “Supported Image Types (OCR)”](#supported-image-types-ocr) The supported image files are `pdf, docx, gif, png, bmp, jpg and jpeg` . The files must contain textual content. Upload only. Note You can access this list programmatically, for more info [click here](/reference/actions/miscellaneous/ocr-supported-languages). ### Supported Plagiarism Languages [Section titled “Supported Plagiarism Languages”](#supported-plagiarism-languages) | Setting | Description | | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Supported Languages** | All languages supported by Unicode, including English, Spanish, French, Portuguese, Arabic, Russian, German, Greek, Chinese, Japanese, and more. [More info](https://unicode.org/standard/supported.html). | | **Supported OCR Languages** | See full list [here](/reference/actions/miscellaneous/ocr-supported-languages). | | **Supported Cross Languages** | See full list [here](/reference/actions/miscellaneous/supported-cross-languages). | | **Maximum Document Length** | The maximum length allowed is **2000 pages** (500K words). | ### File Size [Section titled “File Size”](#file-size) | Description | Max Upload File Size | | ----------------------------------------------- | -------------------- | | HTML files (`html`, `htm`, …) | 5 MB | | Text files (`txt`, `csv`) and source-code | 3 MB | | Non-Textual Documents (`pdf`, `doc`, `docx`, …) | 50 MB | | Image Types (`jpg`, `png`, `bmp`, …) | 25 MB | ## Rate Limit [Section titled “Rate Limit”](#rate-limit) An account by default has a rate of 10 requests per second. If you still need higher rates, feel free to [contact us](https://help.copyleaks.com/s/contactsupport). Warning Rate Limit Exceeded, If your host has reached its API limit, you will receive the HTTP error 429 (Too Many Requests) and you will be unable to authenticate with the Copyleaks API for 5 minutes. ## Maintenance Periods [Section titled “Maintenance Periods”](#maintenance-periods) When our servers are under maintenance you will receive a `503` HTTP status code. Please wait a full minute and try again. For more information about the service status -[ Copyleaks System Status](https://status.copyleaks.com). ## Time [Section titled “Time”](#time) | Setting | Value | | -------------------------------- | --------------------- | | **Time Format** | `dd/MM/yyyy HH:mm:ss` | | **Time Zone** | UTC | | **Default HTTP Request Timeout** | 110 seconds | ## Scan Expiration [Section titled “Scan Expiration”](#scan-expiration) Your created scans using the [/v3/submit](/reference/actions/scans/submit-file) endpoints will be stored in Copyleaks servers for a specific duration of time. You can control the expiration of your scans in your submit request. Make sure you save your data before it expires: | Type | hours | | ------------------ | ----- | | Max Expiration | 2880 | | Default Expiration | 2880 | --- # Credits Checked > Copyleaks inspected the submitted file and provides a cost for the scan. Webhooks Copyleaks supports a price check operation. In some cases, you won’t know the exact length of your document, so using the price check will be helpful to understand how many credits are necessary. Copyleaks allows you to send your document and receive back the amount of credits that the system will require to complete a scan **(1 credit = 250 words)**. To proceed with scanning the document after checking the credits needed, you should call the Start method. Note Scans that are not triggered by calling the Start method within 48 hours will be deleted and will no longer be available. status integer The current status of the scan. Possible values: 0 (Success), 1 (Error), 2 (CreditsChecked), 3 (Indexed) developerPayload string The developer payload that was provided in the submit method. `<= 512` characters credits integer The price of the scan. If you will continue scanning, this is the price you will pay. scannedDocument object General information about the scanned document. scanId string The unique scan id provided by you. totalWords integer Unsigned Integer Total number of words found in the scanned text. totalExcluded integer Unsigned Integer Number of excluded words in the submitted content. credits integer Overall credits used for the scan. creationTime string\ The creation time of the scan. Timezone: UTC+0 metadata object finalUrl string\ The submitted url after all http redirects. canonicalUrl string\ Extracted canonical url from the scanned document. publishDate string\ Publication date of the scanned document. creationDate string\ Creation date of the scanned document. lastModificationDate string\ Last modification date of the scanned document. author string Scanned document author. organization string Scanned document organization. filename string Scanned document filename. ## Example [Section titled “Example”](#example) ```json { "status": 2, "developerPayload": "Custom developer payload", "credits": 1 } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Start a Scan ](/reference/actions/scans/start/)Learn how to initiate a scan after checking the credit cost. [Manage Your Credits ](/concepts/management/manage-your-credits/)Explore strategies for managing your Copyleaks credits effectively. [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn about the different types of webhooks and how to handle them. --- # Error > The scan ended with an error. Webhooks The `error` event happens as soon as the scan process reaches an end due to an error. status integer The current status of the scan. Possible values: 0 (Success), 1 (Error), 2 (CreditsChecked), 3 (Indexed) error array code integer Error code that represents the reason for failure. See below the full error table. message string Error message that represents the reason for failure. developerPayload string The developer payload that was provided in the submit method. `<= 512` characters Copyleaks provides you with the specific error message describing the reason for the error. Some of the failures are related to incorrect configuration on your side. Others are related to Copyleaks server-side errors. The full error list is provided here: | **Error Code** | **Error Message** | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 1 | Bad request. One or several required parameters are missing or incorrect. | | 2 | Invalid login credentials. | | 3 | To use your account, you need to confirm the email address. | | 4 | This user is disabled. Contact support for help. | | 5 | Failed to download the requested URL. | | 6 | Cannot complete the scan request because the file is too large. For more information: | | 7 | Failed reading the submitted text. | | 8 | The image quality is too low to scan. | | 9 | Temporarily unavailable. Please try again later. | | 10 | This file type is not supported. Read more - [link](http://bit.ly/2fqJOqP) | | 11 | Not enough text to scan. The minimum text length is 30 characters and at least 6 words. | | 12 | This document is too long (The maximum number of pages allowed is ``, while this document contains `` pages). | | 13 | You don’t have enough credits to complete the request (required `` credits)! | | 14 | The submitted file is invalid. | | 15 | The submitted URL is invalid! | | 16 | The server encountered an internal error or misconfiguration and was unable to complete your request. We are investigating the problem. Ticket ID `<00000000-0000-0000-0000-000000000000>`. | | 17 | You have no credits. You need to purchase credits in order to complete the request. | | 18 | Copyshield widget is not showing on your webpage. | | 19 | ’`*`’ headers are too long (limited to `` characters together)! | | 20 | Only MIME multipart content type is allowed! | | 21 | You can upload one file at a time! | | 22 | Unable to determine file size. | | 24 | Bad filename! | | 25 | Undefined language! | | 26 | The request cannot be completed because the process is still running. | | 27 | Unknown process id! | | 30 | Missing ‘``’ header value! | | 31 | Bad parameter ‘``’! | | 32 | Too many failed login attempts. Please try again in `` hours. | | 33 | Http header ‘``’ key is too long (max length is `` characters)! | | 37 | Authorization has been denied for this request. | | 38 | Order has already been activated. | | 39 | Unsupported method. | | 40 | Institution subscription has expired. | | 41 | The submitted file is password protected. | We are doing our best to successfully respond to all of your requests. Still, sometimes we encounter an internal error. In that case, we will fix the problem as soon as possible. You will also get a unique ticket ID that will help identify the problem when contacting Copyleaks customer support. | **Error Code** | **Error Message** | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 16 | The server encountered an internal error or misconfiguration and was unable to complete your request. We are investigating the problem. Ticket ID `<00000000-0000-0000-0000-000000000000>`. | *** status integer The current status of the scan. Possible values: 0 (Success), 1 (Error), 2 (CreditsChecked), 3 (Indexed) developerPayload string The developer payload that was provided in the submit method. ## Example [Section titled “Example”](#example) ```json { "status": 1, "error": { "message": "You don't have enough credits to complete the request (required 10 credits)!", "code": "13" }, "developerPayload": "Custom developer payload" } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn about the different types of webhooks and how to handle them. [Handling Failures ](/concepts/performance/handling-failures/)Understand how to implement an exponential backoff strategy for retrying requests. [Scan Alerts ](/reference/data-types/authenticity/scan-alerts/)Explore the full list of scan alerts and their meanings. --- # Export Completed > The export request is done. Webhooks Once the export request is done, a completion webhook is fired. When the webhook reaches your servers, please verify that all the requested data was copied correctly. To check that the commands finished successfully, check: 1. The `completed` flag should be equal to `true`. 2. Each `task.isHealthy` should be equal to `true`. 3. Each `task.httpStatusCode` should be equal to `2xx` (200, 204, …). completed boolean This flag gives an indication of whether the scan was completed without internal errors on the Copyleaks side. Possible values: true (Completed successfully), false (Error) developerPayload string The developer payload that was provided in the submit method. tasks array\[object] A List of completed tasks. endpoint string\ The endpoint address of the export task. isHealthy boolean This flag gives an indication whether the scan was completed without internal errors on the Copyleaks side. httpStatusCode integer The status code reported by the customer servers. If the `tasks.isHealthy` is equal to false - this field will be null. ## Example [Section titled “Example”](#example) ```json { "completed": true, "developerPayload": "This is my payload", "tasks": [ { "endpoint": "https://yourserver.com/export/export-id/results/my-result-id", "httpStatusCode": 200, "isHealthy": true }, { "endpoint": "https://yourserver.com/export/export-id/pdf-report", "httpStatusCode": 200, "isHealthy": true }, { "endpoint": "https://yourserver.com/export/export-id/crawled-version", "httpStatusCode": 200, "isHealthy": true } ] } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Export Method ](/reference/actions/downloads/export/)Learn how to initiate export requests for various scan artifacts. [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Understand the different types of webhooks and how to handle them. [How to Display Scan Reports ](/concepts/features/how-to-display/)Learn how to present exported scan data to your users. --- # Indexed > Copyleaks indexed the submitted file in its Shared Data Hub or repository. Webhooks Copyleaks allows users to upload and index their existing documents into the Copyleaks Shared Data Hub without performing a scan. This feature enables future submissions to be compared against these stored documents for enhanced plagiarism detection. To activate the indexing mode, submit your content with the `properties.action=2` parameter. Indexing documents to the Copyleaks Shared Data Hub is free of charge. Once the document is processed, a webhook will notify you of the indexing status: * **Success:** A webhook will confirm that your document has been indexed successfully. * **Error:** If indexing fails, an error webhook will be triggered, providing details about the reason for the failure. status integer The current status of the scan. Possible values: 0 (Success), 1 (Error), 2 (CreditsChecked), 3 (Indexed) developerPayload string The developer payload that was provided in the submit method. `<= 512` characters ## Example [Section titled “Example”](#example) ```json { "status": 3, "developerPayload": "Custom developer payload" } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn about the different types of webhooks and how to handle them. [Submit File for Scan ](/reference/actions/scans/submit-file/)Learn how to submit files for scanning, including enabling indexing. [Compare Multiple Documents ](/concepts/features/data-hubs/)Understand how to compare documents within your Private Cloud Hub and against other sources. --- # Webhooks Overview > Get notified immediately when your scan status changes, without having to call any other methods. Webhooks A webhook is an automated message sent from an application when a specific event occurs. Think of it as a push notification for your server. Instead of your application repeatedly asking the Copyleaks API, “Is the scan finished yet?” (a process known as polling), a webhook lets our servers notify you automatically as soon as an event happens. This approach is far more efficient and provides real-time updates. Since authenticity scans can take time to complete, webhooks are essential for building a responsive and scalable integration. By using them, you can get immediate notifications for key events—like when a scan is completed, an error occurs, or the credit cost is calculated - without writing complex polling logic. This page explains how to configure your endpoints to receive these events and what to expect from our system. ## System Events [Section titled “System Events”](#system-events) Copyleaks system is able to notify you about a few different event types related to your scan. These events are critical for the scan success. To allow us to fire your webhook, you will need to provide us with a valid HTTP(s) endpoint. You can do this by populating the `properties.webhooks.status` field in the submit method (URL, file, or OCR). ### Suggested Endpoint Format [Section titled “Suggested Endpoint Format”](#suggested-endpoint-format) The recommended format for your webhook endpoint is: ```http https://yoursite.com/copyleaks/{status}/SCAN_ID ``` The endpoint contains two dynamic parts: 1. **`{status}`** – This token is replaced by the Copyleaks server with the relevant event. Possible values include: * ([completed](/reference/data-types/authenticity/webhooks/scan-completed)) – The scan completed successfully. * **([error](/reference/data-types/authenticity/webhooks/error))** – The scan ended with an error. * **([creditsChecked](/reference/data-types/authenticity/webhooks/credits-checked))** – Copyleaks inspected the submitted file and provides a cost for the scan. * **([indexed](/reference/data-types/authenticity/webhooks/indexed))** – Copyleaks indexed the submitted file in its Shared Data Hub or repository. 2. **`SCAN_ID`** - This segment should be replaced with your actual process ID. For For example, if your scan ID is `hello123`, the endpoint would be: ### Example [Section titled “Example”](#example) If your scan ID is `hello123`, your webhook endpoints would be: * `https://yoursite.com/copyleaks/completed/hello123` * `https://yoursite.com/copyleaks/error/hello123` * `https://yoursite.com/copyleaks/creditsChecked/hello123` Tip Including the `SCAN_ID` in the webhook URL allows you to quickly identify and track the scan. While optional, it is highly recommended. ## New-Result Webhook [Section titled “New-Result Webhook”](#new-result-webhook) In addition to the `{status}` webhooks, there is a **new-result webhook** that reports newly found results as they are identified. This is useful for time-sensitive applications, providing a live stream of results without waiting for the scan to complete. To use this webhook, populate the `properties.webhooks.newResult` field in the submit method (URL, file, or OCR). For more details, refer to the ([new result webhook](/reference/data-types/authenticity/results/new-result)) documentation. ## Client Requirements [Section titled “Client Requirements”](#client-requirements) To use the asynchronous model, your system must meet the following requirements: * A web server connected to the internet. * The ability to respond to webhook calls within **70 seconds** with an HTTP success code (2xx). * Once a success code is received, the webhook will not be fired again for the same scan. ## Retry Policy [Section titled “Retry Policy”](#retry-policy) To ensure reliable delivery, Copyleaks implements an **automatic retry mechanism** in case of communication failures (e.g., server downtime, network instability). If your server fails to respond or returns a **5xx error**, the webhook will be retried **up to 17 times**, following an **exponential backoff** strategy: 1, 2, 4, 8, 16, …, **up to 65,535 seconds** between attempts. To manually resend a webhook for a specific scan, use the [resend webhook](/reference/actions/scans/resend-webhook) endpoint. ## At-Least-Once Delivery Guarantee [Section titled “At-Least-Once Delivery Guarantee”](#at-least-once-delivery-guarantee) Copyleaks follows an **“at-least-once”** delivery approach, ensuring that webhooks are always sent, even in cases of temporary failures. Note While a webhook is guaranteed to be sent, it **may be delivered more than once** in rare cases. Your system should be designed to handle duplicate webhook notifications gracefully. By implementing these best practices, you can ensure seamless integration with Copyleaks’ asynchronous webhook system while maintaining the security and reliability of your application. ## Next Steps [Section titled “Next Steps”](#next-steps) [Completed Webhook ](/reference/data-types/authenticity/webhooks/scan-completed)Learn about the completed webhook and its contents. [Error Webhook ](/reference/data-types/authenticity/webhooks/error/)Understand how to handle error webhooks and troubleshoot issues. [Credits Checked Webhook ](/reference/data-types/authenticity/webhooks/credits-checked/)Learn about the webhook for checking credit costs before a scan. [Indexed Webhook ](/reference/data-types/authenticity/webhooks/indexed/)Understand the webhook for documents indexed in the Copyleaks database. [New Result Webhook ](/reference/data-types/authenticity/results/new-result/)Learn about the webhook that reports newly found results as they are identified. [Webhooks Security ](/concepts/security/webhooks/)Learn how to secure your webhook endpoints against unauthorized access. --- # Scan Completed > The scan completed successfully. Webhooks The `completed` event occurs once the scan process has been completed and the scan finished successfully. Note Successful scans provide you all the output information from the scan process. status integer The current status of the scan. Possible values: `0` (Success), `1` (Error), `2` (CreditsChecked), `3` (Indexed) developerPayload string The developer payload that was provided in the submit method. `<= 512 characters` scannedDocument object General information about the scanned document. scanId string The unique scan id provided by you. totalWords integer Unsigned Integer Total number of words found in the scanned text. totalExcluded integer Unsigned Integer Number of excluded words in the submitted content. credits integer Overall credits used for the scan. creationTime string\ The creation time of the scan. Timezone: UTC+0 metadata object finalUrl string\ The submitted url after all http redirects. canonicalUrl string\ Extracted canonical url from the scanned document. publishDate string\ Publication date of the scanned document. creationDate string\ Creation date of the scanned document. lastModificationDate string\ Last modification date of the scanned document. author string Scanned document author. organization string Scanned document organization. filename string Scanned document filename. results object A list of all the results that were found. internet object id string Unique result ID to identify the result. title string Document title. Mostly extracted from the document content. introduction string Document brief introduction. Mostly extracted from the document content. matchedWords integer Unsigned Integer Total matched words between this result and the scanned document. url string\ Public URL of the resource. metadata object tags array\[object] database object id integer Unique result ID to identify this result. title string Document title. Mostly extracted from the document content. introduction string Document brief introduction. Mostly extracted from the document content. matchedWords integer Unsigned Integer Total matched words between this result and the scanned document. scanId string In case a result was found in the Copyleaks internal database, and was submitted by you, this will show the scan id of the specific result. Otherwise, this field will remain empty. metadata object finalUrl string\ Final result url after all http redirects. canonicalUrl string\ Extracted canonical url from the result. publishDate string\ Publication date of the result. creationDate string\ Creation date of the result. lastModificationDate string\ Last modification date of the result. author string Result author. organization string Result organization. filename string Result filename. tags array\[object] code string Unique ID that signifies the type of result tag. title string A simple name for this tag. description string Short text describing this tag. batch object id string Unique result ID to identify this result. title string Document title. Mostly extracted from the document content. introduction string Document brief introduction. Mostly extracted from the document content. matchedWords integer Unsigned Integer Total matched words between this result and the scanned document. scanId string The batch id that is unique for all scans in this batch. metadata object finalUrl string\ Final result url after all http redirects. canonicalUrl string\ Extracted canonical url from the result. publishDate string\ Publication date of the result. creationDate string\ Creation date of the result. lastModificationDate string\ Last modification date of the result. author string Result author. organization string Result organization. filename string Result filename. tags array\[object] code string Unique ID that signifies the type of result tag. title string A simple name for this tag. description string Short text describing this tag. repositories object id string Unique result ID to identify this result. title string Document title. Mostly extracted from the document content. introduction string Document brief introduction. Mostly extracted from the document content. matchedWords integer Unsigned Integer Total matched words between this result and the scanned document. repositoryId string The repository Id that has the result. scanId string The scanId of the matched results in the repository. metadata object finalUrl string\ Final result url after all http redirects. canonicalUrl string\ Extracted canonical url from the result. publishDate string\ Publication date of the result. creationDate string\ Creation date of the result. lastModificationDate string\ Last modification date of the result. author string Result author. organization string Result organization. filename string Result filename. submittedBy string Email of the user which added this document to the repository. tags array\[object] code string Unique ID that signifies the type of result tag. title string A simple name for this tag. description string Short text describing this tag. score object The aggregated score of all results. identicalWords integer Unsigned Integer Number of words which matched exactly minorChangedWords integer Unsigned Integer Number of nearly identical words with small differences like ‘slow’ and ‘slowly’. relatedMeaningWords integer Unsigned Integer Number of paraphrased words showing similar ideas with different words. aggregatedScore number\ Unsigned float The percentage of similar words from all results. The calculation does not include excluded references, quotations, etc… notifications object A list of all the notifications that were found. alerts array\[object] A list of scan alerts that were detected in the scan. See more about [Alert Types](/reference/data-types/authenticity/scan-alerts) category integer Scan alert category. code string Scan alert code. The code is unique for each scan alert. title string Scan alert human-readable title. message string Provides human-readable information about the scan alert. helpLink string Url to a resource describing the specific scan alert. severity integer Unsigned Integer Specifies the importance of the scan alert. **Possible values:** `0` : Very Low `1` : Low `2` : Medium `3` : High `4` : Very High additionalData string Additional data about the scan alert. Supplied as a json string. ## Example [Section titled “Example”](#example) ```json { "status": 0, "developerPayload": "Custom developer payload", "scannedDocument": { "scanId": "string", "totalWords": 0, "totalExcluded": 0, "credits": 0, "creationTime": "string", "metadata": { "finalUrl": "string", "canonicalUrl": "string", "author": "string", "organization": "string", "filename": "string", "publishDate": "string", "creationDate": "string", "lastModificationDate": "string" } }, "results": { "internet": [ { "id": "string", "title": "string", "introduction": "string", "matchedWords": 0, "url": "string", "metadata": { "finalUrl": "string", "canonicalUrl": "string", "author": "string", "organization": "string", "filename": "string", "publishDate": "string", "creationDate": "string", "lastModificationDate": "string" } } ], "database": [ { "id": "string", "title": "string", "introduction": "string", "matchedWords": 0, "scanId": "string", "metadata": { "finalUrl": "string", "canonicalUrl": "string", "author": "string", "organization": "string", "filename": "string", "publishDate": "string", "creationDate": "string", "lastModificationDate": "string" } } ], "batch": [ { "id": "string", "title": "string", "introduction": "string", "matchedWords": 0, "scanId": "string", "metadata": { "finalUrl": "string", "canonicalUrl": "string", "author": "string", "organization": "string", "filename": "string", "publishDate": "string", "creationDate": "string", "lastModificationDate": "string" } } ], "repositories": [ { "id": "string", "title": "string", "introduction": "string", "matchedWords": 0, "repositoryId": "string", "scanId": "string", "metadata": { "finalUrl": "string", "canonicalUrl": "string", "author": "string", "organization": "string", "filename": "string", "publishDate": "string", "creationDate": "string", "lastModificationDate": "string", "submittedBy": "string" } } ], "score": { "identicalWords": 0, "minorChangedWords": 0, "relatedMeaningWords": 0, "aggregatedScore": 0 } }, "downloadableReport": { "status": "Success = 0", "report": "string" }, "notifications": { "alerts": [ { "category": 2, "code": "string", "title": "string", "message": "string", "helpLink": "string", "severity": 0, "additionalData": "string" } ] } } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Webhooks Overview ](/reference/data-types/authenticity/webhooks/overview/)Learn about the different types of webhooks and how to handle them. [Export Method ](/reference/actions/downloads/export/)Learn how to export scan results, including new plagiarism results. [How to Display Scan Reports ](/concepts/features/how-to-display/)Understand how to present new results to your users effectively. [Scan Alerts ](/reference/data-types/authenticity/scan-alerts/)Explore the full list of scan alerts and their meanings. --- # Moderation > Explore the data types related to content moderation. Moderation This section provides detailed information about the data types related to content moderation. [Text Moderation Labels ](/reference/data-types/moderation/text-moderation-labels)A comprehensive list of the content categories supported by the Copyleaks Text Moderation API. --- # Content Moderation Labels > A comprehensive list of the content categories supported by the Copyleaks Text Moderation API. Moderation The Copyleaks Text Moderation API provides a flexible and powerful solution for identifying and managing a wide range of harmful or risky content. Our API supports a comprehensive set of moderation labels, allowing you to tailor the moderation process to your specific community standards. ## Supported Labels [Section titled “Supported Labels”](#supported-labels) | Label ID | Description | | ------------------ | ------------------------------------------------------------------------------------ | | `toxic-v1` | General toxic or harmful content that doesn’t fit other specific categories | | `profanity-v1` | Content containing explicit language, profanity, or vulgar expressions | | `hate-speech-v1` | Content promoting hatred, discrimination, or prejudice against individuals or groups | | `harassment-v1` | Bullying, intimidation, or targeted harassment content | | `self-harm-v1` | Content promoting self-injury, suicide, or other forms of self-harm | | `adult-v1` | Sexually explicit or suggestive material inappropriate for minors | | `violent-v1` | Content depicting, promoting, or threatening violence or dangerous activities | | `drugs-v1` | Content related to illegal drug use, drug trafficking, or substance abuse | | `firearms-v1` | Content related to weapons, firearms, or other dangerous implements | | `cybersecurity-v1` | Potential security threats, malicious content, or cyber attack material | ## Usage [Section titled “Usage”](#usage) When submitting text for moderation, include the desired labels in your request. You can specify all labels or only the ones relevant to your use case: **Request** ```http POST https://api.copyleaks.com/v1/text-moderation/{scanId}/check ``` **Headers** ```http Content-Type: application/json Authorization: Bearer YOUR_LOGIN_TOKEN ``` **Body** ```json { "text": "Your text content to be moderated goes here.", "language": "en", "labels": [ { "id": "toxic-v1" }, { "id": "profanity-v1" }, { "id": "hate-speech-v1" }, { "id": "harassment-v1" }, { "id": "self-harm-v1" }, { "id": "adult-v1" }, { "id": "violent-v1" }, { "id": "drugs-v1" }, { "id": "firearms-v1" }, { "id": "cybersecurity-v1" } ] } ``` Full details about the request and response structure can be found in the [Text Moderation API Reference](/reference/actions/text-moderation/check/). ## Next Steps [Section titled “Next Steps”](#next-steps) [Moderate Text Content ](/guides/moderation/moderate-text/)Learn how to use the Text Moderation API to scan and moderate text content. [Text Moderation API Reference ](/reference/actions/text-moderation/check/)Explore the complete API reference for text moderation, including request and response details. --- # Data Types > Explore the comprehensive Copyleaks API reference for data types, from scan results to webhook payloads. Data Types Understand the structure of the data you’ll work with. Our API reference provides detailed information on every data object, from scan results to webhook payloads, ensuring you can build robust and reliable integrations. ## Explore Our Data Models [Section titled “Explore Our Data Models”](#explore-our-data-models) Dive into the specifics of each data type to understand how to work with the Copyleaks API. [Authenticity ](/reference/data-types/authenticity/overview)Explore the data types related to authenticity, including plagiarism, AI detection, and webhooks. [AI Detector ](/reference/data-types/ai-detector/overview)Explore the data types related to AI detection. [Writing ](/reference/data-types/writing/overview)Explore the data types related to writing assistance. [Moderation ](/reference/data-types/moderation/overview)Explore the data types related to content moderation. --- # Correction Types > Writing assistant correction categories Writing Each detected correction has an attached type. These types may be used to understand what error was detected and show it in the user interface. You are able to fetch the list of correction types programmatically using the following [endpoint](/reference/actions/writing-assistant/correction-types). ## Categories [Section titled “Categories”](#categories) | id | Category | | -- | ------------------ | | 1 | Sentence Structure | | 2 | Grammar | | 3 | Word Choice | | 4 | Mechanics | ## Types [Section titled “Types”](#types) | ID | Title | Message | Description | Category | | ---- | -------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -------- | | `1` | General | A general correction detected | A general correction detected. | 2 | | `2` | Subject Verb Disagreement | Subject-verb disagreement detected | The subject and verb do not agree in number. | 2 | | `3` | Noun Form | Use a different noun form | Using an incorrect form of a noun (such as pluralization or possessive form) in a sentence. | 2 | | `4` | Verb Form | Use a different verb form | Using an incorrect form of a verb (such as tense, aspect, or agreement) in a sentence results. | 2 | | `5` | Article | Use the appropriate article | Using the wrong article (a, an, or the) or omitting an article inappropriately in a sentence. | 2 | | `6` | Preposition | Incorrect preposition usage | Using the wrong preposition or misplacing a preposition in a sentence. | 2 | | `7` | Pronoun | Incorrect pronoun usage | Using an incorrect pronoun or misplacing a pronoun in a sentence. | 2 | | `8` | Part of Speech | Incorrect part of speech | Misusing or misidentifying a word’s grammatical category, such as confusing a noun with a verb. | 2 | | `9` | Conjunction | Incorrect conjunction usage | Misusing or misplacing conjunctions, which are words that connect words, phrases, or clauses in a sentence. | 2 | | `10` | Misused Word | Use a different word to convey the message | Words that are used incorrectly or inappropriately in a given context. | 3 | | `11` | Homophone | Incorrect homophone usage detected | Confusing two words that phonetically sound similar but have a different meaning (e.g., “their” and “there” or “to” and “too”). | 3 | | `12` | Capitalization | Incorrect capitalization | Word was not capitalized correctly (e.g., “paris” should be “Paris”). | 4 | | `13` | Hyphen | Hyphen usage is incorrect | Incorrect or inconsistent use of hyphens in a sentence. | 4 | | `14` | Punctuation | Incorrect punctuation usage | Incorrect use of punctuation marks, such as commas, periods, semicolons, or colons. | 4 | | `15` | Comma | Incorrect comma usage | Incorrect use of commas in sentences. | 4 | | `16` | Apostrophe | Incorrect apostrophe usage | Incorrect use of apostrophes in sentences. | 4 | | `17` | Space | Missing or extra spaces | Missing or extra spaces detected in sentence. | 4 | | `18` | Spelling | Misspelling detected | Misspelling of a word. | 4 | | `19` | Fused Sentence | Fused sentence detected | When two independent clauses are incorrectly joined without appropriate punctuation or conjunction. | 1 | | `20` | Comma Splice | Comma splice detected | Two independent clauses are incorrectly joined by a comma without a coordinating conjunction or appropriate punctuation. | 1 | | `21` | Sentence Fragments | Ensure your sentence has a complete subject and predicate | When a group of words appears to be a sentence but is incomplete because it lacks a subject, a predicate, or both. | 1 | | `22` | Ineffective Construction | Revise the sentence for better clarity and structure | Refers to sentences or phrases that are poorly constructed or lack clarity, making it difficult for readers to understand the intended meaning. | 1 | | `23` | Extra Words | Sentence contains extra words | Sentences that contain unnecessary or redundant words, which can be removed for clearer and more concise writing. | 1 | | `24` | Missing Words | Sentence with missing words | Identifies sentences that are missing essential words, resulting in incomplete or unclear meaning. | 1 | | `25` | Adjective Gender Agreement | Gender agreement mismatch in adjectives | Detects errors in the gender agreement between adjectives and nouns. | 2 | | `26` | Adjective Number Agreement | Number agreement error with adjectives | Highlights discrepancies in the number agreement between adjectives and nouns for improved grammatical precision. | 2 | | `27` | Article Gender Agreement | Gender agreement error in articles | Agreement between articles and nouns in terms of gender is incorrect , ensuring grammatical accuracy. | 2 | | `28` | Article Number Agreement | Number agreement error in articles | Number mismatch between articles and nouns creating inconsistency in how they refer to the same or similar elements in a sentence. | 2 | | `29` | Noun Gender Agreement | Gender agreement error with nouns | Lack of agreement between nouns and their associated genders, ensuring grammatical harmony. | 2 | | `30` | Subjunctive Mood | Subjunctive mood misuse | Identifies the incorrect usage of the subjunctive mood in sentences, ensuring proper expression of hypothetical or unreal situations. | 2 | | `31` | Compound Word Error | Compound word usage error | Identifies incorrect compound word usage. | 2 | | `32` | Mood Inconsistency | Inconsistency in mood detected | Detects inconsistencies in the expression of mood within a sentence, ensuring cohesive writing. | 2 | | `33` | Accent Error | Incorrect or missing usage of accents | Highlights deviations in accents, promoting uniform language usage. | 4 | | `34` | Homoglyph Error | Homoglyphs detected in text | Non-standard characters that appear identical or very similar but have a different meaning have been detected. | 2 | ## Next Steps [Section titled “Next Steps”](#next-steps) [Assess Grammar & Writing Quality ](/guides/writing/check-grammar/)Learn how to use the Writing Assistant API to detect and correct writing issues. [Writing Assistant API Reference ](/reference/actions/writing-assistant/check/)Explore the complete API reference for writing assistant, including request and response details. --- # Writing > Explore the data types related to writing assistance. Writing This section provides detailed information about the data types related to writing assistance. [Correction Types ](/reference/data-types/writing/correction-types)Writing assistant correction categories [Writing Assistant Response ](/reference/data-types/writing/writing-assistant)A snapshot of Writing Assistant results detected by Copyleaks. --- # Writing Assistant Object > A snapshot of Writing Assistant results detected by Copyleaks. It provides detailed data on writing quality, corrections, and readability. Writing The Writing Assistant object provides a comprehensive analysis of a submitted text, including scores, readability metrics, and detailed corrections. score object An object containing the overall score, readability, and text statistics. readability object score integer Readability score for the submitted text. Score ranges between 0 to 100. Higher score means the text is more readable. readabilityLevel integer The estimated readability level of the submitted text. Available values: * 1 - Text is readable for 5th grader * 2 - Text is readable for 6th grader * 3 - Text is readable for 7th grader * 4 - Text is readable for 8th-9th grader * 5 - Text is readable for 10th-12th grader * 6 - Text is readable for college student * 7 - Text is readable for college graduate * 8 - Text is readable for professional readabilityLevelText string Text corresponding to the estimated readability level. For example: “7th Grader”. readabilityLevelDescription string Description corresponding to the estimated readability level. For example: “Very easy to read”. statistics object sentenceCount integer Number of sentences in the submitted text. averageSentenceLength number Average number of words in a sentence. averageWordLength number Average number of characters in a word. readingTimeSeconds number Estimated reading time of the submitted text. speakingTimeSeconds number Estimated speaking time of the submitted text. corrections object grammarCorrectionsCount integer Total number of grammar corrections. grammarCorrectionsScore integer Overall grammar score. grammarScoreWeight number Grammar category weight in the overall score. This value is configurable upon submission. mechanicsCorrectionsCount integer Total number of mechanics corrections. mechanicsCorrectionsScore integer Overall mechanics score. mechanicsScoreWeight number Mechanics category weight in the overall score. This value is configurable upon submission. sentenceStructureCorrectionsCount integer Total number of sentence structure corrections. sentenceStructureCorrectionsScore integer Overall sentence structure score. sentenceStructureScoreWeight number Sentence structure category weight in the overall score. This value is configurable upon submission. wordChoiceCorrectionsCount integer Total number of word choice corrections. wordChoiceCorrectionsScore integer Overall word choice score. wordChoiceScoreWeight number Word choice category weight in the overall score. This value is configurable upon submission. overallScore integer Overall writing score. The score is calculated as a weighted average of the correction categories above. Weight for each category is configurable upon submission. corrections object An object containing the detailed corrections for the text. text object Corrections to be applied on the textual version. Each position in the inner arrays corresponds to a single correction to be applied to the textual version. If you use the submit endpoint, the textual version can be retrieved by using the [Export](/reference/actions/downloads/export) endpoint and exporting the crawled version. chars object The character positions of the corrections for the textual version. All nested arrays have the same length and each coordinate corresponds to one correction. types array\ The classification of this correction. For example: 12 is Capitalization Error. For a full list of correction types refer to [Correction Types documentation](/guides/writing/check-grammar). starts array\ Starting character position of the suggested text to be corrected in the textual version. lengths array\ Length in characters of the suggested text to be corrected in the textual version. operationTexts array\ The recommended text to substitute into the textual version. scannedDocument object Metadata about the scan. scanId string The unique scan id provided by you. totalWords integer Unsigned Integer Total number of words found in the scanned text. totalExcluded integer Unsigned Integer Number of excluded words in the submitted content. credits integer Overall credits used for the scan. creationTime string\ The creation time of the scan. Timezone: UTC+0 metadata object finalUrl string\ The submitted url after all http redirects. canonicalUrl string\ Extracted canonical url from the scanned document. publishDate string\ Publication date of the scanned document. creationDate string\ Creation date of the scanned document. lastModificationDate string\ Last modification date of the scanned document. author string Scanned document author. organization string Scanned document organization. filename string Scanned document filename. ## Example [Section titled “Example”](#example) ```json { "score": { "corrections": { "grammarCorrectionsCount": 2, "grammarCorrectionsScore": 87, "grammarScoreWeight": 1.0, "mechanicsCorrectionsCount": 9, "mechanicsCorrectionsScore": 38, "mechanicsScoreWeight": 1.0, "sentenceStructureCorrectionsCount": 0, "sentenceStructureCorrectionsScore": 100, "sentenceStructureScoreWeight": 1.0, "wordChoiceCorrectionsCount": 1, "wordChoiceCorrectionsScore": 93, "wordChoiceScoreWeight": 1.0, "overallScore": 79 }, "readability": { "score": 59, "readabilityLevel": 5, "readabilityLevelText": "10th to 12th Grader", "readabilityLevelDescription": "Fairly difficult to read" }, "statistics": { "sentenceCount": 5, "averageSentenceLength": 12.2, "averageWordLength": 5.5, "readingTimeSeconds": 16.0, "speakingTimeSeconds": 28.2 } }, "corrections": { "text": { "chars": { "types": [ 5, 18, 3, 18, 18, 18, 18, 10, 18, 16, 18, 18 ], "starts": [ 13, 22, 61, 104, 118, 136, 179, 233, 288, 347, 353, 374 ], "lengths": [ 2, 10, 9, 6, 8, 35, 13, 9, 12, 4, 8, 11 ], "operationTexts": [ "an ", "plagiarism ", "businesses ", "their ", "original.", "texts from the internet and data bases ", "similarities.", "multilingual ", "positives, ", "it's ", "useful ", "maintaining " ] } } }, "scannedDocument": { "scanId": "{scanId}", "totalWords": 61, "totalExcluded": 0, "actualCredits": 1, "expectedCredits": 1, "creationTime": "2025-08-11T06:46:01.2886658Z" } } ``` ## Next Steps [Section titled “Next Steps”](#next-steps) [Assess Grammar & Writing Quality ](/guides/writing/check-grammar/)Learn how to use the Writing Assistant API to detect and correct writing issues. [Correction Types ](/reference/actions/writing-assistant/correction-types/)See a detailed list of all supported correction types and languages. [Export Method ](/reference/actions/downloads/export/)Learn how to export scan results, including writing assistant data. --- # API Reference > Explore the comprehensive Copyleaks API reference, with detailed information about endpoints, data types, and specifications. API Reference Explore the comprehensive Copyleaks API reference, with detailed information about endpoints, data types, and specifications. [Actions ](/reference/actions/overview)Endpoints for submitting scans, checking credits, downloading reports, and more. [Data Types ](/reference/data-types/overview)Detailed informations about various data types, supported languages, and other technical details. --- # Working with LLMs > Copyleaks Docs provide llms.txt standard to optimize AI interactions with our documentation. Resources When working with any AI or Large Language Model (LLM), providing relevant and accurate context is critical for achieving high-quality results. To help developers and their AI applications better understand our documentation, we have adopted the `llms.txt` standard. This standard provides a structured, machine-readable format that guides AI models on how to interpret and utilize our documentation, ensuring the highest level of integrity and accuracy in AI-powered applications. Note The `llms.txt` standard is an open initiative for GenAI Governance. You can learn more about its specification and goals at [llmstxt.org](https://llmstxt.org/). ## Available Documents [Section titled “Available Documents”](#available-documents) We provide several versions of our documentation in the `llms.txt` format, each tailored for different use cases: 1. ### Sitemap Version [Section titled “Sitemap Version”](#sitemap-version) This file provides a high-level, structured sitemap of our documentation, including page descriptions. It is ideal for use cases where a concise overview of the content is required. [**llms.txt**](/llms.txt) 2. ### Structure-Only Version [Section titled “Structure-Only Version”](#structure-only-version) This file provides an index of all the pages in the documentation, showing only the titles and hierarchy. It is the most concise option, perfect for quickly understanding the structure of the documentation. [**llms-small.txt**](/llms-small.txt) 3. ### Full Content Version [Section titled “Full Content Version”](#full-content-version) This file contains the entire, unabridged content of our documentation in a single markdown file, providing the most comprehensive context possible. Caution The full content version is extensive and may exceed the context window of some Large Language Models. [**llms-full.txt**](/llms-full.txt) --- # Run in Postman > Access and utilize the Copyleaks API Postman collection for seamless integration and testing. Resources Postman is a popular tool that simplifies API testing and development. To help developers integrating with the Copyleaks APIs, we’ve created a Postman collection that covers all available API calls. This document will guide you through setting up the collection and making requests. ### 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. #### Fork the Copyleaks Postman Collection [Section titled “Fork the Copyleaks Postman Collection”](#fork-the-copyleaks-postman-collection) * Sign up or log in to your account on [**Postman**](https://www.postman.com) * Click the button below to access the Copyleaks Postman collection: [![Run In Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/25022653-e2c2987f-c1b5-462f-8590-71d28b7f4b32?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D25022653-e2c2987f-c1b5-462f-8590-71d28b7f4b32%26entityType%3Dcollection%26workspaceId%3D21147b7c-8cb3-4566-8f5d-8dfc6926eb5e) * Select **Fork Collection** * Name your fork and select a workspace 2. #### Authenticate Your API Requests [Section titled “Authenticate Your API Requests”](#authenticate-your-api-requests) * To make API calls, you need to authenticate: * Find your **API Key** in the **[API Dashboard](https://api.copyleaks.com/dashboard)** * In Postman, select your fork of the Copyleaks collection * Go to the **Variables** tab and enter the following values in the **CURRENT VALUE** column: * **email**: `YOUR_EMAIL_ADDRESS` * **key**: `YOUR_API_KEY` * Save the changes * After logging in, check the response for the `access_token` * Take the value of the `access_token` and place it in the Authorization tab of your fork in Postman as the value of Token. All endpoints will inherit this token from the parent and will use it for authentication automatically 3. #### Make API Calls [Section titled “Make API Calls”](#make-api-calls) You can now start making API requests. For example, to run an AI detection scan: * In your Postman workspace, navigate to your fork of the Copyleaks collection * Select **AI Detection** > **Submit Natural Language** > Update the request body and add the scan ID, then click **Send** * Review the response ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) [Copyleaks API in Postman ](https://www.postman.com/copyleaks-api)Check out our Copyleaks API Postman Profile [Postman Collection ](https://documenter.getpostman.com/view/25022653/2sB34foMwz#188b7bdf-4a34-4397-88dc-ca892747dbd3)Visit the complete Copyleaks API Postman Collection documentation [Account Documentation ](/reference/actions/account/overview/)Learn how to authenticate and get started with Copyleaks APIs [Scans Methods ](/reference/actions/scans/overview)Discover the full list of available Scans Methods Endpoints. Submit, start, and manage plagiarism scans --- # C# SDK Quickstart > Install the Copyleaks C# SDK, authenticate, and submit your first scan in under 5 minutes with this step-by-step guide. Official SDKs This guide will walk you through installing the official C# SDK and running your first scan. In just a few minutes, you’ll be able to check content for plagiarism, AI-generated text, and more directly from your .NET application. ## 🔑 Before you begin In order to start integrating Copyleaks API, you'll need an account and an API key: * Don't have an account? **[Sign up for free](https://api.copyleaks.com/signup)** * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)** ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. **Installation** First, install the official `Copyleaks` package from NuGet into your project using the Package Manager Console. ```powershell Install-Package Copyleaks ``` 2. **Quick Example: Scan Text** Caution Remember to replace the placeholder credentials and webhook URL with your actual values. Program.cs ```csharp using System; using System.Text; using System.Threading.Tasks; using Copyleaks.SDK.V3.API; using Copyleaks.SDK.V3.API.Models.Requests; using Copyleaks.SDK.V3.API.Models.Requests.Properties; public class Program { // --- Your Credentials --- private const string USER_EMAIL = "YOUR_EMAIL_ADDRESS"; private const string USER_KEY = "YOUR_API_KEY"; private const string WEBHOOK_URL = "https://your-server.com/webhook/{STATUS}"; // -------------------- public static async Task Main(string[] args) { try { // Log in to the Copyleaks API Console.WriteLine("Authenticating..."); var identityClient = new CopyleaksIdentityApi(); var loginResponse = await identityClient.LoginAsync(USER_EMAIL, USER_KEY); Console.WriteLine("✅ Logged in successfully!"); // Prepare your content for scanning Console.WriteLine("Submitting text for scanning..."); var apiClient = new CopyleaksScansApi(); var scanId = Guid.NewGuid().ToString(); var textToScan = "Hello world, this is a test."; var base64Content = Convert.ToBase64String(Encoding.UTF8.GetBytes(textToScan)); // Configure the scan var scanProperties = new ClientScanProperties(); scanProperties.Sandbox = true; // Turn on sandbox mode for testing scanProperties.Webhooks = new Webhooks { Status = new Uri($"{WEBHOOK_URL}") }; var fileDocument = new FileDocument { Base64 = base64Content, Filename = "test.txt", PropertiesSection = scanProperties }; // Submit the scan to Copyleaks await apiClient.SubmitFileAsync(scanId, fileDocument, loginResponse.Token); Console.WriteLine($"🚀 Scan submitted successfully! Scan ID: {scanId}"); Console.WriteLine("You will be notified via your webhook when the scan is complete."); } catch (Exception ex) { Console.WriteLine($"🛑 An error occurred: {ex.Message}"); } } } ``` 3. **Understanding the Code** The example code performs four main actions to submit a scan: 1. **Login:** It authenticates with your email and API key to get a secure login token. This token is required for all subsequent requests. 2. **Prepare Content:** It takes a simple string of text and converts it into a Base64 string. 3. **Configure Scan:** It creates a `ClientScanProperties` object to define the scan’s behavior. We enable `sandbox` mode for safe testing and provide a `webhook` URL for completion notifications. 4. **Submit for Scanning:** It creates a `FileDocument` with the content and properties, then sends it to the Copyleaks API. The process is asynchronous; Copyleaks will notify your webhook URL once the scan is complete. ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) Now that you’ve submitted your first scan, here are some recommended steps: ### Package Source [Section titled “Package Source”](#package-source) [GitHub Repository ](https://github.com/Copyleaks/.net-core-plagiarism-checker)Check the official SDK repository on GitHub for more examples and details. [NuGet Package ](https://www.nuget.org/packages/Copyleaks)View the official package on the NuGet Gallery to see all available versions. [Check for Plagiarism ](/guides/authenticity/detect-plagiarism-text)Detect plagiarism in text documents using the Copyleaks API. Search billions of sources to find unoriginal content. [Detect AI-Generated Content ](/guides/ai-detector/ai-text-detection)Detect AI-generated text via sync or async API calls. This guide covers sync detection—see the Authenticity API Guide for async. [Assess Grammar and Writing Quality ](/guides/writing/check-grammar)Get writing and grammar suggestions via API. Authenticate, submit text, and access full details in the docs. [Moderate Text ](/guides/moderation/moderate-text)Scan and moderate text content for unsafe or policy-relevant material across 10+ categories. --- # Java Quickstart Guide > Install the Copyleaks Java SDK, authenticate, and submit your first scan in under 5 minutes with this step-by-step guide. Official SDKs This guide will walk you through installing the official Java SDK and running your first scan. In just a few minutes, you’ll be able to check content for plagiarism, AI-generated text, moderation and more directly from your Java application. ## 🔑 Before you begin In order to start integrating Copyleaks API, you'll need an account and an API key: * Don't have an account? **[Sign up for free](https://api.copyleaks.com/signup)** * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)** ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. **Installation** The SDK requires **Java 11 or higher**. Add the official `copyleaks-java-sdk` dependency to your project’s `pom.xml` file. pom.xml ```xml com.copyleaks.sdk copyleaks-java-sdk 4.3.0 ``` 2. **Quick Example: Scan Text** Caution Remember to replace the placeholder credentials and webhook URL with your actual values. ScanExample.java ```java import classes.Copyleaks; import models.response.CopyleaksAuthToken; import models.submissions.CopyleaksFileSubmissionModel; import models.submissions.properties.SubmissionProperties; import models.submissions.properties.SubmissionWebhooks; import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.Random; public class ScanExample { // --- Your Credentials --- private static final String EMAIL_ADDRESS = "YOUR_EMAIL_ADDRESS"; private static final String KEY = "YOUR_API_KEY"; private static final String WEBHOOK_URL = "[https://your-server.com/webhook/](https://your-server.com/webhook/){STATUS}"; // -------------------- public static void main(String[] args) { CopyleaksAuthToken token; try { // Log in to the Copyleaks API System.out.println("Authenticating..."); token = Copyleaks.login(EMAIL_ADDRESS, KEY); System.out.println("✅ Logged in successfully!"); // Prepare your content for scanning System.out.println("Submitting text for scanning..."); String textToScan = "Hello world, this is a test."; String base64Content = Base64.getEncoder().encodeToString(textToScan.getBytes(StandardCharsets.UTF_8)); String filename = "test.txt"; String scanId = Integer.toString(new Random().nextInt(100000)); // Configure the scan SubmissionWebhooks webhooks = new SubmissionWebhooks(WEBHOOK_URL); SubmissionProperties submissionProperties = new SubmissionProperties(webhooks); submissionProperties.setSandbox(true); // Turn on sandbox mode for testing CopyleaksFileSubmissionModel submissionModel = new CopyleaksFileSubmissionModel(base64Content, filename, submissionProperties); // Submit the scan to Copyleaks Copyleaks.submitFile(token, scanId, submissionModel); System.out.println("🚀 Scan submitted successfully! Scan ID: " + scanId); System.out.println("You will be notified via your webhook when the scan is complete."); } catch (Exception e) { System.out.println("🛑 An error occurred:"); e.printStackTrace(); } } } ``` 3. **Understanding the Code** The example code performs four main actions to submit a scan: 1. **Login:** It authenticates with your email and API key to get a secure `CopyleaksAuthToken` object, which is required for all subsequent requests. 2. **Prepare Content:** It takes a simple string of text and encodes it into Base64 format. 3. **Configure Scan:** It creates a `SubmissionProperties` object containing `SubmissionWebhooks` to define the scan’s behavior. We enable `sandbox` mode for safe testing and provide the webhook URL. 4. **Submit for Scanning:** It creates a `CopyleaksFileSubmissionModel` with the content and properties, then sends it to the Copyleaks API. The process is asynchronous; Copyleaks will notify your webhook URL once the scan is complete. ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) Now that you’ve submitted your first scan, here are some recommended steps: ### Package Source [Section titled “Package Source”](#package-source) [GitHub Repository ](https://github.com/Copyleaks/Java-Plagiarism-Checker)Check the official SDK repository on GitHub for more examples and details. [Maven Central ](https://central.sonatype.com/artifact/com.copyleaks.sdk/copyleaks-java-sdk?smo=true)View the official package on the Maven Central Repository to see all available versions. [Check for Plagiarism ](/guides/authenticity/detect-plagiarism-text)Detect plagiarism in text documents using the Copyleaks API. Search billions of sources to find unoriginal content. [Detect AI-Generated Content ](/guides/ai-detector/ai-text-detection)Detect AI-generated text via sync or async API calls. This guide covers sync detection—see the Authenticity API Guide for async. [Assess Grammar and Writing Quality ](/guides/writing/check-grammar)Get writing and grammar suggestions via API. Authenticate, submit text, and access full details in the docs. [Moderate Text ](/guides/moderation/moderate-text)Scan and moderate text content for unsafe or policy-relevant material across 10+ categories. --- # JavaScript Quickstart Guide > Install the Copyleaks JavaScript SDK, authenticate, and submit your first scan in minutes with this step-by-step guide. Official SDKs This guide will walk you through installing the official JavaScript SDK and running your first scan. In just a few minutes, you’ll be able to easily use Copyleaks products directly from your JavaScript or TypeScript application. ## 🔑 Before you begin In order to start integrating Copyleaks API, you'll need an account and an API key: * Don't have an account? **[Sign up for free](https://api.copyleaks.com/signup)** * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)** ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. **Installation** First, install the official `plagiarism-checker` package from npm into your project. ```bash npm i plagiarism-checker ``` 2. **Quick Example: Scan Text** The following example shows how to authenticate and submit a simple string of text for a plagiarism scan using the SDK’s data models. Caution Remember to replace the placeholder credentials and webhook URL with your actual values. * JavaScript scan.js ```javascript const { Copyleaks, CopyleaksFileSubmissionModel } = require('plagiarism-checker'); // --- Your Credentials --- const EMAIL_ADDRESS = 'YOUR_EMAIL_ADDRESS'; const KEY = 'YOUR_API_KEY'; const WEBHOOK_URL = 'https://your-server.com/webhook/{STATUS}'; // -------------------- async function main() { console.log('Authenticating...'); const copyleaks = new Copyleaks(); const authToken = await copyleaks.loginAsync(EMAIL_ADDRESS, KEY); console.log('✅ Login successful!'); console.log('Submitting text for scanning...'); const scanId = `${Date.now()}`; // Use a timestamp for a unique ID const textToScan = 'Hello world, this is a test.'; const base64Content = Buffer.from(textToScan).toString('base64'); const submission = new CopyleaksFileSubmissionModel( base64Content, 'test.txt', { sandbox: true, // Turn on sandbox mode for testing webhooks: { status: WEBHOOK_URL } } ); await copyleaks.submitFileAsync(authToken, scanId, submission); console.log(`🚀 Scan submitted successfully! Scan ID: ${scanId}`); } main().catch(err => console.error(err)); ``` * TypeScript scan.ts ```typescript import { Copyleaks, CopyleaksFileSubmissionModel, type CopyleaksAuthToken } from 'plagiarism-checker'; // --- Your Credentials --- const EMAIL_ADDRESS = 'YOUR_EMAIL_ADDRESS'; const KEY = 'YOUR_API_KEY'; const WEBHOOK_URL = 'https://your-server.com/webhook/{STATUS}'; // -------------------- async function main() { console.log('Authenticating...'); const copyleaks = new Copyleaks(); const authToken: CopyleaksAuthToken = await copyleaks.loginAsync(EMAIL_ADDRESS, KEY); console.log('✅ Login successful!'); console.log('Submitting text for scanning...'); const scanId = `${Date.now()}`; // Use a timestamp for a unique ID const textToScan = 'Hello world, this is a test.'; const base64Content = Buffer.from(textToScan).toString('base64'); const submission = new CopyleaksFileSubmissionModel( base64Content, 'test.txt', { sandbox: true, // Turn on sandbox mode for testing webhooks: { status: WEBHOOK_URL } } ); await copyleaks.submitFileAsync(authToken, scanId, submission); console.log(`🚀 Scan submitted successfully! Scan ID: ${scanId}`); } main().catch(err => console.error(err)); ``` 3. **Understanding the Code** 1. **Login**: We authenticate with your email and API key to get a secure login token. 2. **Prepare Submission**: We encode a string to Base64 and create a new `CopyleaksFileSubmissionModel`. This model is the recommended way to structure your submission data. 3. **Configure & Submit**: We pass the submission model to `submitFileAsync`. The model itself contains the sandbox settings and the webhook URL where Copyleaks will send a notification when the scan is complete. ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) Now that you’ve submitted your first scan, here are some recommended steps: ### Package Source [Section titled “Package Source”](#package-source) [GitHub Repository ](https://github.com/Copyleaks/NodeJS-Plagiarism-Checker)Check the official Copyleaks NodeJS SDK repository on GitHub for installation and usage details. [NPM Package ](https://www.npmjs.com/package/plagiarism-checker)Install the official Copyleaks NodeJS package from NPM for easy integration. [Check for Plagiarism ](/guides/authenticity/detect-plagiarism-text)Detect plagiarism in text documents using the Copyleaks API. Search billions of sources to find unoriginal content. [Detect AI-Generated Content ](/guides/ai-detector/ai-text-detection)Detect AI-generated text via sync or async API calls. This guide covers sync detection—see the Authenticity API Guide for async. [Assess Grammar and Writing Quality ](/guides/writing/check-grammar)Get writing and grammar suggestions via API. Authenticate, submit text, and access full details in the docs. [Moderate Text ](/guides/moderation/moderate-text)Scan and moderate text content for unsafe or policy-relevant material across 10+ categories. --- # Official SDKs & Libraries > Accelerate your integration with our official SDKs. Connect to the Copyleaks API with just a few lines of code and start building with confidence. Official SDKs Integrate the full power of the Copyleaks API with just a few lines of code. Our official Software Development Kits (SDKs) are designed to provide a seamless developer experience, allowing you to build robust applications quickly and confidently. ### The Developer Experience [Section titled “The Developer Experience”](#the-developer-experience) We are committed to providing a best-in-class developer experience. Our SDKs are: Built for Speed Save hours of development time with pre-built functions for every API endpoint. Continuously Updated Our SDKs are always in sync with the latest API features, so you can take advantage of new capabilities as soon as they are released. Production-Ready Rely on officially maintained, production-ready code with comprehensive documentation and clear examples. Simple to Use We handle the complexities of authentication, request signing, and error handling, so you can focus on building great features for your users. ### Get Started with Your Language [Section titled “Get Started with Your Language”](#get-started-with-your-language) Select an official SDK for your preferred programming language and start building with Copyleaks today. [Python ](/resources/sdks/python) [JavaScript ](/resources/sdks/javascript) [Java ](/resources/sdks/java) [C# ](/resources/sdks/csharp) [PHP ](/resources/sdks/php) [Ruby ](/resources/sdks/ruby) --- # PHP Quickstart Guide > Install the Copyleaks PHP SDK, authenticate, and submit your first scan in under 5 minutes with this step-by-step guide. Official SDKs This guide will walk you through installing the official PHP SDK and running your first scan. In just a few minutes, you’ll be able to check content for plagiarism, AI-generated text, and more directly from your PHP application. ## 🔑 Before you begin In order to start integrating Copyleaks API, you'll need an account and an API key: * Don't have an account? **[Sign up for free](https://api.copyleaks.com/signup)** * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)** ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. **Installation** First, install the official `copyleaks/php-plagiarism-checker` package from Packagist into your project using Composer. ```bash composer require copyleaks/php-plagiarism-checker ``` 2. **Quick Example: Scan Text** Caution Remember to replace the placeholder credentials and webhook URL with your actual values. scan.php ```php login($EMAIL_ADDRESS, $KEY); echo "✅ Logged in successfully!\n"; // Prepare your content for scanning echo "Submitting text for scanning...\n"; $textToScan = "Hello world, this is a test."; $base64Content = base64_encode($textToScan); $scanId = time(); // Configure the scan $webhooks = new SubmissionWebhooks($WEBHOOK_URL); $properties = new SubmissionProperties($webhooks); $properties->setSandbox(true); // Turn on sandbox mode for testing $submission = new CopyleaksFileSubmissionModel($base64Content, 'test.txt', $properties); // Submit the scan to Copyleaks $copyleaks->submitFile($loginToken, $scanId, $submission); echo "🚀 Scan submitted successfully! Scan ID: " . $scanId . "\n"; echo "You will be notified via your webhook when the scan is complete.\n"; } catch (Exception $e) { echo "🛑 An error occurred: " . $e->getMessage() . "\n"; } ``` 3. **Understanding the Code** The example code performs four main actions to submit a scan: 1. **Login:** It authenticates with your email and API key to get a secure login token, which is required for all subsequent requests. 2. **Prepare Content:** It takes a simple string of text and encodes it into Base64 format. 3. **Configure Scan:** It creates a `SubmissionProperties` object containing `SubmissionWebhooks` to define the scan’s behavior. We enable `sandbox` mode for safe testing and provide the webhook URL. 4. **Submit for Scanning:** It creates a `CopyleaksFileSubmissionModel` with the content and properties, then sends it to the Copyleaks API. The process is asynchronous; Copyleaks will notify your webhook URL once the scan is complete. ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) Now that you’ve submitted your first scan, here are some recommended steps: ### Package Source [Section titled “Package Source”](#package-source) [GitHub Repository ](https://github.com/Copyleaks/PHP-Plagiarism-Checker)Check the official SDK repository on GitHub for more examples and details. [Packagist Package ](https://packagist.org/packages/copyleaks/php-plagiarism-checker)View the official package on Packagist to see all available versions. [Check for Plagiarism ](/guides/authenticity/detect-plagiarism-text)Detect plagiarism in text documents using the Copyleaks API. Search billions of sources to find unoriginal content. [Detect AI-Generated Content ](/guides/ai-detector/ai-text-detection)Detect AI-generated text via sync or async API calls. This guide covers sync detection—see the Authenticity API Guide for async. [Assess Grammar and Writing Quality ](/guides/writing/check-grammar)Get writing and grammar suggestions via API. Authenticate, submit text, and access full details in the docs. [Moderate Text ](/guides/moderation/moderate-text)Scan and moderate text content for unsafe or policy-relevant material across 10+ categories. --- # Python SDK Quickstart > Install the Copyleaks Python SDK, authenticate, and submit your first scan in under 5 minutes with this step-by-step guide. Official SDKs This guide will walk you through installing the official Python SDK and running your first scan. In just a few minutes, you’ll be able to run your first scan directly from your Python application. ## 🔑 Before you begin In order to start integrating Copyleaks API, you'll need an account and an API key: * Don't have an account? **[Sign up for free](https://api.copyleaks.com/signup)** * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)** ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. **Installation** First, install the official `copyleaks` package from PyPI into your project using pip: ```bash pip install copyleaks ``` 2. **Quick Example: Scan Text** Caution Remember to replace the placeholder `YOUR_EMAIL_ADDRESS` and `YOUR_API_KEY` with your actual credentials. scan\_text.py ```python import base64 from copyleaks.copyleaks import Copyleaks from copyleaks.exceptions.command_error import CommandError from copyleaks.models.submit.document import FileDocument from copyleaks.models.submit.properties.scan_properties import ScanProperties # --- Your Credentials --- EMAIL_ADDRESS = 'YOUR_EMAIL_ADDRESS' KEY = 'YOUR_API_KEY' # -------------------- # Log in to the Copyleaks API try: auth_token = Copyleaks.login(EMAIL_ADDRESS, KEY) print("✅ Logged in successfully!") except CommandError as ce: print(f"🛑 Login failed: {ce}") exit() # Prepare your content for scanning # You can scan a URL, a local file, or raw text. # This example scans a simple string of text. print("Submitting text for scanning...") text_to_scan = "Hello world, this is a test." base64_content = base64.b64encode(text_to_scan.encode()).decode() # Configure the scan # A unique scan ID for this submission scan_id = "my-first-scan" scan_properties = ScanProperties("https://your-server.com/webhook/{STATUS}") scan_properties.set_sandbox(True) # Turn on sandbox mode for testing file_submission = FileDocument(base64_content, "test.txt") file_submission.set_properties(scan_properties) # Submit the scan to Copyleaks Copyleaks.submit_file(auth_token, scan_id, file_submission) print(f"🚀 Scan submitted successfully! Scan ID: {scan_id}") print("You will be notified via your webhook when the scan is complete.") ``` 3. **Understanding the Code** The example code performs four main actions to submit a scan: 1. **Login:** It authenticates with your email and API key to get a secure login token from the Copyleaks server. This token is required for all subsequent requests. 2. **Prepare Content:** It takes a simple string of text and encodes it into Base64 format. The SDK requires content to be in this format for submission. 3. **Configure Scan:** It creates a `ScanProperties` object to define the scan’s behavior. We enable `sandbox` mode for safe testing without using credits and provide a `webhook` URL. 4. **Submit for Scanning:** It sends the prepared content and its configuration to the Copyleaks API. The process is asynchronous, meaning you don’t have to wait for the results. Instead, Copyleaks will notify your webhook URL once the scan is complete. ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) Now that you’ve submitted your first scan, here are some recommended steps: ### Package Source [Section titled “Package Source”](#package-source) [GitHub Repository ](https://github.com/Copyleaks/Python-Plagiarism-Checker)Check the official Copyleaks Python SDK repository on GitHub for installation and usage details. [PyPi Package ](https://pypi.org/project/copyleaks/)Install the official Copyleaks Python package from PyPI for easy integration. [Check for Plagiarism ](/guides/authenticity/detect-plagiarism-text)Detect plagiarism in text documents using the Copyleaks API. Search billions of sources to find unoriginal content. [Detect AI-Generated Content ](/guides/ai-detector/ai-text-detection)Detect AI-generated text via sync or async API calls. This guide covers sync detection—see the Authenticity API Guide for async. [Assess Grammar and Writing Quality ](/guides/writing/check-grammar)Get writing and grammar suggestions via API. Authenticate, submit text, and access full details in the docs. [Moderate Text ](/guides/moderation/moderate-text)Scan and moderate text content for unsafe or policy-relevant material across 10+ categories. --- # Ruby Quickstart Guide > Install the Copyleaks Ruby SDK, authenticate, and submit your first scan in under 5 minutes with this step-by-step guide. Official SDKs This guide will walk you through installing the official Ruby SDK and running your first scan. In just a few minutes, you’ll be able to check content for plagiarism, AI-generated text, and more directly from your Ruby application. ## 🔑 Before you begin In order to start integrating Copyleaks API, you'll need an account and an API key: * Don't have an account? **[Sign up for free](https://api.copyleaks.com/signup)** * You can find your API key on the **[API Dashboard](https://api.copyleaks.com/dashboard)** ## 🚀 Get Started [Section titled “🚀 Get Started”](#-get-started) 1. **Installation** First, install the official `plagiarism-checker` gem from RubyGems into your project. ```bash gem install plagiarism-checker ``` 2. **Quick Example: Scan Text** Caution Remember to replace the placeholder credentials and webhook URL with your actual values. scan.rb ```ruby require 'copyleaks' require 'base64' # --- Your Credentials --- USER_EMAIL = 'YOUR_EMAIL_ADDRESS' USER_API_KEY = 'YOUR_API_KEY' WEBHOOK_URL = 'https://your-server.com/webhook/{STATUS}' # -------------------- begin # Log in to the Copyleaks API puts "Authenticating..." copyleaks = Copyleaks::API.new auth_token = copyleaks.login(USER_EMAIL, USER_API_KEY) puts "✅ Logged in successfully!" # Prepare your content for scanning puts "Submitting text for scanning..." scan_id = Time.now.to_i.to_s text_to_scan = 'Hello world, this is a test.' base64_content = Base64.strict_encode64(text_to_scan) # Configure the scan webhooks = Copyleaks::SubmissionWebhooks.new(WEBHOOK_URL) properties = Copyleaks::SubmissionProperties.new(webhooks) properties.sandbox = true # Turn on sandbox mode for testing submission = Copyleaks::CopyleaksFileSubmissionModel.new( base64_content, 'test.txt', properties ) # Submit the scan to Copyleaks copyleaks.submit_file(auth_token, scan_id, submission) puts "🚀 Scan submitted successfully! Scan ID: #{scan_id}" puts "You will be notified via your webhook when the scan is complete." rescue StandardError => e puts "🛑 An error occurred: #{e.message}" end ``` 3. **Understanding the Code** The example code performs four main actions to submit a scan: 1. **Login:** It authenticates with your email and API key to get a secure login token, which is required for all subsequent requests. 2. **Prepare Content:** It takes a simple string of text and encodes it into Base64 format. 3. **Configure Scan:** It creates a `SubmissionProperties` object containing `SubmissionWebhooks` to define the scan’s behavior. We enable `sandbox` mode for safe testing and provide the webhook URL. 4. **Submit for Scanning:** It creates a `CopyleaksFileSubmissionModel` with the content and properties, then sends it to the Copyleaks API. The process is asynchronous; Copyleaks will notify your webhook URL once the scan is complete. ## 🗺️ Next Steps [Section titled “🗺️ Next Steps”](#️-next-steps) Now that you’ve submitted your first scan, here are some recommended steps: ### Package Source [Section titled “Package Source”](#package-source) [GitHub Repository ](https://github.com/Copyleaks/Ruby-Plagiarism-Checker)Check the official SDK repository on GitHub for more examples and details. [RubyGems Package ](https://rubygems.org/gems/plagiarism-checker)View the official package on RubyGems.org to see all available versions. [Check for Plagiarism ](/guides/authenticity/detect-plagiarism-text)Detect plagiarism in text documents using the Copyleaks API. Search billions of sources to find unoriginal content. [Detect AI-Generated Content ](/guides/ai-detector/ai-text-detection)Detect AI-generated text via sync or async API calls. This guide covers sync detection—see the Authenticity API Guide for async. [Assess Grammar and Writing Quality ](/guides/writing/check-grammar)Get writing and grammar suggestions via API. Authenticate, submit text, and access full details in the docs. [Moderate Text ](/guides/moderation/moderate-text)Scan and moderate text content for unsafe or policy-relevant material across 10+ categories. --- # Release Notes > Release notes for Copyleaks API updates. Updates & Support Please periodically check this page to get official updates on the product. In this document, you will find information about product updates, new releases, deprecated functionality, bug fixes, and known issues. ## July 08, 2025 NEW [Section titled “July 08, 2025 ”](#july-08-2025) **Text Moderation API Launch** We are pleased to announce the launch of our new Text Moderation API, designed to help you maintain safe and appropriate content across your platform. **Key Features:** * **Real-time content analysis** - Get instant results for submitted text * **10+ moderation categories** - Detect hate speech, toxic language, adult content, violence, self-harm, cybersecurity threats, and more * **Precise flagging** - Receive exact character positions for each flagged segment * **Simple integration** - RESTful API that fits seamlessly into any content workflow Visit our [Text Moderation API documentation](/guides/moderation/moderate-text/) to learn more and start integrating today. *** ## May 15, 2025 NEW [Section titled “May 15, 2025 ”](#may-15-2025) **PDF Report Version Management** A new field has been added for scan submissions: * `properties.pdf.reportVersion` - Specifies which version of the PDF report to generate. This string-based property overrides the legacy `version` (integer) property if both are provided. It also allows you to select the latest stable version of the PDF report by using `"latest"`. **Default Behavior:** If neither `reportVersion` nor `version` is set: * New users (created after **2025-05-15**) receive **v3** by default * Existing users receive **v1** by default *** ## May 14, 2025 NEW [Section titled “May 14, 2025 ”](#may-14-2025) **AI Source Match Feature Launch** In an evolving digital landscape, understanding the origin and nature of content is more crucial than ever. AI Source Match revolutionizes our plagiarism and AI detection capabilities by identifying online sources that are suspected to be AI-generated. **Key Benefits:** * **Comprehensive Plagiarism Analysis** - Go beyond standard plagiarism checks by providing insights into whether the source of plagiarized content is likely AI-generated * **Deeper Source Intelligence** - Gain a clearer understanding of the authenticity of external sources, helping you assess content originality more thoroughly * **Enhanced Authenticity & Integrity** - Equip yourself with advanced tools to better uphold originality and academic/creative integrity by identifying both direct plagiarism and reliance on AI-generated source material **Implementation:** The `properties.aiSourceMatch` feature can be easily activated with the `enable` parameter within your Authenticity API calls. *** ## May 08, 2025 NEW [Section titled “May 08, 2025 ”](#may-08-2025) **Display Language Support** A new field has been added for scan submissions: * **Display Language** - When specified, the PDF report will be generated in the selected language. Future updates may also apply this setting to the overview and other components. *** ## March 09, 2025 NEW [Section titled “March 09, 2025 ”](#march-09-2025) **Overview API Introduction** Copyleaks introduces the Overview API to provide key insights from user scans and author’s historical data. **Features:** * **Gen AI Overview** - Delivers a thorough analysis of each submitted scan, summarizing its content and identifying central themes or patterns * **Key Insights Analysis** - Pinpoints notable findings and directs user attention to significant details within the scanned material * **Historical Context** - When historical scan data is available, incorporates past insights and trends to provide a richer, context-driven perspective on current scan results *** ## March 05, 2025 NEW [Section titled “March 05, 2025 ”](#march-05-2025) **Course and Assignment Identification** New fields have been added for scan submissions: * **Course ID** - A unique identifier for the course associated with the submission * **Assignment ID** - A unique identifier for the assignment associated with the submission *** ## April 18, 2024 NEW [Section titled “April 18, 2024 ”](#april-18-2024) **Enhanced Alert Categorization** A new field has been added for alerts in the completed webhook response: * `category` - Scan alert category *** ## April 16, 2024 NEW [Section titled “April 16, 2024 ”](#april-16-2024) **AI Content Detection Model Versioning** Added a new field to the response of AI Content Detection: * `modelVersion` - The version of the AI Content Detection model used *** ## April 16, 2024 NEW [Section titled “April 16, 2024 ”](#april-16-2024--1) **ID Pattern Filtering for Scan Results** Added a new field in the different types of Submit Endpoints in the API: * `properties.scanning.include.idPattern` - Includes results only if their scan ID matches the supplied pattern. Matched submissions will be the only submissions included from Shared Data Hub and Private Cloud Hubs results. Documentation available in the [API Reference](/reference/actions/overview). *** ## April 4, 2024 NEW [Section titled “April 4, 2024 ”](#april-4-2024) **Alert Types Documentation** Added comprehensive [Alert Types documentation](/reference/data-types/authenticity/scan-alerts). When scanning with Copyleaks, various alerts may be received in your Completion Webhook for AI detection, writing suggestions, failed scans, cheating, and more. This page provides a complete list of possible alerts. *** ## February 26, 2024 NEW [Section titled “February 26, 2024 ”](#february-26-2024) **Writing Assistant API Enhancement** New field added to the Writing Assistant API - [Get Correction Types](/reference/data-types/writing/correction-types): * `correctionTypes[].category` - Category of the correction type *** ## February 26, 2024 NEW [Section titled “February 26, 2024 ”](#february-26-2024--1) **Language Code Support** New field added to the request body for: * [AI Content Detection - Submit Natural Language](/reference/actions/writer-detector/check) * [Writing Assistant - Submit Text](/reference/actions/writing-assistant/check) * `language` - The language code of your content. The selected language should be from the Supported Languages list. If not supplied, the system will automatically detect the content language. *** ## February 25, 2024 NEW [Section titled “February 25, 2024 ”](#february-25-2024) **Private Cloud Hubs API** Introduction of the [Private Cloud Hubs API](/reference/actions/private-cloud-hub/overview). Retrieve Private Cloud Hub information including credit consumption, metadata values, and current status. Requires “Super Admin” or “Admin” role. *** ## December 7, 2023 NEW [Section titled “December 7, 2023 ”](#december-7-2023) **Writing Assistant API Launch** Introduction of the [Writing Assistant API](/reference/actions/writing-assistant/overview). Writing Assistant offers real-time, AI-driven writing corrections, serving as a virtual assessment API capable of providing constructive critiques and instantaneous enhancements to textual content. *** ## September 28, 2023 NEW [Section titled “September 28, 2023 ”](#september-28-2023) **AI Content Detection for Source Code** Launch of [AI Content Detection API for Source Code](/reference/actions/writer-detector/overview). Use Copyleaks AI Content Detection to differentiate between human-written and AI-generated source code. *** ## May 3, 2023 NEW [Section titled “May 3, 2023 ”](#may-3-2023) **PDF Report Version 2 Public Release** PDF version 2 is now publicly available for API users. The updated PDF report includes AI detection results, cheat alerts, and an updated interface. To enable the newest version, edit the `properties.pdf.version` flag of the [Submit endpoint](/reference/actions/scans/overview). *** ## January 29, 2023 NEW [Section titled “January 29, 2023 ”](#january-29-2023) **Document Template Exclusion** You can now easily exclude document template text from plagiarism scanning. For more information, check the `properties.exclude.documentTemplateIds` flag on the [Submit endpoint](/reference/actions/scans/overview). *** ## January 12, 2023 NEW [Section titled “January 12, 2023 ”](#january-12-2023) **AI Content Detection API Launch** Launch of the AI Content Detection API, which confirms whether provided text was created by a human or AI. Read the [AI Content Detection API Documentation](/reference/actions/writer-detector/overview). *** ## January 1, 2023 NEW [Section titled “January 1, 2023 ”](#january-1-2023) **AI Content Detection Integration** AI Content Detection is now available as an option within the plagiarism detection API. To enable this option, use the flag `properties.aiGeneratedText.detect`. Documentation available for the [Submit endpoint](/reference/actions/scans/overview). *** ## November 13, 2022 NEW [Section titled “November 13, 2022 ”](#november-13-2022) **Cross-Language Plagiarism Detection** Launch of Cross-Language Plagiarism Detection feature. Scans can be performed on uploaded documents across nearly 30 languages, with additional languages regularly added. For example, a document uploaded in English can find potential plagiarism matches in Chinese, Spanish, German, or any other selected language. To activate this feature, use the flag: `properties.scanning.crossLanguages.languages[]`. Documentation available for the [Submit endpoint](/reference/actions/scans/overview). *** ## November 1, 2022 NEW [Section titled “November 1, 2022 ”](#november-1-2022) **New-Result Webhook Enhancement** Added two fields to the [New-Result webhook](/reference/data-types/authenticity/results/new-result): * `developerPayload` - The developer payload provided in the submit method * `score` - The current aggregate score of the scan up to this point *** ## May 25, 2022 NEW [Section titled “May 25, 2022 ”](#may-25-2022) **Product Unification** Merged Education and Business products into one unified product that includes all features from both previous products. **Key Changes:** * Former Business users can now access Education-exclusive features, such as the Copyleaks Shared Data Hub * [New endpoints](/reference/actions/scans/overview) available for the merged product (existing integrations remain unchanged) * Pricing model aligned with Education pricing model (existing subscriptions unchanged) *** ## February 9, 2022 NEW [Section titled “February 9, 2022 ”](#february-9-2022) **Indexed Document Masking Policy** Added support for indexed document masking policy for repository users. Define custom masking policies for each document in your repository. For more information, see the `properties.indexing.repositories[].maskingPolicy` flag on the submit method. *** ## February 8, 2022 NEW [Section titled “February 8, 2022 ”](#february-8-2022) **Enhanced URL Submission Control** Added options to control HTTP headers (`headers` field) and request method (`verb` field) when using Submit by URL for both Business and Education users. *** ## February 6, 2022 NEW [Section titled “February 6, 2022 ”](#february-6-2022) **Copyleaks Platform Release** Released new version of Copyleaks with comprehensive management capabilities: * [Copyleaks Identity](https://id.copyleaks.com) - Manage security settings, billing, and teams or Private Cloud Hubs * [Copyleaks Authentication](https://id.copyleaks.com/security) - Multi-factor authentication options: email or authenticator app * [Copyleaks Teams](https://admin.copyleaks.com/members) & [Private Cloud Hubs](https://admin.copyleaks.com/repositories) - Manage users, documents, analytics, and permissions * [Copyleaks Billing](https://id.copyleaks.com/billing) - View current plan, past invoices, and billing information *** ## January 9, 2022 NEW [Section titled “January 9, 2022 ”](#january-9-2022) **Credits Management Documentation** Added comprehensive article about effective Copyleaks credits management and monitoring: [How to manage your credits?](/concepts/management/manage-your-credits) *** ## September 1, 2021 NEW [Section titled “September 1, 2021 ”](#september-1-2021) **Teams Integration Documentation** Added integration guide between Copyleaks API and Copyleaks Teams. *** ## February 28, 2021 NEW [Section titled “February 28, 2021 ”](#february-28-2021) **Java SDK Launch** Launched official SDK for Java developers: [Java SDK](https://github.com/Copyleaks/Java-Plagiarism-Checker). Package available via [Maven](https://search.maven.org/search?q=g:com.copyleaks.sdk). *** ## February 1, 2021 CHANGE [Section titled “February 1, 2021 ”](#february-1-2021) **Server IP Address Update** Server IP addresses changed starting March 1, 2021. If your application is behind a firewall, update your HTTP endpoints to allow the new Copyleaks IP policy. If you are not filtering access by IP, no action is required. Starting March 1, 2021, specific IP addresses for contacting your service are not guaranteed. *** ## January 24, 2021 NEW [Section titled “January 24, 2021 ”](#january-24-2021) **Whitelist IP Authentication** Security enhancement: Whitelist IP Authentication allows approval of requests from specified IP addresses. Read more: [Whitelist IP Authentication](https://api.copyleaks.com/dashboard/ip-whitelist). *** ## January 21, 2021 CHANGE [Section titled “January 21, 2021 ”](#january-21-2021) **Date Format Update** Updated date format in result titles for better readability. * Old format: “dd/MM/yyyy” * New format: “MMMM dd, yyyy” *** ## January 19, 2021 NEW [Section titled “January 19, 2021 ”](#january-19-2021) **PHP SDK Launch** Launched official SDK for PHP developers: [PHP SDK](https://github.com/Copyleaks/PHP-Plagiarism-Checker). Package available via [Packagist](https://packagist.org/packages/copyleaks/php-plagiarism-checker). *** ## January 17, 2021 NEW [Section titled “January 17, 2021 ”](#january-17-2021) **Node.js SDK Launch** Launched official SDK for Node.js developers: [Node.js SDK](https://github.com/Copyleaks/NodeJS-Plagiarism-Checker). Package available via [npm](https://www.npmjs.com/package/plagiarism-checker). *** ## January 13, 2021 NEW [Section titled “January 13, 2021 ”](#january-13-2021) **Python SDK Launch** Launched official SDK for Python developers: [Python SDK](https://github.com/Copyleaks/Python-Plagiarism-Checker). Package available via [PyPI](https://pypi.org/project/copyleaks/). *** ## December 24, 2020 CHANGE [Section titled “December 24, 2020 ”](#december-24-2020) **Webhook Retry Policy Enhancement** Increased the number of retry attempts when sending system webhooks. Read more in the “Retry Policy” section on the [Webhooks page](/reference/data-types/authenticity/webhooks/overview). * Previous: Up to 12 attempts (2, 4, 8, …, 4096 seconds) * Updated: Up to 17 attempts (2, 4, …, 65535 seconds) *** ## December 23, 2020 NEW /> [Section titled “December 23, 2020 />”](#december-23-2020-) **ID Pattern Exclusion** Added new feature to Submit methods: `properties.scanning.exclude.idPattern`. This feature allows exclusion of submissions from results if their ID matches the supplied pattern. Available for all Submit endpoints in both Business and Education APIs. *** ## December 10, 2020 CHANGE [Section titled “December 10, 2020 ”](#december-10-2020) **Webhooks Documentation Update** Updated [Webhooks documentation page](/reference/data-types/authenticity/webhooks/overview) with “At-Least-Once Delivery” section. *** ## November 24, 2020 DEPRECATED [Section titled “November 24, 2020 ”](#november-24-2020) **Batch Method Deprecation** The following method is now obsolete: * `PATCH https://api.copyleaks.com/v3/education/batch/start` To compare multiple files, see instructions: [Cross Compare Multiple Files](/reference/actions/miscellaneous/supported-cross-languages). *** ## November 23, 2020 NEW [Section titled “November 23, 2020 ”](#november-23-2020) **Cross Compare Documentation** New article: [Cross Compare Multiple Files](/reference/actions/miscellaneous/supported-cross-languages). *** ## November 2, 2020 NEW [Section titled “November 2, 2020 ”](#november-2-2020) **API Dashboard Launch** Launched new version of the API dashboard. Easily administer scans and visualize API scan results to ensure comprehensive monitoring. *** ## October 25, 2020 CHANGE [Section titled “October 25, 2020 ”](#october-25-2020) **Rate Limiting Implementation** Copyleaks API now enforces rate limits for the following methods: * `https://id.copyleaks.com/v3/account/login/api` - Maximum 12 calls per 15 minutes * `https://api.copyleaks.com/v3/education|businesses/scans/{scanId}/webhooks/resend` - Maximum 300 calls per 60 minutes * `https://api.copyleaks.com/v3/education|businesses/usages/history` - Maximum 10 calls per 60 minutes * `https://api.copyleaks.com/v3/businesses/credits` - Maximum 10 calls per 15 minutes Exceeding the maximum number of calls will result in an HTTP 429 response code. *** ## October 15, 2020 NEW [Section titled “October 15, 2020 ”](#october-15-2020) **Open Source Plagiarism Report** Launched the Open Source Plagiarism Report. Embed a ready-to-use plagiarism report within your own domain (whitelabel). Read more: [Open Source Plagiarism Report](https://github.com/Copyleaks/plagiarism-report). *** ## October 10, 2020 NEW [Section titled “October 10, 2020 ”](#october-10-2020) **Cheat Detection** Added cheat detection capabilities. To enable this feature, turn on the `properties.cheatDetection` flag in the Submit methods. Available for both Education and Business users. *** ## September 18, 2020 NEW [Section titled “September 18, 2020 ”](#september-18-2020) **Teams Capabilities** Copyleaks V3 API now supports Teams capabilities. Build your own team, invite members, and share credits across multiple users. *** ## September 1, 2020 DEPRECATED [Section titled “September 1, 2020 ”](#september-1-2020) **Download Methods Deprecation** The following methods are now obsolete: * `https://api.copyleaks.com/v3/downloads/{scanId}` * `https://api.copyleaks.com/v3/downloads/{scanId}/results/{resultId}` * `https://api.copyleaks.com/v3/downloads/{scanId}/report.pdf` Use the [Export method](/reference/actions/downloads/overview) instead. *** ## August 7, 2020 NEW [Section titled “August 7, 2020 ”](#august-7-2020) **.NET Core SDK Launch** Launched official SDK for .NET Core: [.NET Core SDK](https://github.com/Copyleaks/.net-core-plagiarism-checker). Package available via [NuGet](https://www.nuget.org/packages/Copyleaks/). *** ## August 5, 2020 NEW [Section titled “August 5, 2020 ”](#august-5-2020) **Sensitive Data Masking** Added Sensitive Data Masking feature to prevent leakage of sensitive data within submitted materials. This feature works on textual content and images; other media types are not covered. For more information, visit the Submit method documentation. *** ## June 25, 2020 NEW [Section titled “June 25, 2020 ”](#june-25-2020) **Reference Exclusion** Copyleaks now supports excluding references from educational plagiarism scans. This text detection algorithm is based on advanced AI capabilities to ensure high success rates. To use this feature, turn on the `properties.exclude.references` flag. *** ## June 1, 2020 NEW [Section titled “June 1, 2020 ”](#june-1-2020) **Private Cloud Hubs** Use Copyleaks to host all your internal documents and compare scans against them. This feature works similarly to the Copyleaks Shared Data Hub but provides private storage accessible only to you. To use this feature, purchase the product hosting plan and use the `properties.scanning.repositories` flag in the Submit method. *** ## May 15, 2020 CHANGE [Section titled “May 15, 2020 ”](#may-15-2020) **PDF Reports for Business Users** PDF reports are now available for Business users. To enable this feature, turn on the `properties.pdf.create` flag in the Submit method. *** ## February 28, 2019 NEW [Section titled “February 28, 2019 ”](#february-28-2019) **API Version 3 Launch** API version 3 is now deployed and in production. /> **ID Pattern Exclusion** Added new feature to Submit methods: `properties.scanning.exclude.idPattern`. This feature allows exclusion of submissions from results if their ID matches the supplied pattern. Available for all Submit endpoints in both Business and Education APIs. *** ## December 10, 2020 CHANGE [Section titled “December 10, 2020 ”](#december-10-2020--1) **Webhooks Documentation Update** Updated [Webhooks documentation page](/reference/data-types/authenticity/webhooks/overview) with “At-Least-Once Delivery” section. *** ## November 24, 2020 DEPRECATED [Section titled “November 24, 2020 ”](#november-24-2020--1) **Batch Method Deprecation** The following method is now obsolete: * `PATCH https://api.copyleaks.com/v3/education/batch/start` To compare multiple files, see instructions: [Cross Compare Multiple Files](/reference/actions/miscellaneous/supported-cross-languages). *** ## November 23, 2020 NEW [Section titled “November 23, 2020 ”](#november-23-2020--1) **Cross Compare Documentation** New article: [Cross Compare Multiple Files](/reference/actions/miscellaneous/supported-cross-languages). *** ## November 2, 2020 NEW [Section titled “November 2, 2020 ”](#november-2-2020--1) **API Dashboard Launch** Launched new version of the API dashboard. Easily administer scans and visualize API scan results to ensure comprehensive monitoring. *** ## October 25, 2020 CHANGE [Section titled “October 25, 2020 ”](#october-25-2020--1) **Rate Limiting Implementation** Copyleaks API now enforces rate limits for the following methods: * `https://id.copyleaks.com/v3/account/login/api` - Maximum 12 calls per 15 minutes * `https://api.copyleaks.com/v3/education|businesses/scans/{scanId}/webhooks/resend` - Maximum 300 calls per 60 minutes * `https://api.copyleaks.com/v3/education|businesses/usages/history` - Maximum 10 calls per 60 minutes * `https://api.copyleaks.com/v3/businesses/credits` - Maximum 10 calls per 15 minutes Exceeding the maximum number of calls will result in an HTTP 429 response code. *** ## October 15, 2020 NEW [Section titled “October 15, 2020 ”](#october-15-2020--1) **Open Source Plagiarism Report** Launched the Open Source Plagiarism Report. Embed a ready-to-use plagiarism report within your own domain (whitelabel). Read more: [Open Source Plagiarism Report](https://github.com/Copyleaks/plagiarism-report). *** ## October 10, 2020 NEW [Section titled “October 10, 2020 ”](#october-10-2020--1) **Cheat Detection** Added cheat detection capabilities. To enable this feature, turn on the `properties.cheatDetection` flag in the Submit methods. Available for both Education and Business users. *** ## September 18, 2020 NEW [Section titled “September 18, 2020 ”](#september-18-2020--1) **Teams Capabilities** Copyleaks V3 API now supports Teams capabilities. Build your own team, invite members, and share credits across multiple users. *** ## September 1, 2020 DEPRECATED [Section titled “September 1, 2020 ”](#september-1-2020--1) **Download Methods Deprecation** The following methods are now obsolete: * `https://api.copyleaks.com/v3/downloads/{scanId}` * `https://api.copyleaks.com/v3/downloads/{scanId}/results/{resultId}` * `https://api.copyleaks.com/v3/downloads/{scanId}/report.pdf` Use the [Export method](/reference/actions/downloads/overview) instead. *** ## August 7, 2020 NEW [Section titled “August 7, 2020 ”](#august-7-2020--1) **.NET Core SDK Launch** Launched official SDK for .NET Core: [.NET Core SDK](https://github.com/Copyleaks/.net-core-plagiarism-checker). Package available via [NuGet](https://www.nuget.org/packages/Copyleaks/). *** ## August 5, 2020 NEW [Section titled “August 5, 2020 ”](#august-5-2020--1) **Sensitive Data Masking** Added Sensitive Data Masking feature to prevent leakage of sensitive data within submitted materials. This feature works on textual content and images; other media types are not covered. For more information, visit the Submit method documentation. *** ## June 25, 2020 NEW [Section titled “June 25, 2020 ”](#june-25-2020--1) **Reference Exclusion** Copyleaks now supports excluding references from educational plagiarism scans. This text detection algorithm is based on advanced AI capabilities to ensure high success rates. To use this feature, turn on the `properties.exclude.references` flag. *** ## June 1, 2020 NEW [Section titled “June 1, 2020 ”](#june-1-2020--1) **Private Cloud Hubs** Use Copyleaks to host all your internal documents and compare scans against them. This feature works similarly to the Copyleaks Shared Data Hub but provides private storage accessible only to you. To use this feature, purchase the product hosting plan and use the `properties.scanning.repositories` flag in the Submit method. *** ## May 15, 2020 CHANGE [Section titled “May 15, 2020 ”](#may-15-2020--1) **PDF Reports for Business Users** PDF reports are now available for Business users. To enable this feature, turn on the `properties.pdf.create` flag in the Submit method. *** ## February 28, 2019 NEW [Section titled “February 28, 2019 ”](#february-28-2019--1) **API Version 3 Launch** API version 3 is now deployed and in production.