- An active Copyleaks account. If you don’t have one, sign up for free.
- You can find your API key on the API Dashboard.
Get Started
Understanding the Code
The example code performs four main actions to submit a scan:
- 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.
- 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.
- Configure Scan: It creates a
ScanPropertiesobject to define the scan’s behavior. We enablesandboxmode for safe testing without using credits and provide awebhookURL. - 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
GitHub Repository
Check the official Copyleaks Python SDK repository on GitHub for installation and usage details.
PyPi Package
Install the official Copyleaks Python package from PyPI for easy integration.
Check for Plagiarism
Detect plagiarism in text documents using the Copyleaks API. Search billions of sources to find unoriginal content.
Detect AI-Generated Content
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
Get writing and grammar suggestions via API. Authenticate, submit text, and access full details in the docs.
Moderate Text
Scan and moderate text content for unsafe or policy-relevant material across 10+ categories.

