API Documentation

OriginalityAI REST API Reference

Interactive Swagger UI

Quick Start

1. Get API Key

Sign up and generate an API key from the dashboard.

2. Make Request

Send a POST to /api/v1/checks with your content.

3. Get Results

Poll the check endpoint until status is completed.

Example Request

curl -X POST http://localhost:8000/api/v1/checks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The quick brown fox jumps over the lazy dog..."
  }'

Example Response

{
  "id": "chk_abc123",
  "status": "processing",
  "created_at": "2026-03-02T10:30:00Z"
}

// After polling:
{
  "id": "chk_abc123",
  "status": "completed",
  "plagiarism_score": 0.12,
  "ai_score": 0.87,
  "word_count": 150,
  "ai_model_scores": [
    { "model_name": "transformer", "score": 0.91, "label": "AI Generated" },
    { "model_name": "perplexity", "score": 0.85, "label": "AI Generated" },
    { "model_name": "stylometric", "score": 0.82, "label": "AI Generated" },
    { "model_name": "embedding", "score": 0.89, "label": "AI Generated" }
  ],
  "ai_sentences": [
    { "text": "The quick brown fox...", "score": 0.92, "start": 0, "end": 24 }
  ],
  "plagiarism_sources": [
    { "url": "https://example.com", "title": "Example", "similarity": 0.15, "matched_text": "..." }
  ]
}

Authentication

All API requests require authentication via a Bearer token. You can use either a JWT access token (from login) or an API key (from the dashboard).

Authorization: Bearer your_token_here

Endpoints

POST
/api/v1/auth/register

Create a new user account

{ "email": "user@example.com", "password": "...", "full_name": "John Doe" }
POST
/api/v1/auth/login

Authenticate and receive JWT tokens

{ "email": "user@example.com", "password": "..." }
POST
/api/v1/checks

Submit text or file for plagiarism + AI detection

{ "text": "Content to analyze..." }  OR  multipart/form-data with file field
GET
/api/v1/checks/:id

Get check status and results

GET
/api/v1/checks

List all checks with pagination

GET
/api/v1/checks/:id/report/pdf

Download PDF report for a completed check

POST
/api/v1/api-keys

Generate a new API key

{ "name": "My Key" }
GET
/api/v1/api-keys

List all API keys

DELETE
/api/v1/api-keys/:id

Revoke an API key

Rate Limits

PlanRate LimitMonthly Checks
Free10 req/min5
Pro30 req/min100
API Starter60 req/min500
API Scale120 req/min5,000

For full interactive API documentation, visit the Swagger UI.