Our AI detection models just got upgraded. They now catch ChatGPT and Claude in student code more accurately than ever. See what's new
Developer API

Code Plagiarism
Detection API

Build plagiarism detection into your apps. Check code against 20+ billion sources.

const response = await fetch('https://codequiry.com/api/v1/check', { method: 'POST', headers: { 'apikey': 'YOUR_API_KEY' }, body: formData }); // Check created!
START ANALYSIS

Start Plagiarism Detection Analysis

Trigger the plagiarism detection process on your uploaded files. This endpoint initiates the actual analysis that compares your code against other submissions in the check, external databases, and web sources to detect similarities and potential plagiarism.

API Endpoint
POST https://codequiry.com/api/v1/check/start

How Analysis Works

After uploading your source code files, this endpoint starts the plagiarism detection engine. The analysis compares your submissions against each other (peer comparison) and optionally against external sources (web and database checks). Processing typically completes in 1-5 minutes depending on file count and check type.

Processing Time: Most analyses complete within 1-5 minutes. Large checks with many files or comprehensive web/database searches may take longer. Use the Get Check Status endpoint to monitor progress.
What Happens During Analysis
Peer Comparison

Your uploaded files are compared against each other to detect collaboration or code sharing

Database Search

Code compared against our plagiarism database of academic and historical submissions

Web Matching

Intelligent web search across 20+ billion sources including GitHub and Stack Overflow

Score Calculation

Plagiarism scores calculated and detailed reports generated with line-by-line comparisons

Request Parameters

Configure your analysis by specifying the check ID and optional parameters to customize the detection process.

Parameter Type Required Description
check_id Integer Required ID of the check to start (must have uploaded files)
dbcheck Boolean Optional Database comparison toggle (1/0). Only takes effect when webcheck is also supplied; the pair selects the engine (see test_type).
webcheck Boolean Optional Web search comparison toggle (1/0). Only takes effect when dbcheck is also supplied; the pair selects the engine (see test_type).
test_type Integer Optional Analysis engine ID. Must reference an approved engine (see reference below). When omitted, the check keeps its existing engine. If both webcheck and dbcheck are supplied, they override this: both 0 sets engine 9, both 1 sets engine 1.
Example Requests
Full Analysis (Recommended)
curl -X POST \
  'https://codequiry.com/api/v1/check/start?check_id=2810' \
  -H 'Accept: application/json' \
  -H 'apikey:  YOUR_API_KEY_HERE '

Includes peer comparison, database, and web searches

Peer-Only Analysis
curl -X POST \
  'https://codequiry.com/api/v1/check/start?check_id=2810&dbcheck=0&webcheck=0' \
  -H 'Accept: application/json' \
  -H 'apikey:  YOUR_API_KEY_HERE '

Compares only uploaded submissions against each other

Success Response
        {
    "success": true,
    "check": {
        "id": 2810,
        "name": "Python Assignment Check",
        "created_at": "2024-01-15 14:30:22",
        "updated_at": "2024-01-15 14:50:18",
        "status_id": 7,
        "status_message": "Waiting for the server to pick up your check",
        "test_type": 1
    },
    "status": "Queued",
    "submission_count": 5,
    "checkURL": "https://dashboard.codequiry.com/course/api/assignment/2810"
}
        
JSON Response
Understanding the Response
  • success — Indicates the analysis was successfully started
  • check — The full check (assignment) record. After a successful start it has status_id: 7 (Queued) and status_message: "Waiting for the server to pick up your check"
  • check.test_type — The engine ID the analysis will run with
  • status — Human-readable status description for display purposes
  • submission_count — Number of files being analyzed in this check
  • checkURL — Direct link to view real-time progress in the Codequiry dashboard
Testing Note: This endpoint requires a valid check_id with uploaded files. Create a check and upload files first before testing analysis start.

Analysis Engine Types

Choose the appropriate analysis engine based on your use case. Each engine is optimized for different scenarios:

ID Engine Type Best For Description
1 Web + Group Similarity General Use Complete analysis including web search and peer comparison (recommended default)
9 Group Similarity Only Student Assignments Compare only uploaded files—free MOSS alternative for classroom use
10 Group + Auto Base Code Template Projects Automatically detects and excludes common template code
6 Large Volume Group 100+ Files Optimized for processing many submissions efficiently
3 Small Files Checker Code Snippets Specialized for analyzing small code fragments under 100 lines
12 Group (30% Tolerance) Educational Use More lenient similarity detection for learning environments
Educational Tip: For classroom assignments where you only want to compare student submissions against each other, use engine type 9 (Group Similarity Only). This is faster and doesn't consume web/database search checks.

Error Responses & Troubleshooting

Invalid Check ID (422 Unprocessable Entity)
        {
    "error": "Invalid check_id provided."
}
        
Error Response
Common Start Errors
No Submissions (422)

Cause: Check has no submissions to analyze

Response: "You must have at least 1 submission with parseable content to start checking!" Upload at least one file first.

Services Offline (503)

Cause: Core checking services are temporarily unavailable

Response: "Core checking services are currently offline for maintenance, please try again later." Retry shortly.

Already Processing (409)

Cause: Check is already being analyzed (status_id = 6)

Response: "Your assignment is still being checked!" Wait for the current run to finish.

Invalid test_type (422)

Cause: test_type does not reference an approved engine

Response: "Invalid test_type — must reference an approved engine ID." Use an approved engine ID from the list above.

Best Practices & Tips

Engine Selection
  • Use engine 9 for student assignments
  • Use engine 1 for comprehensive analysis
  • Use engine 10 for template-based projects
  • Test different engines for optimal results
Timing
  • Start only when all files uploaded
  • Monitor progress with Get Check Status
  • Allow 1-5 minutes for completion
  • Don't restart already running checks
Cost Optimization
  • Use peer-only checks to save quota
  • Group related files in single checks
  • Test with small batches first
  • Monitor usage in dashboard
Performance
  • Smaller file sets process faster
  • Peer-only is faster than full analysis
  • Use appropriate engine for file count
  • Poll status every 15-30 seconds