Features How It Works Pricing Compare Use Cases About Contact
Sign In Get Started Free
Developer Documentation

API Reference

Integrate TextSight.ai AI content detection into your applications with our REST API.

Base URL: https://app.textsightai.com

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.

1
Create an Account

Sign up at app.textsightai.com and upgrade to a Pro or Enterprise plan. API access is available on paid plans.

2
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.

3
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.

API Key Format: Keys start with sk_live_ followed by 64 hex characters. Example: sk_live_a1b2c3d4e5f6...

Authentication Header

x-api-key: sk_live_your_api_key_here
Important: Keep your API key secure. Never expose it in client-side code, public repositories, or browser requests. API keys are only available on Pro and Enterprise plans. You can create up to 5 keys per account.

Rate Limits

API usage is governed by your plan's character limits. Each scan deducts from your daily character allowance.

PlanDaily CharactersBulk ItemsAPI Keys
Free15,000 / dayNot availableNot available
ProUnlimited50 per jobUp to 5
EnterpriseUnlimited500 per jobUp 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"
}
POST /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

ParameterTypeRequiredDescription
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

FieldTypeDescription
humanizationScorenumber0-100. Higher = more human-like.
aiProbabilitynumber0-100. Probability the text is AI-generated.
confidencenumber0-100. Confidence level of the detection.
sentencesarrayPer-sentence AI score analysis.
readabilityobjectGrade level, Flesch score, and text statistics.
usageobjectCharacters used and remaining daily balance.
POST /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

ParameterTypeRequiredDescription
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.

POST /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)

ParameterTypeRequiredDescription
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
  }
}
POST /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)

ParameterTypeRequiredDescription
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.

POST /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

ParameterTypeRequiredDescription
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)..."
    ]
  }'
POST /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"
GET /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"
GET /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
POST /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

ParameterTypeRequiredDescription
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."]}'
POST /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

ParameterTypeRequiredDescription
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"}'
GET /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"
Note: API key management endpoints require JWT Bearer token authentication, not API key auth. Use the token from your login session.
POST /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

ParameterTypeRequiredDescription
name string Optional A friendly name for the key (e.g., "Production", "Staging").
PATCH /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

ParameterTypeRequiredDescription
name string Optional New name for the API key.
isActive boolean Optional Set to false to deactivate the key.
DELETE /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.

CodeStatusDescription
200OKRequest succeeded.
201CreatedResource created successfully.
400Bad RequestInvalid parameters (e.g., text too short, invalid URL).
401UnauthorizedMissing or invalid API key.
403ForbiddenFeature not available on your plan (e.g., bulk on Free tier).
404Not FoundResource not found or doesn't belong to your account.
429Too Many RequestsRate limit exceeded. Wait and retry.
500Server ErrorSomething went wrong on our end. Please retry.

Plan Limits

Feature availability and limits by subscription plan.

FeatureFreeProEnterprise
Text Scan15K chars/dayUnlimitedUnlimited
URL Scan15K chars/dayUnlimitedUnlimited
PDF Analysis15K chars, 3 pages100K chars, 50 pages100K chars, 50 pages
DOCX Analysis15K charsUnlimitedUnlimited
Bulk Scans50 items/job500 items/job
RewriteAvailableAvailable
API KeysUp to 5Up to 5

Ready to Integrate?

Get your API key and start detecting AI content in minutes.

Get Started Free