API Documentation

Authentication

All API endpoints require authentication via an API key in the Authorization header.

Authorization: Bearer pe_your_api_key_here

API keys are prefixed with pe_ followed by 32 hex characters.

POST /api/v1/scan

Run a plagiarism scan on the provided text.

cURL

curl -X POST https://your-domain.com/api/v1/scan \
  -H "Authorization: Bearer pe_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Your text to check for plagiarism...",
    "options": {
      "search_depth": "standard"
    }
  }'

Python

import requests

response = requests.post(
    "https://your-domain.com/api/v1/scan",
    headers={"Authorization": "Bearer pe_your_api_key"},
    json={
        "text": "Your text to check...",
        "options": {"search_depth": "standard"}
    }
)
print(response.json())

Node.js

const response = await fetch("https://your-domain.com/api/v1/scan", {
  method: "POST",
  headers: {
    "Authorization": "Bearer pe_your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    text: "Your text to check...",
    options: { search_depth: "standard" },
  }),
});
const data = await response.json();

GET /api/v1/scan/:scanId

Retrieve a previous scan result by ID.

curl https://your-domain.com/api/v1/scan/scan_abc123 \
  -H "Authorization: Bearer pe_your_api_key"

GET /api/v1/usage

Get your usage statistics and credit balance.

curl https://your-domain.com/api/v1/usage \
  -H "Authorization: Bearer pe_your_api_key"

GET /api/v1/health

Health check endpoint. No authentication required.

curl https://your-domain.com/api/v1/health

Error Codes

HTTPCodeDescription
400TEXT_TOO_SHORTText must be at least 50 characters
400TEXT_TOO_LONGText must be 10,000 characters or fewer
400INVALID_REQUESTRequest body is malformed
401AUTHENTICATION_REQUIREDNo valid authentication provided
401INVALID_API_KEYInvalid or revoked API key
402CREDITS_EXHAUSTEDMonthly credit limit reached
429RATE_LIMIT_EXCEEDEDToo many requests
500PIPELINE_ERRORInternal scanning error
502ML_SERVICE_UNAVAILABLESimilarity engine down

Rate Limits

PlanRequests/minCredits/month
Free10300
Developer2010,000
Business60100,000
Enterprise200Custom

Rate limit headers are included on every API response:

X-RateLimit-Limit: 20
X-RateLimit-Remaining: 18
X-RateLimit-Reset: 1708257660