API Documentation: /api/check
Base URL
https://checker.scan-ai.app
Endpoint
POST /api/check
Description
This endpoint allows you to check a document for AI-generated content and receive an analysis report.
Authentication
Authentication is required for this endpoint. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Request
Headers
Content-Type
:application/json
ormultipart/form-data
(when uploading a file)Authorization
:Bearer YOUR_API_KEY
Body
You must provide exactly one of the following:
text
(string): The text content to be analyzed.url
(string): A URL pointing to the document to be analyzed.file
(file upload): A file to be analyzed.
Supported File Types
- .txt
- .docx
- .pptx
Constraints
- The document must contain at least 350 words.
- The document must not exceed 25,000 words.
Response
Success Response (200 OK)
{
"page_count": number,
"language": string,
"ai_detection_score": number,
"ai_paraphrase_score": number,
"sentenses": [
{
"labels": string[],
"textSegments": [number, number][]
}
]
}
page_count
: The number of pages in the document.language
: The detected language of the document.ai_detection_score
: The percentage of content detected as AI-generated (0-100).ai_paraphrase_score
: The percentage of content detected as AI-paraphrased (0-100).sentenses
: An array of objects representing analyzed sentences, where:labels
: An array of strings indicating the AI detection labels for the sentence.textSegments
: An array of number pairs, each representing the start and end positions of text segments within the sentence.
Error Responses
400 Bad Request
- When multiple input methods are provided or when the input is invalid.
- When the word count is less than 350 or more than 25,000.
401 Unauthorized
- When no API key is provided or the API key is invalid.
- When the user has insufficient balance.
500 Internal Server Error
- When an unexpected error occurs during processing.
Examples
Example 1: Checking text content
curl -X POST https://checker.scan-ai.app/api/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Your text content here..."}'
Example 2: Checking a file
curl -X POST https://checker.scan-ai.app/api/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "file=@/path/to/your/file.pdf"
Example 3: Checking a URL
curl -X POST https://checker.scan-ai.app/api/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/document.docx"}'
Notes
- Ensure you have sufficient balance in your account to use this API.
- Processing large documents may take some time. The API implements a polling mechanism with a timeout of 10 minutes.
- After a successful check, one credit will be deducted from your account balance.