Getting Started
The TextSight.ai API lets you integrate AI content detection, humanization scoring, readability analysis, and AI-powered rewriting into your own applications. Get started in 3 simple steps.
Create an Account
Sign up at app.textsightai.com and upgrade to a Pro or Enterprise plan. API access is available on paid plans.
Generate an API Key
Go to Settings → API Keys in your dashboard and create a new key. Copy and store it securely — it won't be shown again.
Make Your First Request
Use your API key in the x-api-key header to authenticate requests to any endpoint.
Quick Example
curl -X POST https://app.textsightai.com/api/scan \
-H "x-api-key: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"text": "Your content to analyze goes here. It must be at least 100 characters long for accurate detection results."
}'
Authentication
All API requests require authentication via an API key. Include your key in the x-api-key header with every request.
sk_live_ followed by 64 hex characters. Example: sk_live_a1b2c3d4e5f6...
Authentication Header
x-api-key: sk_live_your_api_key_here
Rate Limits
API usage is governed by your plan's character limits. Each scan deducts from your daily character allowance.
| Plan | Daily Characters | Bulk Items | API Keys |
|---|---|---|---|
| Free | 15,000 / day | Not available | Not available |
| Pro | Unlimited | 50 per job | Up to 5 |
| Enterprise | Unlimited | 500 per job | Up to 5 |
Each API response includes a usage object showing characters consumed and remaining balance.
Error Handling
All errors return a consistent JSON format with a success: false field and a human-readable message.
{
"success": false,
"message": "Text must be at least 100 characters long"
}
/api/scan
All Plans
Scan Text
Analyze text for AI-generated content. Returns humanization score, AI probability, confidence level, per-sentence analysis, readability metrics, and content statistics.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
text |
string | Required | The text content to analyze. Minimum 100 characters. |
Example Request
curl -X POST https://app.textsightai.com/api/scan \
-H "x-api-key: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "The text you want to analyze for AI content detection..."}'
Response
{
"success": true,
"data": {
"scanId": "clx1abc2d3ef4gh5",
"humanizationScore": 72,
"aiProbability": 28,
"confidence": 94,
"reasoning": "The text shows mostly human writing patterns...",
"aiModel": "TextSight V9",
"language": "English",
"aiClassification": "Mostly Human",
"sentences": [
{ "text": "First sentence of the content.", "aiScore": 12 },
{ "text": "Second sentence analyzed.", "aiScore": 45 }
],
"readability": {
"gradeLevel": 8.2,
"level": "HighSchool",
"fleschScore": 65.4,
"sentenceCount": 12,
"paragraphCount": 3,
"avgWordsPerSentence": 16.5
},
"stats": {
"wordCount": 198,
"sentenceCount": 12,
"paragraphCount": 3,
"avgWordsPerSentence": 16.5
},
"usage": {
"charactersUsed": 1150,
"remainingToday": "unlimited"
},
"processingTimeMs": 1247
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
humanizationScore | number | 0-100. Higher = more human-like. |
aiProbability | number | 0-100. Probability the text is AI-generated. |
confidence | number | 0-100. Confidence level of the detection. |
sentences | array | Per-sentence AI score analysis. |
readability | object | Grade level, Flesch score, and text statistics. |
usage | object | Characters used and remaining daily balance. |
/api/scan/url
All Plans
Scan URL
Extract text content from a URL and analyze it for AI-generated content. Supports any publicly accessible web page. Maximum 50,000 characters extracted.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | Required | A valid, publicly accessible URL to extract and analyze. |
Example Request
curl -X POST https://app.textsightai.com/api/scan/url \
-H "x-api-key: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/blog-post"}'
The response is identical to the Scan Text endpoint, with an additional sourceUrl field containing the scanned URL.
/api/pdf/analyze
All Plans
PDF Analysis
Upload and analyze a PDF document for AI-generated content. Supports page-by-page analysis for Pro and Enterprise users. Maximum file size: 10MB.
Request (multipart/form-data)
| Parameter | Type | Required | Description |
|---|---|---|---|
file |
file | Required | PDF file to analyze. Max 10MB. |
pageByPage |
string | Optional | "true" for per-page results. Pro+ for multi-page. Free tier limited to 3 pages. |
Example Request
curl -X POST https://app.textsightai.com/api/pdf/analyze \
-H "x-api-key: sk_live_your_api_key_here" \
-F "file=@document.pdf" \
-F "pageByPage=true"
Response
{
"success": true,
"data": {
"scanId": "clx1abc...",
"fileName": "document.pdf",
"totalPages": 5,
"analyzedPages": 5,
"pageByPage": true,
"language": "English",
"aiModel": "TextSight V9",
"overall": {
"humanizationScore": 68,
"aiProbability": 32,
"confidence": 91
},
"pages": [
{
"pageNumber": 1,
"humanizationScore": 75,
"aiProbability": 25,
"confidence": 93,
"content": "First 500 chars of page...",
"readability": { "gradeLevel": 9.1 },
"stats": { "characters": 2400, "words": 380 }
}
],
"processingTimeMs": 3200
}
}
/api/docx/analyze
All Plans
DOCX Analysis
Upload and analyze a Word document (.docx or .doc) for AI-generated content. Maximum file size: 10MB. Minimum 100 characters of extracted text.
Request (multipart/form-data)
| Parameter | Type | Required | Description |
|---|---|---|---|
file |
file | Required | Word document (.docx or .doc). Max 10MB. |
Example Request
curl -X POST https://app.textsightai.com/api/docx/analyze \
-H "x-api-key: sk_live_your_api_key_here" \
-F "file=@essay.docx"
The response follows the same structure as the Scan Text endpoint.
/api/bulk
Pro+
Create Bulk Job
Create a bulk scan job with multiple items. Supports text items, URLs, or a mix. Pro plans support up to 50 items; Enterprise supports 500.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | Required | A descriptive name for the bulk job. |
items |
array | Required | Array of text strings, or objects with text/title/url fields. |
inputType |
string | Required | "text", "csv", or "urls" |
Example Request
curl -X POST https://app.textsightai.com/api/bulk \
-H "x-api-key: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Blog Posts Batch",
"inputType": "text",
"items": [
"First article text content here (min 100 chars)...",
"Second article text content here (min 100 chars)..."
]
}'
/api/bulk/:id/process
Pro+
Process Bulk Job
Start processing a previously created bulk job. Items are processed sequentially and progress is tracked per item.
Example Request
curl -X POST https://app.textsightai.com/api/bulk/JOB_ID/process \
-H "x-api-key: sk_live_your_api_key_here"
/api/bulk/:id
Pro+
Get Bulk Results
Retrieve the details and results of a bulk scan job, including individual item scores.
Example Request
curl https://app.textsightai.com/api/bulk/JOB_ID \
-H "x-api-key: sk_live_your_api_key_here"
/api/bulk/:id/csv
Pro+
Export CSV
Download bulk scan results as a CSV file. Includes columns for index, title, status, AI score, human score, confidence, language, word count, and characters.
Example Request
curl https://app.textsightai.com/api/bulk/JOB_ID/csv \
-H "x-api-key: sk_live_your_api_key_here" \
-o results.csv
/api/rewrite
Pro+
Rewrite Sentences
Rewrite specific AI-detected sentences to sound more human. Pass an array of sentences and receive rewritten versions.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
sentences |
string[] | Required | Array of sentences to rewrite. |
Example Request
curl -X POST https://app.textsightai.com/api/rewrite \
-H "x-api-key: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"sentences": ["This sentence was flagged as AI.", "Another detected sentence."]}'
/api/rewrite/document
Pro+
Rewrite Document
Rewrite an entire document to sound more human. Supports casual and formal writing styles. Text must be 50-10,000 characters.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
text |
string | Required | The document text to rewrite (50-10,000 characters). |
style |
string | Optional | "casual" or "formal". Default: casual. |
Example Request
curl -X POST https://app.textsightai.com/api/rewrite/document \
-H "x-api-key: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "Your document content here...", "style": "formal"}'
/api/api-keys
Pro+
List API Keys
Retrieve all API keys for your account. Keys are returned with a prefix only — the full key is never shown after creation.
Example Request
curl https://app.textsightai.com/api/api-keys \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
/api/api-keys
Pro+
Create API Key
Generate a new API key. The full key is returned only once in the response — store it securely. Maximum 5 keys per account.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | Optional | A friendly name for the key (e.g., "Production", "Staging"). |
/api/api-keys/:id
Pro+
Update API Key
Update an API key's name or active status. Deactivating a key immediately revokes its access.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | Optional | New name for the API key. |
isActive |
boolean | Optional | Set to false to deactivate the key. |
/api/api-keys/:id
Pro+
Delete API Key
Permanently delete an API key. This action cannot be undone. Any requests using this key will immediately fail.
Status Codes
The API uses standard HTTP status codes to indicate success or failure.
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request succeeded. |
| 201 | Created | Resource created successfully. |
| 400 | Bad Request | Invalid parameters (e.g., text too short, invalid URL). |
| 401 | Unauthorized | Missing or invalid API key. |
| 403 | Forbidden | Feature not available on your plan (e.g., bulk on Free tier). |
| 404 | Not Found | Resource not found or doesn't belong to your account. |
| 429 | Too Many Requests | Rate limit exceeded. Wait and retry. |
| 500 | Server Error | Something went wrong on our end. Please retry. |
Plan Limits
Feature availability and limits by subscription plan.
| Feature | Free | Pro | Enterprise |
|---|---|---|---|
| Text Scan | 15K chars/day | Unlimited | Unlimited |
| URL Scan | 15K chars/day | Unlimited | Unlimited |
| PDF Analysis | 15K chars, 3 pages | 100K chars, 50 pages | 100K chars, 50 pages |
| DOCX Analysis | 15K chars | Unlimited | Unlimited |
| Bulk Scans | — | 50 items/job | 500 items/job |
| Rewrite | — | Available | Available |
| API Keys | — | Up to 5 | Up to 5 |