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
Authentication
Bearer token in every request. Generate one in Settings → API Keys. Keep it server-side; never in client JS.
Token types
| Prefix | Use |
|---|---|
| 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.
| Status | Meaning |
|---|---|
| 200 | OK |
| 400 | Bad request — invalid params, see message |
| 401 | Missing or invalid API key |
| 402 | Plan doesn't include this endpoint — upgrade |
| 429 | Rate limited — slow down, see Retry-After header |
| 500 | Our 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+ aRetry-Afterheader. 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.
Request body
| Field | Description |
|---|---|
| textstringREQUIRED | The text to analyze. Max 100,000 characters on Enterprise, less on lower plans. |
| languagestring | ISO 639-1 code (e.g. en, es, fr). Auto-detected if omitted. |
| include_sentencesbool | Return per-sentence breakdown. Default true. |
| include_attributionbool | Return model attribution (Pro+). Default true. |
| include_suggestionsbool | Return Rewrite Suggestions (Business+). Default false. |
| callback_urlstring | For long docs — async via webhook (Enterprise). |
Response
| Field | Description |
|---|---|
| humanization_scoreint | 0–100. Higher = more human. |
| ai_probabilityfloat | 0–1. Roll-up AI confidence. |
| verdictstring | human · mixed · ai |
| sentencesarray | Per-sentence object: text, score, label, classifiers. |
| attributionobject | Per-model probabilities: ChatGPT, Claude, Gemini, Llama, other. |
| request_idstring | For 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.
Request body
| Field | Description |
|---|---|
| textstringREQUIRED | The text to rewrite. |
| tonestring | conversational · professional · academic · blog · email. Default conversational. |
| preservearray | Strings to lock as-is (citations, names, numbers). Anchored verbatim in the rewrite. |
| strengthint | 1–5. Higher = more aggressive rewrite. Default 3. |
Score only
Just the Authenticity Score, no breakdown. Fastest endpoint — useful for live editor integrations.
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.
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.
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.
| Family | Detects |
|---|---|
| chatgpt | GPT-3.5, GPT-4, GPT-4 Turbo, GPT-4o, GPT-4o-mini |
| claude | Claude 3 Haiku, Sonnet, Opus · Claude 3.5 |
| gemini | Gemini 1.5 Pro & Flash · Bard legacy |
| llama | Llama 2, Llama 3, Llama 3.1 — all sizes |
| other | Mistral, 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 finishedscan.failed— detection errored outrewrite.completed— rewrite finishedjob.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.
| Language | Install |
|---|---|
| Python | pip install textsight |
| Node.js | npm install @textsight/sdk |
| PHP | composer require textsight/sdk |
| Ruby | gem install textsight |
| Go | go get github.com/textsight/go-sdk |
Changelog
| Date | Change |
|---|---|
| May 12, 2026 | v4.2.1 model live. Added Claude 3.5 Haiku to attribution. |
| Mar 8, 2026 | Bulk endpoint streaming responses. |
| Feb 14, 2026 | Added preserve parameter to /rewrite. |
| Jan 9, 2026 | Llama 3 attribution. |
| Oct 1, 2025 | API v2 launched. v1 deprecated July 2026. |