Red Paper Dashboard
Comprehensive Document Analysis & Plagiarism Detection
API Documentation
Integrate RedPaper plagiarism checking and AI detection into your application.
Authentication
All API requests require an API key. Generate one from API Key Management.
Send your key via the Authorization header:
Authorization: Api-Key YOUR_API_KEY
You can also use Bearer prefix or pass api_key in POST body.
Base URL
https://www.checkplagiarism.ai/api/plagcheck/
Endpoints
Submit Scan — Upload a document for plagiarism checking
POST
/api/plagcheck/scan
Submit a document for plagiarism scanning. Send as
multipart/form-data.
Headers
Authorization
string
Required
API key in format:
Api-Key YOUR_API_KEYRequest Body multipart/form-data
Core
scan_id
string
Required
Unique identifier for this scan (e.g. UUID). Must be unique per request.
file
file
Required
Document file to scan. Supported formats:
.pdf .docx .doc .txt .rtf
filename
string
Optional
Custom filename for the scan. Used in reports and responses.
default: uploaded file name
action
integer
Optional
0 = auto scan — checks credits, deducts, and starts scan automatically. 1 = manual — checks credits, then waits for you to call /start.
webhook_url
string
Required
HTTPS URL for receiving scan results and status updates via webhook.
Scan Options
include_ai
boolean
Optional
Enable AI content detection. Detects AI-generated text and returns AI percentage.
default: false
exclude_references
boolean
Optional
Exclude references/bibliography section from plagiarism analysis.
default: false
exclude_quotes
boolean
Optional
Exclude quoted text from plagiarism analysis.
default: false
include_paraphrasing
boolean
Optional
Include paraphrasing detection in scan results.
default: false
min_copied_words
integer
Optional
Minimum number of consecutive copied words to flag as plagiarism.
default: 3
>= 1
Branding
custom_logo
file
Optional
Custom logo image for the PDF report header. Supported:
.png .jpg .jpeg .svg .webp
title_color
string
Optional
Hex color for report title text (e.g.
default: #991b1b
hex format
#2563eb).
report_title
string
Optional
Custom title for the PDF report header.
default: Red Paper Plagiarism Report
report_subtitle
string
Optional
Custom subtitle for the PDF report header.
default: Official Red Paper Evaluation
submitted_by
string
Optional
Custom name for the "Submitted By" field on reports.
default: account name
Highlight Colors
identical_color
string
Optional
Hex color for identical/copied text highlights in the report.
default: #dc2626
hex format
minor_changes_color
string
Optional
Hex color for minor changes text highlights in the report.
default: #ff8e7a
hex format
related_meaning_color
string
Optional
Hex color for paraphrased text highlights in the report.
default: #fdbc72
hex format
ai_detection_color
string
Optional
Hex color for AI report accents (borders, headings).
default: #4f46e5
hex format
Other
qr_code_url
string
Optional
Custom URL for the QR code on reports and certificates.
default: RedPaper verification link
Response:
{
"success": true,
"message": "Document submitted for scanning",
"data": {
"scan_id": "a1b2c3d4-...",
"filename": "document.pdf",
"status": "pending"
}
}
Start Scan — Begin scanning after credit check (action=1 only)
POST
/api/plagcheck/scan/{scan_id}/start
Start a scan after credit check. Only needed for
action=1 flow — deducts credits and triggers scanning. Not needed for action=0 (auto).
Path Parameters
scan_id
string
Required
The scan ID returned from the Submit Scan endpoint.
Headers
Authorization
string
Required
API key in format:
Api-Key YOUR_API_KEY
Response:
{
"success": true,
"message": "Scan started successfully",
"data": {
"scan_id": "a1b2c3d4-...",
"status": "scanning",
"credits_used": 5,
"credits_remaining": 95
}
}
Check Status — Get current scan status and cost info
POST
/api/plagcheck/status/{scan_id}
Check the current status of a scan. Returns report summary if completed, or cost info if still processing.
Path Parameters
scan_id
string
Required
The scan ID to check status for.
Headers
Authorization
string
Required
API key in format:
Api-Key YOUR_API_KEY
Response (completed scan):
{
"success": true,
"data": {
"scan_id": "a1b2c3d4-...",
"status": "completed",
"similarity_percentage": 25.5,
"is_ai_enabled": true,
"percentage_of_ai_words": 12.3,
"checked_at": "2026-02-12T11:45:03.483081+00:00"
}
}
Response (pending / cost checked):
{
"success": true,
"data": {
"scan_id": "a1b2c3d4-...",
"status": "cost_checked",
"expected_credits": 5,
"total_words": 5000
}
}
Report Detail — Get full plagiarism report with AI detection data
POST
/api/plagcheck/reports/{scan_id}
Get detailed report for a completed scan. Includes similarity breakdown, AI detection, word counts, and certificate info. Only relevant fields are returned — null/unused fields are omitted.
Path Parameters
scan_id
string
Required
The scan ID to retrieve the report for.
Headers
Authorization
string
Required
API key in format:
Api-Key YOUR_API_KEY
Response:
{
"success": true,
"data": {
"scan_id": "a1b2c3d4-...",
"filename": "document.docx",
"status": "completed",
"checked_at": "2026-02-12T11:45:03.483081+00:00",
"has_report_file": true,
"similarity_percentage": 34.9,
"total_words": 5000,
"is_ai_detected": true,
"ai_percentage": 12.3,
"human_percentage": 87.7,
"identical_words": 580,
"identical_percent": 11.6,
"minor_changes_words": 120,
"minor_changes_percent": 2.4,
"num_of_results": 7,
"cert_no": "RP-2026-A162C2A91A",
"scan_options": {
"include_paraphrasing": false,
"exclude_references": false,
"exclude_quotes": false,
"include_ai": true
}
}
}
Note:
ai_percentage, human_percentage only appear when AI detection is enabled. paraphrased_words, paraphrased_percent only appear when paraphrasing is enabled. cert_no only appears for completed scans.
Download Report — Download plagiarism report as PDF
POST
/api/plagcheck/reports/{scan_id}/download
Download the plagiarism report as a PDF file. Returns the PDF binary directly with
Content-Type: application/pdf.
Path Parameters
scan_id
string
Required
The scan ID to download the report for.
Headers
Authorization
string
Required
API key in format:
Api-Key YOUR_API_KEY
Response: PDF file download (
Content-Disposition: attachment)
Error Response:
{
"success": false,
"error": "Report not found"
}
Download Certificate — Generate plagiarism certificate PDF
GET
/api/plagcheck/reports/{scan_id}/certificate
Generate and download a plagiarism certificate PDF for a completed scan. No authentication required — accessible via scan ID.
Path Parameters
scan_id
string
Required
The scan ID to generate the certificate for.
Response: PDF file download (
Content-Disposition: attachment)
Error Response:
{
"success": false,
"error": "Certificate available only for completed reports"
}
Subscription Info — Check credits and subscription status
POST
/api/plagcheck/subscription
Get your subscription and credit information.
Headers
Authorization
string
Required
API key in format:
Api-Key YOUR_API_KEY
Response:
{
"success": true,
"data": {
"has_subscription": true,
"credits_alloted": 100,
"credits_available": 85,
"expires_at": "2026-12-31T23:59:59",
"is_expired": false
}
}
Webhooks
Pass a webhook_url when submitting a scan to receive real-time notifications.
credit_calculation
Sent when credits have been calculated. For action=0, credits are auto-deducted and scanning starts immediately. For action=1, you must call /start manually.
{
"event": "credit_calculation",
"scan_id": "a1b2c3d4-...",
"status": "cost_checked",
"filename": "document.pdf",
"expected_credits": 5,
"total_words": 5000
}
insufficient_credits
Sent when action=0 scan cannot auto-start due to insufficient credits or expired subscription:
{
"event": "credit_calculation",
"scan_id": "a1b2c3d4-...",
"status": "insufficient_credits",
"filename": "document.pdf",
"expected_credits": 5
}
scan_completed
Sent when scan completes successfully:
{
"event": "scan_completed",
"scan_id": "a1b2c3d4-...",
"status": "completed",
"similarity_percentage": 25.5,
"is_ai_detected": true,
"percentage_of_ai_words": 12.3,
"total_words": 5000
}
scan_error
Sent when scan fails:
{
"event": "scan_error",
"scan_id": "a1b2c3d4-...",
"status": "failed",
"filename": "document.pdf"
}
report_ready
Sent when the PDF report has been generated and is ready for download:
{
"event": "report_ready",
"scan_id": "a1b2c3d4-...",
"status": "completed",
"filename": "document.pdf",
"report_url": "https://example.com/media/api_reports/report.pdf",
"similarity_percentage": 25.5,
"is_ai_enabled": true,
"percentage_of_ai_words": 12.3
}
Error Codes
| Status | Meaning |
|---|---|
400 | Bad request — missing or invalid parameters |
401 | Unauthorized — invalid or missing API key |
402 | Payment required — insufficient credits or expired subscription |
404 | Not found — scan or report doesn't exist |
405 | Method not allowed — wrong HTTP method |
500 | Server error — something went wrong on our end |
All errors return:
{
"success": false,
"error": "Error message here"
}
Quick Start — Submit a Scan
curl -X POST https://www.checkplagiarism.ai/api/plagcheck/scan \ -H "Authorization: Api-Key YOUR_API_KEY" \ -F "scan_id=your-unique-scan-id" \ -F "[email protected]" \ -F "webhook_url=https://yoursite.com/webhook" \ -F "action=0" \ -F "include_ai=true" \ # Optional parameters -F "filename=my-report.pdf" \ -F "exclude_references=true" \ -F "exclude_quotes=true" \ -F "include_paraphrasing=true" \ -F "min_copied_words=5" \ # Branding (optional) -F "[email protected]" \ -F "title_color=#2563eb" \ -F "report_title=My Company Report" \ -F "report_subtitle=Plagiarism Analysis" \ -F "submitted_by=John Doe" \ # Highlight colors (optional) -F "identical_color=#dc2626" \ -F "minor_changes_color=#ff8e7a" \ -F "related_meaning_color=#fdbc72" \ -F "ai_detection_color=#4f46e5"
import requests url = "https://www.checkplagiarism.ai/api/plagcheck/scan" headers = {"Authorization": "Api-Key YOUR_API_KEY"} with open("document.pdf", "rb") as f: response = requests.post( url, headers=headers, files={ "file": f, # "custom_logo": open("logo.png", "rb"), # optional }, data={ "scan_id": "your-unique-scan-id", "webhook_url": "https://yoursite.com/webhook", "action": 0, "include_ai": "true", # Optional parameters # "filename": "my-report.pdf", # "exclude_references": "true", # "exclude_quotes": "true", # "include_paraphrasing": "true", # "min_copied_words": "5", # Branding # "title_color": "#2563eb", # "report_title": "My Company Report", # "report_subtitle": "Plagiarism Analysis", # "submitted_by": "John Doe", # Highlight colors # "identical_color": "#dc2626", # "minor_changes_color": "#ff8e7a", # "related_meaning_color": "#fdbc72", # "ai_detection_color": "#4f46e5", } ) print(response.json())
const fs = require("fs"); const form = new FormData(); form.append("scan_id", "your-unique-scan-id"); form.append("file", fs.createReadStream("document.pdf")); form.append("webhook_url", "https://yoursite.com/webhook"); form.append("action", "0"); form.append("include_ai", "true"); // Optional parameters // form.append("filename", "my-report.pdf"); // form.append("exclude_references", "true"); // form.append("exclude_quotes", "true"); // form.append("include_paraphrasing", "true"); // form.append("min_copied_words", "5"); // Branding // form.append("custom_logo", fs.createReadStream("logo.png")); // form.append("title_color", "#2563eb"); // form.append("report_title", "My Company Report"); // form.append("report_subtitle", "Plagiarism Analysis"); // form.append("submitted_by", "John Doe"); // Highlight colors // form.append("identical_color", "#dc2626"); // form.append("minor_changes_color", "#ff8e7a"); // form.append("related_meaning_color", "#fdbc72"); // form.append("ai_detection_color", "#4f46e5"); const res = await fetch("https://www.checkplagiarism.ai/api/plagcheck/scan", { method: "POST", headers: { "Authorization": "Api-Key YOUR_API_KEY" }, body: form, }); const data = await res.json(); console.log(data);
<?php $url = "https://www.checkplagiarism.ai/api/plagcheck/scan"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Api-Key YOUR_API_KEY" ]); curl_setopt($ch, CURLOPT_POSTFIELDS, [ "scan_id" => "your-unique-scan-id", "file" => new CURLFile("document.pdf"), "webhook_url" => "https://yoursite.com/webhook", "action" => "0", "include_ai" => "true", // Optional parameters // "filename" => "my-report.pdf", // "exclude_references" => "true", // "exclude_quotes" => "true", // "include_paraphrasing" => "true", // "min_copied_words" => "5", // Branding // "custom_logo" => new CURLFile("logo.png"), // "title_color" => "#2563eb", // "report_title" => "My Company Report", // "report_subtitle" => "Plagiarism Analysis", // "submitted_by" => "John Doe", // Highlight colors // "identical_color" => "#dc2626", // "minor_changes_color" => "#ff8e7a", // "related_meaning_color" => "#fdbc72", // "ai_detection_color" => "#4f46e5", ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response;
import java.io.*; import java.net.http.*; import java.nio.file.*; var boundary = "----FormBoundary" + System.currentTimeMillis(); var filePath = Path.of("document.pdf"); var fileBytes = Files.readAllBytes(filePath); var body = new StringBuilder(); body.append("--" + boundary + "\r\n"); body.append("Content-Disposition: form-data; name=\"file\"; filename=\"document.pdf\"\r\n"); body.append("Content-Type: application/pdf\r\n\r\n"); // append file bytes, then add text fields: // scan_id, webhook_url, action, include_ai // Optional: filename, exclude_references, exclude_quotes, // include_paraphrasing, min_copied_words // Branding: title_color, report_title, report_subtitle, // submitted_by, custom_logo (file) // Colors: identical_color, minor_changes_color, // related_meaning_color, ai_detection_color var client = HttpClient.newHttpClient(); var request = HttpRequest.newBuilder() .uri(URI.create("https://www.checkplagiarism.ai/api/plagcheck/scan")) .header("Authorization", "Api-Key YOUR_API_KEY") .header("Content-Type", "multipart/form-data; boundary=" + boundary) .POST(HttpRequest.BodyPublishers.ofByteArray(bodyBytes)) .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body());
package main import ( "bytes" "fmt" "io" "mime/multipart" "net/http" "os" ) func main() { body := &bytes.Buffer{} writer := multipart.NewWriter(body) file, _ := os.Open("document.pdf") part, _ := writer.CreateFormFile("file", "document.pdf") io.Copy(part, file) writer.WriteField("scan_id", "your-unique-scan-id") writer.WriteField("webhook_url", "https://yoursite.com/webhook") writer.WriteField("action", "0") writer.WriteField("include_ai", "true") // Optional parameters // writer.WriteField("filename", "my-report.pdf") // writer.WriteField("exclude_references", "true") // writer.WriteField("exclude_quotes", "true") // writer.WriteField("include_paraphrasing", "true") // writer.WriteField("min_copied_words", "5") // Branding // writer.WriteField("title_color", "#2563eb") // writer.WriteField("report_title", "My Company Report") // writer.WriteField("report_subtitle", "Plagiarism Analysis") // writer.WriteField("submitted_by", "John Doe") // Highlight colors // writer.WriteField("identical_color", "#dc2626") // writer.WriteField("minor_changes_color", "#ff8e7a") // writer.WriteField("related_meaning_color", "#fdbc72") // writer.WriteField("ai_detection_color", "#4f46e5") writer.Close() req, _ := http.NewRequest("POST", "https://www.checkplagiarism.ai/api/plagcheck/scan", body) req.Header.Set("Authorization", "Api-Key YOUR_API_KEY") req.Header.Set("Content-Type", writer.FormDataContentType()) resp, _ := http.DefaultClient.Do(req) respBody, _ := io.ReadAll(resp.Body) fmt.Println(string(respBody)) }
Check Status
curl -X POST https://www.checkplagiarism.ai/api/plagcheck/status/SCAN_ID \ -H "Authorization: Api-Key YOUR_API_KEY"
response = requests.post(
"https://www.checkplagiarism.ai/api/plagcheck/status/SCAN_ID",
headers={"Authorization": "Api-Key YOUR_API_KEY"}
)
print(response.json())POST /api/plagcheck/status/SCAN_ID HTTP/1.1 Host: www.checkplagiarism.ai Authorization: Api-Key YOUR_API_KEY
const res = await fetch("https://www.checkplagiarism.ai/api/plagcheck/status/SCAN_ID", { method: "POST", headers: { "Authorization": "Api-Key YOUR_API_KEY" }, }); console.log(await res.json());
$ch = curl_init("https://www.checkplagiarism.ai/api/plagcheck/status/SCAN_ID"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Api-Key YOUR_API_KEY"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); echo curl_exec($ch);
var client = HttpClient.newHttpClient(); var request = HttpRequest.newBuilder() .uri(URI.create("https://www.checkplagiarism.ai/api/plagcheck/status/SCAN_ID")) .header("Authorization", "Api-Key YOUR_API_KEY") .POST(HttpRequest.BodyPublishers.noBody()) .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body());
require "net/http" require "json" uri = URI("https://www.checkplagiarism.ai/api/plagcheck/status/SCAN_ID") req = Net::HTTP::Post.new(uri) req["Authorization"] = "Api-Key YOUR_API_KEY" res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) } puts JSON.parse(res.body)
req, _ := http.NewRequest("POST", "https://www.checkplagiarism.ai/api/plagcheck/status/SCAN_ID", nil) req.Header.Set("Authorization", "Api-Key YOUR_API_KEY") resp, _ := http.DefaultClient.Do(req) body, _ := io.ReadAll(resp.Body) fmt.Println(string(body))
Get Report
curl -X POST https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID \ -H "Authorization: Api-Key YOUR_API_KEY"
response = requests.post(
"https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID",
headers={"Authorization": "Api-Key YOUR_API_KEY"}
)
print(response.json())POST /api/plagcheck/reports/SCAN_ID HTTP/1.1 Host: www.checkplagiarism.ai Authorization: Api-Key YOUR_API_KEY
const res = await fetch("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID", { method: "POST", headers: { "Authorization": "Api-Key YOUR_API_KEY" }, }); console.log(await res.json());
$ch = curl_init("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Api-Key YOUR_API_KEY"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); echo curl_exec($ch);
var client = HttpClient.newHttpClient(); var request = HttpRequest.newBuilder() .uri(URI.create("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID")) .header("Authorization", "Api-Key YOUR_API_KEY") .POST(HttpRequest.BodyPublishers.noBody()) .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body());
require "net/http" require "json" uri = URI("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID") req = Net::HTTP::Post.new(uri) req["Authorization"] = "Api-Key YOUR_API_KEY" res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) } puts JSON.parse(res.body)
req, _ := http.NewRequest("POST", "https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID", nil) req.Header.Set("Authorization", "Api-Key YOUR_API_KEY") resp, _ := http.DefaultClient.Do(req) body, _ := io.ReadAll(resp.Body) fmt.Println(string(body))
Download Certificate
curl -X GET "https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/certificate" \ -o certificate.pdf
response = requests.get(
"https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/certificate"
)
with open("certificate.pdf", "wb") as f:
f.write(response.content)GET /api/plagcheck/reports/SCAN_ID/certificate HTTP/1.1 Host: www.checkplagiarism.ai
const res = await fetch("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/certificate"); const blob = await res.blob(); // Save blob as file
$ch = curl_init("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/certificate"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); file_put_contents("certificate.pdf", curl_exec($ch));
import java.net.http.*; import java.nio.file.*; HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/certificate")) .GET() .build(); HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray()); Files.write(Path.of("certificate.pdf"), response.body());
require 'net/http' uri = URI("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/certificate") response = Net::HTTP.get_response(uri) File.open("certificate.pdf", "wb") { |f| f.write(response.body) }
resp, err := http.Get("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/certificate") if err != nil { log.Fatal(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) os.WriteFile("certificate.pdf", body, 0644)
Download Report PDF
curl -X POST https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/download \ -H "Authorization: Api-Key YOUR_API_KEY" \ -o report.pdf
response = requests.post(
"https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/download",
headers={"Authorization": "Api-Key YOUR_API_KEY"}
)
with open("report.pdf", "wb") as f:
f.write(response.content)POST /api/plagcheck/reports/SCAN_ID/download HTTP/1.1 Host: www.checkplagiarism.ai Authorization: Api-Key YOUR_API_KEY
const res = await fetch("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/download", { method: "POST", headers: { "Authorization": "Api-Key YOUR_API_KEY" }, }); const blob = await res.blob(); // Save blob as file
$ch = curl_init("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/download"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Api-Key YOUR_API_KEY"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); file_put_contents("report.pdf", curl_exec($ch));
import java.net.http.*; import java.nio.file.*; HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/download")) .header("Authorization", "Api-Key YOUR_API_KEY") .POST(HttpRequest.BodyPublishers.noBody()) .build(); HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray()); Files.write(Path.of("report.pdf"), response.body());
require 'net/http' uri = URI("https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/download") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Post.new(uri) request["Authorization"] = "Api-Key YOUR_API_KEY" response = http.request(request) File.open("report.pdf", "wb") { |f| f.write(response.body) }
req, _ := http.NewRequest("POST", "https://www.checkplagiarism.ai/api/plagcheck/reports/SCAN_ID/download", nil) req.Header.Set("Authorization", "Api-Key YOUR_API_KEY") resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) os.WriteFile("report.pdf", body, 0644)