TextSight Python client: AI detector and AI humanizer API
Free, open-source Python library for the TextSight API. Check if text was written by ChatGPT, Claude or Gemini, get a sentence-by-sentence AI score, and rewrite AI-sounding text so it reads naturally.
A developer-friendly alternative to the GPTZero, Originality.ai and ZeroGPT APIs. No dependencies, Python 3.8+.
Install
pip install textsight
Quick start
from textsight import TextSight
ts = TextSight(api_key="sk_live_...") # or set TEXTSIGHT_API_KEY
result = ts.detect("Paste the essay or article here...")
print(result["verdict"], result["humanization_score"])
You need a TextSight API key. Create one here (Settings → API Keys). API access is on the Pro plan and up, see pricing.
How do I detect AI-generated text in Python?
r = ts.detect(text)
r["verdict"] # "human", "mixed" or "ai"
r["humanization_score"] # 0-100, higher means more human
r["ai_probability"] # 0-1
for s in r["sentences"]: # which sentences look AI-written
print(s["label"], round(s["score"], 2), s["text"])
Need only the number? ts.score(text) is lighter and faster.
How do I humanize AI text in Python?
r = ts.rewrite(
text,
tone="academic", # conversational, professional, academic, blog, email
strength=3, # 1 light to 5 aggressive
preserve=["Smith (2021)"] # words to keep unchanged
)
print(r["rewritten"])
Command line
export TEXTSIGHT_API_KEY=sk_live_... # Windows: set TEXTSIGHT_API_KEY=sk_live_...
textsight detect essay.txt
textsight rewrite draft.txt --tone blog
Errors
| Exception | When |
|---|---|
AuthenticationError |
missing or wrong API key (401) |
PermissionDeniedError |
no API access on your plan, or monthly quota used up (403) |
RateLimitError |
too many requests per minute (429), retried automatically first |
ServiceUnavailableError |
detector briefly down (503), retried automatically first |
All inherit from TextSightError. Texts can be up to 50,000 characters. Detection is English only for now.
FAQ
Is this library free? Yes, it's MIT licensed. API calls use your TextSight plan's quota.
Can I try TextSight without code? Yes, the free AI detector and humanizer work in the browser, no card needed.
Where are the full API docs? textsight.ai/api-docs.html
License
MIT © TextSight
Release files for textsight 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| textsight-0.1.1.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| textsight-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.1 kB
Release files / textsight-0.1.1.tar.gz
| Download URL | textsight-0.1.1.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6dda990ea3f4a23141b18274c70e600f2d3ac6dde2fe2ba3649bafa0fbedf7d0
|
|
BLAKE2b-256 checksum How to use checksums |
e775c03de2658065fc709c3cece22060d19890dc5aa6ba05991a358dcd0a27fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / textsight-0.1.1-py3-none-any.whl
| Download URL | textsight-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
863cec0ae32961cf70f41f662ac33d7c58abec4276ab6b05f2a7e83ae9f69dac
|
|
BLAKE2b-256 checksum How to use checksums |
e3df433217172c1acdbc2e37c72113d740360687df4800d2a79093234d388492
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|