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,
"language": "en",
"labels": [
{ "id": "toxic-v1" },
{ "id": "profanity-v1" },
{ "id": "hate-speech-v1" }
]
}'
from copyleaks.copyleaks import Copyleaks
from copyleaks.models.TextModeration.Requests.CopyleaksTextModerationRequestModel import CopyleaksTextModerationRequestModel
auth_token = Copyleaks.login("[email protected]", "YOUR_API_KEY")
submission = CopyleaksTextModerationRequestModel(
text="Your text content to be moderated goes here.",
sandbox=True,
language="en",
labels=[
{"id": "toxic-v1"},
{"id": "profanity-v1"},
{"id": "hate-speech-v1"},
],
)
response = Copyleaks.TextModerationClient.submit_text(auth_token, "my-scan-123", submission)
print(response)
const { Copyleaks, CopyleaksTextModerationRequestModel } = require('plagiarism-checker');
const copyleaks = new Copyleaks();
const auth = await copyleaks.loginAsync('YOUR_EMAIL', 'YOUR_API_KEY');
const submission = new CopyleaksTextModerationRequestModel({
text: 'Your text content to be moderated goes here.',
sandbox: true,
language: 'en',
labels: [
{ id: 'toxic-v1' },
{ id: 'profanity-v1' },
{ id: 'hate-speech-v1' },
],
});
await copyleaks.textModerationClient.submitTextAsync(auth, 'my-scan-123', submission);
import classes.Copyleaks;
import models.request.TextModeration.CopyleaksTextModerationRequest;
import models.request.TextModeration.Label;
String authToken = Copyleaks.login("your@email", "API_KEY");
CopyleaksTextModerationRequest req = new CopyleaksTextModerationRequest(
"Your text content to be moderated goes here.",
true,
"en",
new Label[] {
new Label("toxic-v1"),
new Label("profanity-v1"),
new Label("hate-speech-v1"),
}
);
Copyleaks.textModerationClient.submitText(authToken, "my-scan-123", req);
{
"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]
}
}
},
"scannedDocument": {
"scanId": "scan-id",
"totalWords": 86,
"actualCredits": 1,
"expectedCredits": 1,
"creationTime": "2025-08-06T08:05:20.6787519Z"
}
}
Text Moderation
Moderate Text
Instantly flag hateful, explicit, toxic, or otherwise risky content in any text.
POST
/
v1
/
text-moderation
/
{scanId}
/
check
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,
"language": "en",
"labels": [
{ "id": "toxic-v1" },
{ "id": "profanity-v1" },
{ "id": "hate-speech-v1" }
]
}'
from copyleaks.copyleaks import Copyleaks
from copyleaks.models.TextModeration.Requests.CopyleaksTextModerationRequestModel import CopyleaksTextModerationRequestModel
auth_token = Copyleaks.login("[email protected]", "YOUR_API_KEY")
submission = CopyleaksTextModerationRequestModel(
text="Your text content to be moderated goes here.",
sandbox=True,
language="en",
labels=[
{"id": "toxic-v1"},
{"id": "profanity-v1"},
{"id": "hate-speech-v1"},
],
)
response = Copyleaks.TextModerationClient.submit_text(auth_token, "my-scan-123", submission)
print(response)
const { Copyleaks, CopyleaksTextModerationRequestModel } = require('plagiarism-checker');
const copyleaks = new Copyleaks();
const auth = await copyleaks.loginAsync('YOUR_EMAIL', 'YOUR_API_KEY');
const submission = new CopyleaksTextModerationRequestModel({
text: 'Your text content to be moderated goes here.',
sandbox: true,
language: 'en',
labels: [
{ id: 'toxic-v1' },
{ id: 'profanity-v1' },
{ id: 'hate-speech-v1' },
],
});
await copyleaks.textModerationClient.submitTextAsync(auth, 'my-scan-123', submission);
import classes.Copyleaks;
import models.request.TextModeration.CopyleaksTextModerationRequest;
import models.request.TextModeration.Label;
String authToken = Copyleaks.login("your@email", "API_KEY");
CopyleaksTextModerationRequest req = new CopyleaksTextModerationRequest(
"Your text content to be moderated goes here.",
true,
"en",
new Label[] {
new Label("toxic-v1"),
new Label("profanity-v1"),
new Label("hate-speech-v1"),
}
);
Copyleaks.textModerationClient.submitText(authToken, "my-scan-123", req);
{
"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]
}
}
},
"scannedDocument": {
"scanId": "scan-id",
"totalWords": 86,
"actualCredits": 1,
"expectedCredits": 1,
"creationTime": "2025-08-06T08:05:20.6787519Z"
}
}
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,
"language": "en",
"labels": [
{ "id": "toxic-v1" },
{ "id": "profanity-v1" },
{ "id": "hate-speech-v1" }
]
}'
from copyleaks.copyleaks import Copyleaks
from copyleaks.models.TextModeration.Requests.CopyleaksTextModerationRequestModel import CopyleaksTextModerationRequestModel
auth_token = Copyleaks.login("[email protected]", "YOUR_API_KEY")
submission = CopyleaksTextModerationRequestModel(
text="Your text content to be moderated goes here.",
sandbox=True,
language="en",
labels=[
{"id": "toxic-v1"},
{"id": "profanity-v1"},
{"id": "hate-speech-v1"},
],
)
response = Copyleaks.TextModerationClient.submit_text(auth_token, "my-scan-123", submission)
print(response)
const { Copyleaks, CopyleaksTextModerationRequestModel } = require('plagiarism-checker');
const copyleaks = new Copyleaks();
const auth = await copyleaks.loginAsync('YOUR_EMAIL', 'YOUR_API_KEY');
const submission = new CopyleaksTextModerationRequestModel({
text: 'Your text content to be moderated goes here.',
sandbox: true,
language: 'en',
labels: [
{ id: 'toxic-v1' },
{ id: 'profanity-v1' },
{ id: 'hate-speech-v1' },
],
});
await copyleaks.textModerationClient.submitTextAsync(auth, 'my-scan-123', submission);
import classes.Copyleaks;
import models.request.TextModeration.CopyleaksTextModerationRequest;
import models.request.TextModeration.Label;
String authToken = Copyleaks.login("your@email", "API_KEY");
CopyleaksTextModerationRequest req = new CopyleaksTextModerationRequest(
"Your text content to be moderated goes here.",
true,
"en",
new Label[] {
new Label("toxic-v1"),
new Label("profanity-v1"),
new Label("hate-speech-v1"),
}
);
Copyleaks.textModerationClient.submitText(authToken, "my-scan-123", req);
{
"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]
}
}
},
"scannedDocument": {
"scanId": "scan-id",
"totalWords": 86,
"actualCredits": 1,
"expectedCredits": 1,
"creationTime": "2025-08-06T08:05:20.6787519Z"
}
}
Authentication Required. You need to login with a user and API key in order to access this method. Add this HTTP header to your request:Authorization: Bearer <Your-Login-Token>
Request
Path Parameters
string
required
A unique scan id provided by you. We recommend you use the same id in your database to represent the scan in the Copyleaks database. Learn more about the criteria for creating a Scan ID.
>= 3 characters <= 36 charactersHeaders
Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN
Request Body
The request body is a JSON object containing the text to scan.string
required
Text to produce Text Moderation report for.
>= 1 characters <= 25000 charactersboolean
default:"false"
Use sandbox mode to test your integration with the Copyleaks API without consuming any credits.
string
The language code of your content. If the
language field is not specified, our system will automatically detect the language of the content.Example: "en"array[object]
A list of label configurations to be used for the moderation process.
Show label properties
Show label properties
string
Identifier for the label. List of moderation labels.
>= 1 characters <= 32 charactersResponses
- 200
- 400
- 401
- 402
- 429
200 OK - The moderation report was returned successfully.
{
"modelVersion": "v1",
"moderations": { "text": { "chars": { "labels": [4], "starts": [15], "lengths": [4] } } },
"scannedDocument": {
"scanId": "scan-id",
"totalWords": 86,
"creationTime": "2025-08-06T08:05:20.6787519Z"
}
}
400 Bad Request - Bad Request.
401 Unauthorized - Authorization has been denied for this request.
402 Payment Required - Text Moderation is not enabled to your account.
429 Too Many Requests - Too many requests have been sent. The request has been rejected.
⌘I

