REST API v2 · stable

Detect & rewrite, at scale.

JSON-in, JSON-out. p95 latency 380ms. Streaming bulk endpoint. SDKs for Python, Node, PHP, Ruby, and Go.

99.99%
Uptime · last 90 days
380ms
p95 latency
5
Official SDKs
10K → 50K
Calls / mo · Biz → Ent

Introduction

The TextSight API exposes everything you can do in the dashboard. Detect AI content. Run the AI Rewriter. Pull per-sentence scores. Submit batches of up to 10,000 docs in one call.

Base URL: https://api.textsight.ai/v2

All requests use JSON. All responses are JSON. We don't have form-encoded fallbacks — if you need them, raise an issue on GitHub.

Available on

Free / StarterNot included
ProDetect only · 1,000 calls/mo
Business10,000 calls/mo · all endpoints
Enterprise50,000 calls/mo · webhooks · SLA

Authentication

Bearer token in every request. Generate one in Settings → API Keys. Keep it server-side; never in client JS.

Header Authorization: Bearer ts_live_…

Token types

PrefixUse
ts_test_…Sandbox — free, doesn't count toward your quota, returns fake data.
ts_live_…Production — counts toward your monthly quota.
ts_admin_…Enterprise only — can rotate other tokens, view audit logs.

Errors & rate limits

Standard HTTP status codes. JSON error body with code, message, and request_id for support.

StatusMeaning
200OK
400Bad request — invalid params, see message
401Missing or invalid API key
402Plan doesn't include this endpoint — upgrade
429Rate limited — slow down, see Retry-After header
500Our problem. Try again; if it persists, ping support.

Rate limits

  • Burst: 30 requests / second
  • Sustained: Your monthly call budget evenly amortized
  • Hit the limit and you get a 429 + a Retry-After header. Back off and retry.

Detect AI content

The bread-and-butter endpoint. Submit text, get back sentence-level scores, an Authenticity Score, and model attribution.

POST /v2/detect

Request body

FieldDescription
textstringREQUIREDThe text to analyze. Max 100,000 characters on Enterprise, less on lower plans.
languagestringISO 639-1 code (e.g. en, es, fr). Auto-detected if omitted.
include_sentencesboolReturn per-sentence breakdown. Default true.
include_attributionboolReturn model attribution (Pro+). Default true.
include_suggestionsboolReturn Rewrite Suggestions (Business+). Default false.
callback_urlstringFor long docs — async via webhook (Enterprise).

Response

FieldDescription
humanization_scoreint0–100. Higher = more human.
ai_probabilityfloat0–1. Roll-up AI confidence.
verdictstringhuman · mixed · ai
sentencesarrayPer-sentence object: text, score, label, classifiers.
attributionobjectPer-model probabilities: ChatGPT, Claude, Gemini, Llama, other.
request_idstringFor support tickets.

Rewrite AI text

Rewrite AI-sounding text so it reads like a human. Returns the rewritten text plus the before/after Authenticity Score.

POST /v2/rewrite

Request body

FieldDescription
textstringREQUIREDThe text to rewrite.
tonestringconversational · professional · academic · blog · email. Default conversational.
preservearrayStrings to lock as-is (citations, names, numbers). Anchored verbatim in the rewrite.
strengthint1–5. Higher = more aggressive rewrite. Default 3.

Score only

Just the Authenticity Score, no breakdown. Fastest endpoint — useful for live editor integrations.

POST /v2/score

Returns { humanization_score, ai_probability, request_id }. p95 latency: 120ms.

Bulk scan

Up to 10,000 documents in one call. Returns a job ID; poll /status/<id> or wait for the webhook.

POST /v2/bulk

Request body: an array of { id, text } objects. Responds with job_id and status_url.

Typical throughput: ~1,200 docs/minute. Larger batches are split into shards behind the scenes.

Job status

Poll for bulk job progress, or fetch results when complete.

GET /v2/jobs/<job_id>

Returns { status, progress, results }status is one of queued, running, completed, failed.

Model attribution

We attribute text to a model family with a confidence score. The attribution object always sums to 1.0.

FamilyDetects
chatgptGPT-3.5, GPT-4, GPT-4 Turbo, GPT-4o, GPT-4o-mini
claudeClaude 3 Haiku, Sonnet, Opus · Claude 3.5
geminiGemini 1.5 Pro & Flash · Bard legacy
llamaLlama 2, Llama 3, Llama 3.1 — all sizes
otherMistral, DeepSeek, Perplexity, fine-tunes, unknown

Webhooks

For async work — bulk jobs, long-running rewrites. Enterprise gets webhooks; Business polls /status.

Events

  • scan.completed — single detection finished
  • scan.failed — detection errored out
  • rewrite.completed — rewrite finished
  • job.completed — bulk job finished

We sign every webhook with HMAC-SHA256 using your webhook secret. Always verify the signature.

Official SDKs

All MIT-licensed, all on GitHub. Open issues or PRs welcome.

LanguageInstall
Pythonpip install textsight
Node.jsnpm install @textsight/sdk
PHPcomposer require textsight/sdk
Rubygem install textsight
Gogo get github.com/textsight/go-sdk

Changelog

DateChange
May 12, 2026v4.2.1 model live. Added Claude 3.5 Haiku to attribution.
Mar 8, 2026Bulk endpoint streaming responses.
Feb 14, 2026Added preserve parameter to /rewrite.
Jan 9, 2026Llama 3 attribution.
Oct 1, 2025API v2 launched. v1 deprecated July 2026.

Ready to ship?

Grab a sandbox key in 30 seconds. Free credits to start.

Get an API key SDKs on GitHub