Assess Grammar & Writing Quality
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:
- Sync: Submit text via an HTTP request and receive the analysis in the response.
- Async: Use the Authenticity API to submit larger documents and receive results via webhook.
🚀 Get Started
Section titled “🚀 Get Started”-
Before you begin
Section titled “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.
- You can find your API key on the API Dashboard.
-
Installation
Section titled “Installation”Choose your preferred method for making API calls.
You can interact with the API using any standard HTTP client.
For a quicker setup, we provide a Postman collection. See our Postman guide for instructions.
Terminal window sudo apt-get install curlDownload it from curl.se.
Terminal window brew install curlTerminal window pip install copyleaksTerminal window npm install plagiarism-checker -
To perform a scan, we first need to generate an access token. For that, we will use the login endpoint. The API key can be found on the Copyleaks API Dashboard.
Upon successful authentication, you will receive a token that must be attached to subsequent API calls via the Authorization: Bearer
<TOKEN>
header. This token remains valid for 48 hours.POST https://id.copyleaks.com/v3/account/login/apiHeadersContent-Type: application/jsonBody{"key": "00000000-0000-0000-0000-000000000000"}Terminal window 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}\"}"from copyleaks.copyleaks import CopyleaksAPI_KEY = "your-api-key-here"# Login to Copyleaksauth_token = Copyleaks.login(EMAIL_ADDRESS, API_KEY)print("Logged successfully!\nToken:", auth_token)const { Copyleaks } = require('plagiarism-checker');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;}import com.copyleaks.sdk.api.Copyleaks;String API_KEY = "00000000-0000-0000-0000-000000000000";// Login to Copyleakstry {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
{"access_token": "<ACCESS_TOKEN>",".issued": "2025-07-31T10:19:40.0690015Z",".expires": "2025-08-02T10:19:40.0690016Z"} -
Send Request
Section titled “Send Request”Use the Writing Feedback Endpoint. Provide a unique
scanId
for each request.POST https://api.copyleaks.com/v1/writing-feedback/my-scan-1/checkHeadersAuthorization: Bearer <YOUR_AUTH_TOKEN>Content-Type: application/jsonBody{"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}Terminal window curl -X POST "https://api.copyleaks.com/v1/writing-feedback/my-scan-1/check" \-H "Authorization: Bearer <YOUR_AUTH_TOKEN>" \-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}'from copyleaks.copyleaks import Copyleaksfrom copyleaks.models.submit.writing_assistant_document import WritingAssistantDocumentscan_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)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);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); -
Interpret The Response
Section titled “Interpret The Response”The Writing Assistant Response contains detailed feedback under the
corrections
andscore
properties. Thescore
provides an overall quality metric and a breakdown by category, whilecorrections
pinpoints the exact location and suggested changes for each issue.Example Response Snippet {"score": {"corrections": {"overallScore": 93,"grammarCorrectionsScore": 100},"readability": {"readabilityLevelText": "College Student"}},"corrections": {"text": {"chars": { "types": [18], "starts": [28], "lengths": [9], "operationTexts": ["stretches "] }}}}