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
| HTTP | Code | Description |
|---|---|---|
| 400 | TEXT_TOO_SHORT | Text must be at least 50 characters |
| 400 | TEXT_TOO_LONG | Text must be 10,000 characters or fewer |
| 400 | INVALID_REQUEST | Request body is malformed |
| 401 | AUTHENTICATION_REQUIRED | No valid authentication provided |
| 401 | INVALID_API_KEY | Invalid or revoked API key |
| 402 | CREDITS_EXHAUSTED | Monthly credit limit reached |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests |
| 500 | PIPELINE_ERROR | Internal scanning error |
| 502 | ML_SERVICE_UNAVAILABLE | Similarity engine down |
Rate Limits
| Plan | Requests/min | Credits/month |
|---|---|---|
| Free | 10 | 300 |
| Developer | 20 | 10,000 |
| Business | 60 | 100,000 |
| Enterprise | 200 | Custom |
Rate limit headers are included on every API response:
X-RateLimit-Limit: 20 X-RateLimit-Remaining: 18 X-RateLimit-Reset: 1708257660