This guide walks you through your first integration with the Copyleaks API: authenticating, submitting text, and interpreting an AI detection result. It takes about five minutes.
1

Create your account

To follow this guide you will need:
2

Install your tools

Choose your preferred method for making API calls.
3

Authenticate

Every request must be authorized with an access token. Generate one by calling the login endpoint with your email and API key, both available on the API Dashboard.The token is returned in the response and must be sent on every subsequent request via the Authorization: Bearer <ACCESS_TOKEN> header. It remains valid for 48 hours.
A successful request returns the token and its lifetime:
Response
4

Detect AI-generated text

Submit text to AI Text Detection. The examples below run in sandbox mode ("sandbox": true), which returns simulated results so you can test your integration for free. Set sandbox to false for real detection, which consumes credits.Replace <ACCESS_TOKEN> with the token from the previous step. The text must be at least 255 characters, and each scan requires a unique scan ID (my-first-scan below).
The response (abbreviated here) classifies the text and reports an AI score:
Response
summary.ai is the AI score: the share of the text’s words classified as AI-generated, from 0 to 1. Each entry in results classifies a section of the text: a classification of 2 indicates AI-generated and 1 indicates human-written, with probability as the confidence for that section.

Recap

You have completed your first integration. In this guide you:
  • Authenticated with the Copyleaks API and received a 48-hour access token.
  • Submitted text to AI Text Detection in sandbox mode.
  • Interpreted the classification and AI score in the response.
To run against live detection, set sandbox to false. Note that production scans consume credits.

Next steps

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.

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.