HomeAI Rewriter › AI Rewriter API

AI Rewriter API — a REST endpoint for production authenticity.

If you are building a CMS publish hook, an agency batch processor, or a content platform that moderates AI-generated submissions, the AI rewriter cannot live behind a paste-and-copy UI. It has to be an endpoint your code calls. TextSight ships a REST AI rewriter at POST api.textsight.ai/v2/rewrite with JSON in and JSON out and an adjustable rewrite strength per request. The same endpoint runs the same humanization engine as the web app, the Chrome extension, and the WordPress plugin, so what you build against is the same backend every TextSight surface uses. Available on Pro and above.

Get an API key Read API docs
Pro+ API access REST · JSON in / out Same engine as the app
Why an API

When an AI rewriter has to be a backend call.

A paste-and-copy UI is fine for individual writers. It stops being fine the moment you are shipping software that processes content on behalf of users.

Embedded authenticity inside your product

If your CMS asks the user to leave for a separate AI rewriter site and paste output back, you have lost the workflow. The Rewrite button has to live inside your editor, calling your backend, which calls the AI rewriter endpoint. The user never sees the dependency. TextSight's REST API is what makes that integration shape possible without rebuilding the model yourself.

Pipeline automation

Programmatic SEO platforms and content factories generate batches of drafts and need every piece rewritten and detector-checked before publish. That is a script, not a sequence of browser tabs. The API is the only way to wire detect, rewrite, re-detect, publish into a single automated flow. Run it nightly, run it on demand, run it from your CI pipeline.

Multi-tenant economics

If you are reselling authenticity to your own users, you need one upstream subscription, one set of credentials, and a pricing model that does not punish growth. Per-word credit packs do exactly that: every active customer eats your margin. A flat monthly subscription with a generous word quota on Business scales more predictably as your user base grows.

The endpoint

POST to the AI rewriter in one request.

A small, stable JSON envelope. Two required fields. The rest are optional return-shape controls. The response is symmetric: the rewrite plus the metadata you asked for.

Endpoint and method

POST to https://api.textsight.ai/v2/rewrite with a JSON body. Authenticate with either Authorization: Bearer sk_live_... or the x-api-key header. Content-Type is application/json. The key needs the humanize scope. One key, one header, one endpoint.

Request body

text (required) is the source string to rewrite, up to 50,000 characters per request. Optional controls: tone (conversational, professional, academic, blog, or email), strength (an integer 1–5 — higher rewrites more aggressively; default 3), and preserve (an array of strings to keep verbatim, such as citations, names, and numbers).

Response body

The response is JSON: rewritten (the rewritten text), humanization_score (0–100, higher is more human), ai_probability (0–1), score_reliable (false when the detector was degraded during scoring — the rewrite is still valid), and request_id for support tickets.

One synchronous pass

The call runs a single rewrite pass and returns synchronously, which keeps it within request timeouts. A single pass may leave some sentences unchanged; for the deepest rewrite, run the draft through the web-app humanizer, which iterates further. There is no streaming or async job variant on the public endpoint today.

Plans & pricing

API access lives on the Business tier.

Free and Starter cover the web app and extension. REST API access starts on Pro (5,000 calls/month); Business raises the quota to 10,000 calls/month and adds team seats. Enterprise goes to 50,000.

Free
$0/forever

 

Web app only. No API access on Free.
  • 10,000-character quota
  • Web app paste flow
  • All 3 modes in UI
  • No REST API
Start free
Starter
$7.49/month

Billed $89.88/year — Save $30

Extension and web app. No REST API.
  • 20,000 words/mo
  • Chrome extension
  • Sentence-level highlights
  • No REST API
Get Starter
Pro
$14.99/month

Billed $179.88/year — Save $60

Solo creators + the first tier with REST API.
  • 50,000 humanizer words/mo
  • Unlimited detector scans
  • REST API — 5,000 calls/mo
  • 60 requests/min
Get Pro

Yearly billing saves 25%. View full pricing →

Authentication

API keys, scope, and rotation.

A single header on every request. No OAuth dance, no per-endpoint scopes to manage. The key is the only credential and rotating it is a single click in the dashboard.

Where to get a key

Sign in to the web app and open the API Keys page in the dashboard. Click Generate, copy the value once (it is displayed a single time and never recoverable afterwards), and store it as an environment variable in your application. Treat it as a secret the same way you treat a database password. The key is visible only at creation; if you lose it, you generate a replacement and update your env.

How to send it

Pass the key as Authorization: Bearer sk_live_... (or the x-api-key header) on every request. The endpoint reads it once, checks it against the issuing account's tier and scopes, and counts a successful call against that account's monthly API-call quota. The same key works across the /v2 endpoints (detect, score, rewrite) — one credential, gated by scopes.

Scopes and rotation

Each key carries scopes (scan, humanize, read) — the rewrite endpoint requires humanize. If a key leaks, revoke it from the API Keys page and generate a replacement; the revoked key returns 401 on its next call. Keys inherit the tier limits of the account that created them, so a Business key carries the 10,000 calls/month quota and the 120 requests-per-minute limit automatically.

Code samples

Working calls in cURL, Node, Python.

No SDK ships yet because a thin wrapper in any language takes about 30 lines. The three snippets below call the synchronous rewrite endpoint.

cURL

curl -X POST https://api.textsight.ai/v2/rewrite \
  -H "Authorization: Bearer $TEXTSIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The draft to rewrite.",
    "tone": "conversational",
    "strength": 3
  }'

Node.js (fetch)

const res = await fetch("https://api.textsight.ai/v2/rewrite", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TEXTSIGHT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    text: draft,
    tone: "conversational",
    strength: 3,
  }),
});
const data = await res.json();
console.log(data.rewritten, data.humanization_score);

Python (requests)

import os, requests

resp = requests.post(
    "https://api.textsight.ai/v2/rewrite",
    headers={"Authorization": f"Bearer {os.environ['TEXTSIGHT_API_KEY']}"},
    json={
        "text": draft,
        "tone": "conversational",
        "strength": 3,
    },
    timeout=60,
)
data = resp.json()
print(data["rewritten"], data["humanization_score"])

Response shape

{
  "rewritten": "The rewritten, human-feeling version of the draft.",
  "humanization_score": 87,
  "ai_probability": 0.13,
  "score_reliable": true,
  "request_id": "req_01HX..."
}

An OpenAPI specification for the public endpoints is on the roadmap. Until it lands, the contract on this page and the /api-docs page is the source of truth.

Responses & limits

Synchronous responses, predictable limits.

The endpoint returns a complete JSON response in one request. There is no streaming or async job queue on the public endpoint today — both are on the roadmap, not shipped.

Single synchronous pass

A rewrite runs one pass and returns the full result. This keeps the call well inside normal request timeouts. Because it is a single pass, it may leave some sentences unchanged; if you need the deepest possible rewrite, run the draft through the web-app humanizer, which iterates further.

Rate limits

Two limits apply. A per-minute rate limit: Pro 60, Business 120, Enterprise 240 requests per minute — exceed it and you get HTTP 429. A monthly call quota: Pro 5,000, Business 10,000, Enterprise 50,000 calls — exhaust it (or call on a plan without API access) and you get HTTP 403. Both are shared across every key on the account.

Errors

Errors return { "error": { "code", "message" } }. 401 for a missing or invalid key, 403 for a missing scope / no API access / exhausted quota, 429 for the per-minute rate limit, 503 if the detector is briefly unavailable (retryable).

Use cases

Where teams wire the AI rewriter endpoint.

Three integration patterns recur across customer pipelines. Each one runs on the same endpoint with different orchestration logic.

CMS pre-publish hook

A pre-publish hook in your CMS calls the AI rewriter endpoint with the draft, waits on the response, and replaces the draft body with the rewritten version before the editor sees the publish-ready preview. Editors land on human-feeling prose without copy-pasting into a separate tool, and your platform looks like a single integrated workflow.

Agency batch processing

Content agencies queue client articles overnight and rewrite the batch in bulk. The script reads articles from a queue, calls the AI rewriter endpoint per article, and writes the rewrite back the next morning. The 10,000 monthly calls on Business cover most mid-sized agency volumes; loop within the per-minute rate limit (120/min on Business) to pace the overnight batch.

Content platform AI moderation

Platforms that accept user-submitted content (forums, marketplaces, knowledge bases) increasingly auto-rewrite AI-generated drafts to keep platform quality consistent. Detect first with /v2/detect to flag AI-heavy submissions, route flagged drafts through /v2/rewrite, then publish the rewrite with an audit trail.

FAQ

AI Rewriter API frequently asked.

Where do I get an API key for the TextSight AI rewriter API?
Sign in to the TextSight dashboard and open the API Keys page. Generate a key (format sk_live_...), copy the value once (it is shown a single time), and store it as an environment variable. API access is available on Pro and above; the key needs the humanize scope to call the rewrite endpoint. Usage counts against your monthly API-call quota: Pro 5,000 calls, Business 10,000, Enterprise 50,000.
What is the request payload for the AI rewriter endpoint?
POST JSON to /v2/rewrite with one required field, text. Optional fields: tone (conversational, professional, academic, blog, or email), strength (1 to 5 — higher rewrites more aggressively), and preserve (an array of strings to keep verbatim). The response is JSON with rewritten, humanization_score, ai_probability, score_reliable, and request_id. Authenticate with an Authorization Bearer sk_live_ header or the x-api-key header.
What rate limits apply to the AI rewriter API?
Two limits apply: a monthly API-call quota (Pro 5,000, Business 10,000, Enterprise 50,000 calls) and a per-minute rate limit (Pro 60, Business 120, Enterprise 240 requests per minute). Exceeding the per-minute limit returns HTTP 429; the monthly quota or a plan without API access returns HTTP 403. Limits are shared across every key on the account.
Is the AI rewriter API the same one the web app and extension use?
Yes. The rewrite endpoint runs the same humanization engine that powers the TextSight web app, the Chrome extension, and the WordPress plugin. There is no separate developer model. The API call runs a single synchronous rewrite pass to stay within request timeouts, so it may leave some sentences unchanged; the web-app humanizer iterates further for the deepest rewrite.
Are there official SDKs for the AI rewriter API?
Not yet. The endpoint surface is small enough that a thin wrapper in any language takes about 30 lines. Code samples for cURL, Node.js fetch, and Python requests are on this page. Until an official SDK or OpenAPI spec ships, the contract on this page and the /api-docs page is the source of truth.
What are typical use cases for the AI rewriter API?
Three patterns recur. A CMS pre-publish hook that rewrites drafts before they go live, so editors land on human-feeling prose without copy-pasting into a separate tool. Agency batch pipelines that rewrite a queue of client articles overnight and report Authenticity Scores back to a dashboard. Content platform moderation flows that auto-rewrite user-submitted AI-generated drafts to keep platform quality consistent. All three run on the same endpoint with different orchestration.
Related

More for the AI rewriter workflow.

Further reading

Wire authenticity into your product backend.

A REST AI rewriter, adjustable rewrite strength per request, the same backend as the web app and extension. Generate an API key in two minutes.

Get an API key Read API docs
Pro+ · REST · JSON in / out · Same backend across web app, extension, WP plugin

AI detection, more places & platforms

How TextSight works for other regions and setups.

AI Rewriter Chrome Extension — Rewrite Anywhere AI Rewriter Bulk — Batch UI + REST API for Agencies AI Rewriter Desktop — Web + Chrome Extension AI Rewriter Free — 3 Rewrites a Day, No Signup AI Humanizer for India AI Rewriter Mobile — Android Live, iOS on Roadmap