Home › Integrations › AI Detection API

AI detection API for products that publish other people's text.

If your product accepts writing from users, someone is going to submit a first draft that a model wrote. TextSight exposes that judgement as a REST call: POST api.textsight.ai/v2/detect returns a verdict, an AI probability and a score for every sentence, as JSON, in one synchronous request. The same key also reaches a lightweight score endpoint and a rewrite endpoint, so a product can flag a draft and offer a fix in the same flow. It is the same engine behind the TextSight web app and the iOS and Android apps. API access starts on Pro.

Get an API key Read the API reference
Pro+ API access REST · JSON in / out Sentence-level scores English text
The payload

One call returns enough to build a UI on.

Most detection APIs hand back a single percentage, which leaves you nothing to render except a number the user cannot argue with. Detect returns the breakdown as well as the verdict.

The fields, and what each one is for

verdict is human, mixed or ai, which is the value most products actually branch on. ai_probability is a fraction between 0 and 1, so multiply by 100 before you render a percentage. humanization_score runs 0 to 100 in the opposite direction, where higher means more human, and it is the number TextSight surfaces as the Humanization Score. confidence runs 0 to 100 and tells you how much weight the verdict deserves: short inputs come back as a low-confidence mixed rather than a false certainty.

Sentence-level scores are the part users trust

sentences is an array, and each entry carries its own text, a score from 0 to 1, and a label. That array is what lets you highlight the three sentences that triggered a flag instead of showing a bare 82%. In our own product it is the single feature that turns an argument about a score into a conversation about a paragraph. reasoning is a plain-language string you can surface verbatim, and model plus request_id give you something concrete to quote in a support ticket.

Three endpoints, one key

Detection is the entry point, but a flag on its own is a dead end for the user holding the draft. POST /v2/score is the cheaper path when you only need the number, for example when you are scoring a queue in the background and will not render a breakdown. POST /v2/rewrite returns a humanized version of the text with the output's own scores attached, which is what a "fix this" button calls. Same base URL, same key, different scope.

Detect

Full breakdown: verdict, AI probability, confidence, per-sentence scores and a reasoning string. What you call when a human is about to look at the result.

POST /v2/detect · scope: scan

Score

The lightweight path. Returns the humanization score, the AI probability and a confidence value, with no sentence array. For background queues and bulk triage.

POST /v2/score · scope: scan

Rewrite

Returns a humanized rewrite plus the scores of the output, so you can show the user what changed. Optional tone, strength 1 to 5, and a preserve list for citations and names.

POST /v2/rewrite · scope: humanize
Quickstart

Working in about four minutes.

There is no SDK to install and no handshake to implement. Create a key in the dashboard, export it, post some JSON.

1. Check the service before you write any code

GET https://api.textsight.ai/v2 needs no key at all. It returns the current endpoint list and the language caveat, which makes it a useful reachability probe from a new environment or a locked-down CI runner.

2. Create a key

Sign in and open API Keys in the dashboard at app.textsight.ai/api-keys. Keys are prefixed sk_live_ and the full value is shown once, so store it as an environment variable at the moment you create it. One note worth knowing before you commit anything: that prefix is shaped like a well-known payment provider's secret keys, so secret scanners on GitHub and elsewhere will flag a TextSight key as a payment credential. Keep it out of the repository the same way you would keep out any other secret.

3. Post text, read the verdict

A detection call is one POST with a JSON body containing text. There is no minimum length, though short inputs are reported honestly as low-confidence rather than guessed at.

curl -X POST https://api.textsight.ai/v2/detect \ -H "Authorization: Bearer $TEXTSIGHT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "The paragraph you want to check."}'

A successful response looks like this. Fields are trimmed for length; sentences carries one entry per sentence.

{ "humanization_score": 28, "ai_probability": 0.72, "verdict": "ai", "confidence": 84, "reasoning": "(plain-language explanation of the verdict)", "sentences": [ { "text": "The paragraph you want to check.", "score": 0.72, "label": "ai" } ], "model": "ml", "request_id": "req_8f21c0de-4b17-..." }
Auth, scopes & limits

Two headers, two scopes, one error shape.

The parts of an API that cost integration time are usually auth and error handling. Both are deliberately small here.

Authentication

Send the key either as Authorization: Bearer sk_live_... or as x-api-key. Both are accepted on every endpoint, so you can match whichever convention your HTTP client or gateway already uses rather than special-casing TextSight.

Scopes

The scan scope covers detect and score. The humanize scope covers rewrite. Keys are created with scan and read by default, which means a brand new key returns 403 on the rewrite endpoint until you reissue it with the humanize scope. It catches people out, so it is worth checking first when a rewrite call fails and a detect call on the same key succeeds. The split is useful on purpose: a detection-only integration can hold a key that is incapable of spending rewrite quota.

Errors

Every error is the same shape, nested under a single key: {"error": {"code": "...", "message": "..."}}. Read error.code, not the HTTP status alone, and never parse the message string. 400 is a bad request body, 401 a missing or invalid key, 403 a scope you do not hold or a quota that is exhausted, 429 the per-minute rate limit, and 503 the detector being temporarily unavailable. A 503 is worth an explicit branch in your code: it means the score is unknown, which is not the same as a low score, and showing the user a zero at that moment would tell them the opposite of the truth.

Two limits, both per account

A monthly call quota and a per-minute rate limit apply together, and both are counted per account rather than per key, so issuing more keys does not raise either ceiling. Metering only fires on a 2xx response: requests rejected with 400, 401, 403, 429 or 503 do not consume the monthly allowance.

PlanAPI calls / monthRequests / minuteKeys
FreeNo API access—Cannot create keys
StarterNo API access—Cannot create keys
Pro5,00060Multiple keys, shared quota
Business10,000120Multiple keys, shared quota
Enterprise50,000240Multiple keys, shared quota
API pricing

Priced as a plan, not per call.

The API is included in the subscription rather than metered separately, so the cost of a busy month is the same as the cost of a quiet one. API access starts on Pro; Free and Starter accounts cannot create keys.

Pro
$14.99/month

Billed $179.88/year — Save $60

The first tier with API access. Right for a single product or an internal tool.
  • 5,000 API calls / month
  • 60 requests / minute
  • detect · score · rewrite
  • Unlimited scans in the web app
Get Pro
Enterprise
$59.99/month

Billed $719.88/year — Save $240

For platforms scoring user-submitted text at volume, with compliance requirements attached.
  • 50,000 API calls / month
  • 240 requests / minute
  • 10 seats, more at $8/seat/month
  • SSO, audit logs, DPA
Talk to us

Yearly billing saves 25% on every tier. Need more than 50,000 calls a month? Tell us the volume and we will quote it. View full pricing →

Integration patterns

Four shapes this usually takes in a product.

The endpoint is the same in every case. What changes is when you call it and what you do with the answer.

Writing tools and AI assistants

The call goes on the draft, not the publish button. Score in the background while the user writes, and surface the sentence array as inline highlights so the writer can see which lines read as machine-written before anyone else does. If your product already generates text, pairing generation with a detection pass is the honest version of the feature: the user is told how the output reads rather than being promised it is invisible. When a draft comes back flagged, POST /v2/rewrite is the endpoint behind a one-click revise, and it returns the new scores so you can show the movement instead of asserting it.

Essay and academic-integrity platforms

Submission triggers a detect call, and the result is stored against the submission rather than shown to the student as a pass or fail. The fields that matter here are confidence and the sentences array, because an instructor reviewing a flag needs to see which passages drove it. Two constraints belong in the design from the start: detection is probabilistic and is not proof, and writing by second-language English speakers is more likely to be scored as AI. Build the human review step first, then the API call.

Learning management systems

An LMS usually wants the score on an assignment without adding a screen. The pattern is a webhook on submission in your own system that posts the text to /v2/score, stores the number, and only escalates to a full /v2/detect breakdown when a human opens the grading view. That keeps the per-minute rate limit well clear during a deadline spike, when several hundred submissions land in the same ten minutes, and keeps the expensive payload for the moment someone is actually reading it.

SEO and content platforms

Content platforms and agency tooling tend to run this as a pipeline stage rather than a user-facing feature: detect on every draft in the queue, gate publication on a threshold you choose, and route anything above it to a rewrite pass and a re-check. Because quota is per account and pooled across keys, a multi-tenant platform can run one upstream subscription and meter its own customers however it likes. Note the per-minute ceiling when you size a nightly batch: 60 requests a minute on Pro and 120 on Business is the constraint to design the queue around, not the monthly number.

Before you build

What this API does not do.

Shorter to read now than to discover in week three of an integration.

English text only

Text detection is English-language, and the unauthenticated discovery response says so too. Scores on non-English text are not reliable enough for us to present them as a supported feature, so do not build a multilingual flow on top of this endpoint.

Probabilistic, not proof

No detector is 100% accurate, ours included, and we will not claim otherwise. A high AI probability is evidence worth a human look, never a finding on its own. If your product uses the output to penalise someone, the review step is your responsibility and it needs to exist.

No batch endpoint, no job queue, no SDK

The live v2 surface is three synchronous endpoints. There is no bulk endpoint, no asynchronous job queue, no streaming response and no official client library today, so high-volume callers loop over the synchronous endpoints inside their per-minute limit. Outbound webhooks are worth a separate note: TextSight does have them on Pro and above, configured in the dashboard, but they fire for scans run through the app and a v2 call does not emit an event. A v2 call returns its result in its own response, which is the only delivery mechanism to design around. If a batch endpoint or a v2 webhook would change your decision, say so in an email and it moves up the list.

Rewrite is a single pass

The rewrite endpoint runs one synchronous pass so the call returns inside normal request timeouts, which means it can leave some sentences unchanged. The web app iterates further. The response also carries score_reliable: when it is false, the rewrite is still valid but the scores attached to it were produced while the detector was degraded, so do not render them as a confirmed result.

FAQ

Questions developers actually ask.

How much does the AI detection API cost?
API access is included in the subscription rather than sold per call. Pro is $19.99/month, or $14.99/month billed yearly, and includes 5,000 API calls a month at 60 requests a minute. Business is $39.99/month, or $29.99 billed yearly, with 10,000 calls a month at 120 requests a minute. Enterprise is $79.99/month, or $59.99 billed yearly, with 50,000 calls a month at 240 requests a minute. Free and Starter accounts cannot create API keys.
What does POST /v2/detect return?
A JSON object containing humanization_score (0 to 100), ai_probability as a fraction from 0 to 1, a verdict of human, mixed or ai, a confidence value from 0 to 100, a plain-language reasoning string, a sentences array where each entry carries its own text, score and label, the model name, and a request_id you can quote in a support ticket.
Do failed requests use up my monthly quota?
No. A call is metered only when the response is a 2xx. Requests rejected with 400, 401, 403, 429 or 503 do not count against the monthly allowance. Both the monthly quota and the per-minute rate limit are counted per account, not per key, so issuing more keys does not raise either ceiling.
Is there a bulk or asynchronous endpoint?
Not today. The live surface is three synchronous endpoints: POST /v2/detect, POST /v2/score and POST /v2/rewrite. There is no batch endpoint, no job queue, no streaming response and no official SDK yet. Outbound webhooks do exist on Pro and above for scans run in the app, but v2 calls do not emit them: a v2 call returns its result in its own response. High-volume callers loop over the synchronous endpoints inside their own per-minute rate limit.
Which languages does the detection API support?
Text detection is English-language, and the unauthenticated discovery response at GET /v2 states the same caveat. Detection is probabilistic rather than proof, and writing by second-language English speakers is more likely to be scored as AI, so the API is not suitable as the sole basis for an accusation or a penalty.
Can one key call both detection and rewriting?
Yes, if the key carries both scopes. The scan scope covers POST /v2/detect and POST /v2/score; the humanize scope covers POST /v2/rewrite. New keys are created with scan and read by default, so a key that has never been given the humanize scope returns 403 on the rewrite endpoint until it is reissued with that scope.
Keep reading

The rest of the developer surface.

API reference

Endpoint-by-endpoint request and response documentation, the full error-code table, and client examples. The contract, in detail.

/api-docs.html

Integrations hub

Every surface TextSight ships: the REST API, the iOS and Android apps, the web app, and an honest status on what is still being built.

/integrations/

Rewrite API

A closer look at the rewrite endpoint on its own: tone, strength, the preserve list, and the tradeoff behind the single synchronous pass.

/ai-humanizer-api/

API terms of use

Key handling, fair use, prohibited uses, how request data is treated, and the availability and termination terms that apply to the API.

/api-terms/

Further reading

Put a verdict where your product needs one.

Create a key from the dashboard and make the first call with cURL before you write a line of integration code. API access starts on Pro.

Get an API key Read the API reference
Pro+ · REST · JSON in / out · English text · Detection is probabilistic, not proof