Humanizer API Tutorial: Humanize Text with Python and Node

Alina Shah

44 min read

To humanize text with a humanizer API in Python, you send an HTTP POST request with your API key in a header and the text in a JSON payload, then read the rewritten text from the response. This simple version breaks once volume grows, because of per-call word caps, rate limits and async jobs. The scripts below fix each problem in order, one script at a time.

This AI humanizer API tutorial gives you 8 Python scripts that build on each other, from the first request to a pre-publish check, plus Node and cURL versions of the core calls. Every script is checked against Phrasly's API docs as of November 2026.

Disclosure: Phrasly's SEO and content team builds the API used in these examples, and the retry, chunking, polling and webhook patterns work with any vendor. No humanizer can promise a detector result, so the goal is readable rewrites that keep meaning, target keywords and citations intact.

See What the Phrasly AI Humanizer API Returns ๐Ÿ‘‡


Check the request format, per-word rates and limits on one page before you write any code.


An AI Humanizer API Is a REST Endpoint That Rewrites the Text You Send It

Four rungs from Python setup to bulk humanizing

An AI humanizer API is a REST endpoint that rewrites AI-drafted text for readability and tone. To use a humanizer API in Python, you send an HTTP POST request with the requests library, put your API key in a header and pass the text in a JSON payload. The response returns the rewritten text, either as plain text or as JSON with extra fields.

๐Ÿ“ฅ What goes into the request:

  • The text itself, which Phrasly accepts at 20 to 5,000 words per call

  • A strength setting, such as the five Phrasly Ultra modes from gentle to max

  • A readability preset, such as Ultra's sentence_length setting ("longer" or "shorter")

  • Optional fields, such as stream for live output or proofread for an English proofreading pass

๐Ÿ“ค What comes back:

  • The rewritten text

  • A word count, on vendors that return JSON

  • A request ID, on some vendors

  • A detection score, which a few vendors add to the response

Request Anatomy

Element

Typical value

Phrasly value

Endpoint

A versioned REST URL such as /v1/humanize

https://business.phrasly.ai/api/v1/humanize

HTTP method

POST

POST

Auth header

Authorization: Bearer <API_KEY>

x-api-key: <API_KEY>

JSON payload

text plus optional strength, tone or readability fields

text (required), plus optional stream, model, mode, sentence_length, cleaner_grammar and proofread

Response

Rewritten text, word count, request ID, optional score

Plain text (text/plain) holding only the rewritten text

Billing unit

Words or credits; some vendors bill input plus output words

Input words

Humanizer APIs bill per word or per credit, not per token, so your cost follows the length of the drafts you send. Some vendors count input plus output words, and StealthGPT's API page says its humanization counts both, while Phrasly bills only the input word count.

The API rewrites a draft the same way a web humanizer does. It changes predictable sentence structure, repeated word choices and even rhythm while keeping the meaning, which is what an AI humanizer does to a draft in any interface.

How a Humanizer API Differs From Prompting ChatGPT or Claude

A humanizer API runs one fixed rewrite step with documented settings and per-word billing, while a chat model needs prompt engineering, token budgeting and checks for output drift.

  • ๐Ÿ” Consistency: The same input and settings give a predictable output style, while a chat prompt can drift when the model version changes.

  • ๐Ÿ’ต Cost predictability: Per-word pricing maps straight onto a content calendar, while token pricing needs an estimate of prompt plus completion length.

  • โš–๏ธ Fair use of each: A chat model works well for one-off edits. The API earns its place with volume, repeatability and pipelines.

Rung 0: Install Python, Create a Virtual Environment and Store Your API Key

Humanizer API compared with prompting a chat model

Before you use Python with a humanizer API, you need Python 3, a virtual environment, the requests library and an API key stored in an environment variable. Most humanizer vendors offer a REST API rather than a pip package, and Phrasly publishes no official SDK, so you pip install requests and send your key with each call.

๐Ÿ“Š Why the Examples Start in Python

In the Stack Overflow Developer Survey 2025, 57.9% of all respondents said they used Python, a 7 percentage point rise from 2024. Stack Overflow ties that rise to Python's role in AI, data science and back-end work, so the examples start in Python, with Node versions for JavaScript teams.

Install Python and Add It to PATH

To install Python on Windows, download the Python install manager from python.org/downloads or the Microsoft Store, then run py install in a terminal to add the latest Python. The first time you install a runtime, the install manager offers to add its folder to PATH. Accept it if you want the python command to work in any terminal.

On macOS, use the python.org installer or brew install python, and on Linux use your package manager. The classic Windows installer, with its "Add python.exe to PATH" checkbox, is deprecated since Python 3.14 and won't be made for Python 3.16 or later.

  • ๐Ÿ’ป Windows shortcut: The py command works even if you skip the PATH prompt.

  • ๐ŸŽ macOS and Linux: The command is usually python3, not python, and that difference causes the most common first error.

  • ๐Ÿ”„ Version check fails: Close and reopen the terminal before you reinstall, because a PATH change only reaches new terminal windows.

How to Add Python to PATH and Check the Install

OS

Install

Verify command

Windows

Python install manager from python.org or the Microsoft Store, then py install

python --version or py --version

macOS

python.org installer or brew install python

python3 --version

Linux (Debian or Ubuntu)

sudo apt install python3 python3-venv python3-pip

python3 --version

Create a Virtual Environment and Pip Install Requests

A virtual environment is a private folder of packages for one project, so this project's libraries never clash with another project's. Run these commands in the project folder, and check the official venv documentation for the activation command in any other shell.

Terminal: create the environment and install the packages (bash)

python -m venv .venv            # use python3 on macOS and Linux

.venv\Scripts\activate          # Windows (PowerShell: .venv\Scripts\Activate.ps1)

source .venv/bin/activate       # macOS and Linux

pip install requests httpx fastapi uvicorn
  • requests sends the HTTP calls in Rung 1 and Rung 2.

  • httpx runs the async bulk calls in Rung 3.

  • fastapi and uvicorn serve the webhook and streaming routes in Rung 4.

๐Ÿ’ก Windows Tip

PowerShell can block Activate.ps1 the first time. Run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser once, then activate again.

Keep the API Key Out of Your Code

Store the key in an environment variable named HUMANIZER_API_KEY and read it with os.environ["HUMANIZER_API_KEY"], so a missing key stops the script with a clear error. API key authentication works the same way at every vendor: the key travels in a request header, as an x-api-key header on Phrasly or as a Bearer token on vendors such as WriteHuman and ToHuman.

Terminal: set the key for this session (bash)

# Windows PowerShell
$env:HUMANIZER_API_KEY="your-key-here"

# macOS and Linux
export HUMANIZER_API_KEY="your-key-here"

โš ๏ธ Never Commit the Key

If you keep the key in a .env file with python-dotenv, add .env to .gitignore before your first commit. If a key reaches a public repo, revoke it in your dashboard and create a new one at once. Phrasly's docs also say to call the API from your server only, never from browser code.

โœ… Check before you move on:

  • python --version (or python3 --version) prints a 3.x version

  • The prompt shows (.venv), so the environment is active

  • pip list shows requests and httpx

  • HUMANIZER_API_KEY is set, and .env is listed in .gitignore

Rung 1: Send Your First Humanize Request in Python

To use an AI humanizer API in Python, define a humanize(text) function that posts the text with requests, sends your key in a header and returns the rewritten string. Script 1 does exactly that and adds a short test call.

Script 1: humanize.py, a humanize text API example for a humanizer API Python project (checked against Phrasly's API docs, November 2026). What this adds: one working call with key handling and a timeout.

humanize.py (python)

import os
 
import requests
 
# Endpoint and header names from business.phrasly.ai/docs/humanization-api
API_URL = os.environ.get("HUMANIZER_API_URL", "https://business.phrasly.ai/api/v1/humanize")
API_KEY = os.environ["HUMANIZER_API_KEY"]  # a missing key stops the script here
 
 
def humanize(text):
    headers = {"x-api-key": API_KEY, "Content-Type": "application/json"}
    payload = {"text": text}  # 20 to 5,000 words per request
    response = requests.post(API_URL, json=payload, headers=headers, timeout=(10, 300))
    response.raise_for_status()
    return response.text  # Phrasly returns plain text, not JSON
 
 
if __name__ == "__main__":
    sample = (
        "Artificial intelligence has transformed the way modern businesses approach "
        "content creation. Companies can now produce large volumes of written material "
        "quickly, which allows marketing teams to focus on strategy and distribution."
    )
    print(humanize(sample))
  • ๐Ÿงฉ How to define a function in Python: def humanize(text): names a reusable block of code that takes one input.

  • โ–ถ๏ธ How to call a function in Python: humanize(sample) runs that block with your paragraph.

  • โ†ฉ๏ธ What return does in Python: return response.text hands the rewritten string back to the caller, so later scripts can chunk, batch and check it.

Script 1 reads the key once, when the file loads, so every call in the same run reuses it. Because you pass the payload as json=payload, requests turns the dictionary into JSON for you.

response.raise_for_status() turns any 4xx or 5xx status into a Python exception, so a failed call never prints an error message as if it were rewritten text. The if __name__ == "__main__": line runs the test call only when you start the file directly, which lets later scripts import humanize() without running it.

The timeout of (10, 300) gives the connection 10 seconds and the response 300 seconds, the same read timeout Phrasly's own Python example uses. Optional fields such as mode and proofread are listed in the full parameter reference in the Phrasly API docs.

Run the File From the Terminal

To run a Python script, open a terminal in the project folder with the venv active and type python humanize.py (or python3 humanize.py on macOS and Linux). When the Python code runs, the rewritten paragraph prints to the terminal.

  • โŒ ModuleNotFoundError: No module named 'requests': The venv isn't active. Activate it and run the file again.

  • ๐Ÿ”‘ 401 Unauthorized: The key is missing or wrong in this terminal. Check that it's set without printing it: [bool]$env:HUMANIZER_API_KEY in PowerShell, or [ -n "$HUMANIZER_API_KEY" ] && echo set in bash.

  • โš ๏ธ 400 Bad Request: The text is under 20 words or over 5,000 words, or the JSON is invalid.

Read the Response: Plain Text or JSON

Phrasly returns the humanized text as plain text (text/plain), so response.text is the whole result and needs no JSON parsing. Vendors that wrap the result in JSON need response.json() and an index into their text field, as in this placeholder shape:

Placeholder shape of a JSON-style response (field names vary by vendor) (json)

{"text": "<rewritten text>", "request_id": "<id>", "words": <n>}

Errors on Phrasly do come back as JSON, shaped as {"error": "..."}, and Script 2 reads that message.

Fields to Log on Every Call

Log three fields on every call, so you can trace problems, match your invoice and size your timeouts.

  • ๐Ÿ†” A call ID: Phrasly's plain-text response carries no request ID, so Script 2 creates its own ID for each call and logs it with the status code.

  • ๐Ÿ”ข Words billed: Phrasly bills on the input word count, so len(text.split()) gives you a close cost estimate.

  • โฑ๏ธ Latency: Response time tells you how to set timeouts and concurrency in Rung 3.

๐Ÿ“Š Latency Grows With Length on Some APIs

ToHuman's production data (945 runs, published November 2026) shows a median of 0.9 seconds under 50 words, rising to 19.9 seconds at 500 words and up. Phrasly's API page says typical requests return in under two seconds.

The Same Call in Node.js and cURL

The humanizer API Node version uses the built-in fetch in Node 18 and later, with the same header and body as Script 1.

humanize.mjs (javascript)

const API_URL = process.env.HUMANIZER_API_URL ?? "https://business.phrasly.ai/api/v1/humanize";

export async function humanize(text) {
  const res = await fetch(API_URL, {
    method: "POST",
    headers: {
      "x-api-key": process.env.HUMANIZER_API_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ text }),
  });
  if (!res.ok) {
    const { error } = await res.json();
    throw new Error(`${res.status}: ${error}`);
  }
  return res.text(); // plain text, not JSON
}

console.log(await humanize("Artificial intelligence has transformed the way modern businesses approach content creation and publishing across every channel they use today, from blogs to email newsletters."));

The Node version reads the error body with res.json() before it throws, because Phrasly sends errors as JSON even though a successful result arrives as plain text.

Use cURL to test your key with one command before you debug any Python. If cURL returns rewritten text, the key and endpoint work, and any remaining problem lies in your script.

Terminal: test the key with cURL (bash)

curl -X POST https://business.phrasly.ai/api/v1/humanize \
  -H "x-api-key: $HUMANIZER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Paste at least twenty words of AI-drafted text here to test your key before you debug any Python code at all today."}'

Rung 2: Handle Errors, Rate Limits and Retries by Status Code

Retry only on 429 rate limits, 5xx errors and timeouts, never on 400, 401, 402 or 403, and on a rate-limit 429, wait for the Retry-After value before you try again. On Phrasly, a 429 can also mean your credits ran out, and that case needs autopay or a new billing cycle instead of a retry.

The 429 status comes from RFC 6585, which lets a server add a Retry-After header to say how long to wait. RFC 9110 defines that header as either a number of seconds or an HTTP date.

Script 2: retry.py (checked against Phrasly's API docs, November 2026). What this adds: retries with backoff, Retry-After handling and one JSON log line per event.

retry.py (python)

import json
import os
import random
import time
import uuid

import requests

API_URL = os.environ.get("HUMANIZER_API_URL", "https://business.phrasly.ai/api/v1/humanize")
API_KEY = os.environ["HUMANIZER_API_KEY"]

MAX_ATTEMPTS = 4          # first try plus 3 retries
BASE_DELAY = 2.0          # 2s, 4s, 8s, as the Phrasly docs suggest
MAX_DELAY = 30.0          # ceiling for any single wait
RETRYABLE = {500, 502, 503, 504}


class FatalAPIError(Exception):
    """An error that retrying will not fix (400, 401, 402, 403, credits exhausted)."""


def log(**fields):
    print(json.dumps(fields), flush=True)  # one JSON object per line


def error_message(response):
    try:
        return response.json().get("error", response.text[:200])
    except ValueError:
        return response.text[:200]


def retry_after_seconds(response):
    value = response.headers.get("Retry-After")
    if value is None:
        return None
    try:
        return max(0.0, float(value))   # seconds format
    except ValueError:
        return None                     # HTTP-date format: fall back to backoff


def backoff(attempt):
    delay = min(MAX_DELAY, BASE_DELAY * 2 ** (attempt - 1))
    return delay + random.uniform(0, delay / 2)  # jitter


def humanize_with_retry(text):
    headers = {"x-api-key": API_KEY, "Content-Type": "application/json"}
    call_id = uuid.uuid4().hex[:12]  # our own ID, so every log line for one call matches
    status = None
    for attempt in range(1, MAX_ATTEMPTS + 1):
        try:
            response = requests.post(API_URL, json={"text": text}, headers=headers, timeout=(10, 300))
        except (requests.Timeout, requests.ConnectionError):
            status, wait = "network_error", backoff(attempt)
        else:
            status = response.status_code
            if status == 200:
                log(call_id=call_id, status=200, attempt=attempt, words_in=len(text.split()))
                return response.text
            if status == 429 and "Retry-After" in response.headers:
                seconds = retry_after_seconds(response)
                wait = seconds if seconds is not None else backoff(attempt)
            elif status in RETRYABLE:
                wait = backoff(attempt)
            else:
                # 400, 401, 402, 403, or a 429 without Retry-After (credits exhausted)
                log(call_id=call_id, status=status, attempt=attempt, error=error_message(response))
                raise FatalAPIError(f"{status}: {error_message(response)}")
        if attempt == MAX_ATTEMPTS:
            break
        wait = min(wait, MAX_DELAY)
        log(call_id=call_id, status=status, attempt=attempt, delay=round(wait, 2))
        time.sleep(wait)
    raise FatalAPIError(f"Gave up after {MAX_ATTEMPTS} attempts, last status {status}")


if __name__ == "__main__":
    sample = (
        "Search engines reward pages that answer a question clearly. A short, direct "
        "answer at the top of each section helps readers and helps AI tools quote the page."
    )
    print(humanize_with_retry(sample))

Script 2 sorts every response into three groups. A 200 returns the text at once, a retryable status waits and loops, and any other status raises FatalAPIError straight away, so a bad key never burns through retries. MAX_ATTEMPTS = 4 means one first try plus three retries, the same limit Phrasly's error-codes page recommends for a 503.

Script 2 treats a 429 with a Retry-After header as a rate limit and waits. A 429 without that header means the credits ran out on Phrasly, so the script stops, and Phrasly's documented error codes list the full set.

Rate limits vary widely between vendors, so read yours from the vendor's docs:

  • Phrasly: 5 requests per second per API key, counted separately for humanize and detect (Phrasly API docs, November 2026)

  • Undetectable AI: 3 requests per second per IP address (Undetectable AI API docs, November 2026)

  • WriteHuman: 40 requests per minute on Standard and up to 160 on Premium (WriteHuman API docs, November 2026)

Which Status Codes to Retry and Which to Fail Fast

Which Status Codes to Retry

Status

Meaning

Retry?

What your code does

400 Bad Request

Invalid JSON, missing text or length out of range

โŒ No

Log the payload shape and fix the request

401 Unauthorized

Missing, wrong or revoked API key

โŒ No

Stop the batch and alert a person

402 Payment Required (Phrasly)

API access suspended after failed payments

โŒ No

Update the payment method

403 Forbidden (Phrasly)

No active subscription

โŒ No

Check the subscription

413 Payload Too Large

Text over the per-call cap, on vendors that use 413

โŒ No

Send it to the chunker in Rung 3

429 Too Many Requests

Rate limit hit, or credits exhausted on Phrasly

โœ… Rate limit only

Wait for Retry-After; stop on exhausted credits

500, 503 and timeouts

Server or network failure

โœ… Yes

Back off and retry up to MAX_ATTEMPTS

An oversize request is not a retry case, because the same text fails the same way every time. Phrasly reports text over 5,000 words as a 400, and other vendors use 413, but both need the chunker in Rung 3.

Back Off With Jitter and Honor Retry-After

Jitter adds a small random amount to each wait, so parallel workers don't all retry at the same moment and hit the limit again. Script 2 picks each wait in this order:

  • 1๏ธโƒฃ The Retry-After value, when the server sends one

  • 2๏ธโƒฃ The computed backoff of 2, 4 and then 8 seconds plus jitter, which matches Phrasly's suggested schedule

  • 3๏ธโƒฃ A 30-second ceiling on any single wait

If a vendor answers long texts with a 202 status and a job ID, apply the same backoff to polling, as Rung 4 shows. Phrasly answers every call directly, so it needs no polling.

The Retry Pattern in Node.js

The Node version follows the same rules and uses AbortSignal.timeout(), built into Node 18 and later, as the request timeout.

retry.mjs (javascript)

const API_URL = process.env.HUMANIZER_API_URL ?? "https://business.phrasly.ai/api/v1/humanize";
const RETRYABLE = new Set([500, 502, 503, 504]);
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

export async function humanizeWithRetry(text, maxAttempts = 4) {
  for (let attempt = 1; attempt <= maxAttempts; attempt++) {
    let res, wait = 2000 * 2 ** (attempt - 1);
    try {
      res = await fetch(API_URL, {
        method: "POST",
        headers: { "x-api-key": process.env.HUMANIZER_API_KEY, "Content-Type": "application/json" },
        body: JSON.stringify({ text }),
        signal: AbortSignal.timeout(300_000),
      });
    } catch { res = null; } // timeout or network error: retry
    if (res?.ok) return res.text();
    const retryAfter = res?.headers.get("retry-after");
    if (res && res.status === 429 && retryAfter) wait = Number(retryAfter) * 1000;
    else if (res && !RETRYABLE.has(res.status)) throw new Error(`${res.status}: ${(await res.json()).error}`);
    if (attempt < maxAttempts) await sleep(Math.min(wait + Math.random() * wait / 2, 30_000));
  }
  throw new Error(`Gave up after ${maxAttempts} attempts`);
}

console.log(await humanizeWithRetry("Search engines reward pages that answer a question clearly. A short, direct answer at the top of each section helps readers and helps AI tools quote the page."));

๐Ÿ“Œ Four rules to keep in every retry loop:

  • Handle errors by status code, not by message text

  • Set a timeout on every request

  • Cap retries so a bad batch can't loop forever

  • Alert a person on any 401, because it means a missing or revoked key

Rung 3: Split Long Documents and Humanize Them in Bulk

Quote on chunking long documents by paragraph

Yes, a humanizer API works with long texts once you split them by paragraph under the per-call word limit and reassemble the chunks in order. Phrasly's docs give the same advice for chunking long documents: split anything over 5,000 words at paragraph boundaries and send each part.

Script 3: chunker.py (checked against Phrasly's API docs, November 2026). What this adds: paragraph chunks under the word cap, returned as (index, chunk) tuples.

chunker.py (python)

import re
from dataclasses import dataclass

MAX_WORDS = 4500   # headroom below Phrasly's 5,000-word cap; tune from your own runs
MIN_WORDS = 20     # Phrasly rejects requests under 20 words

URL_ONLY = re.compile(r"^\s*https?://\S+\s*$")
SENTENCE_END = re.compile(r"(?<=[.!?])\s+")


@dataclass
class Chunk:
    text: str
    send: bool  # False = pass through untouched (code, tables, bare URLs)


def words(text):
    return len(text.split())


def split_blocks(document):
    """Split on blank lines, but keep fenced code blocks whole."""
    blocks, current, in_code = [], [], False
    for line in document.splitlines():
        if line.strip().startswith("```"):
            in_code = not in_code
        if not line.strip() and not in_code:
            if current:
                blocks.append("\n".join(current))
                current = []
            continue
        current.append(line)
    if current:
        blocks.append("\n".join(current))
    return blocks


def is_passthrough(block):
    first = block.lstrip()
    return first.startswith("```") or first.startswith("|") or bool(URL_ONLY.match(block))


def is_heading(block):
    return block.lstrip().startswith("#")


def split_long_paragraph(paragraph):
    """Pack whole sentences under MAX_WORDS. A sentence is never cut."""
    parts, current = [], []
    for sentence in SENTENCE_END.split(paragraph):
        if current and words(" ".join(current + [sentence])) > MAX_WORDS:
            parts.append(" ".join(current))
            current = []
        current.append(sentence)
    if current:
        parts.append(" ".join(current))
    return parts


def chunk_document(document):
    """Return a list of (index, Chunk) tuples in document order."""
    chunks, buffer, pending_heading = [], [], None

    def flush():
        if buffer:
            chunks.append(Chunk("\n\n".join(buffer), send=True))
            buffer.clear()

    for block in split_blocks(document):
        if is_passthrough(block):
            flush()
            if pending_heading:
                chunks.append(Chunk(pending_heading, send=False))
                pending_heading = None
            chunks.append(Chunk(block, send=False))
            continue
        if is_heading(block):
            pending_heading = block  # attach to the paragraph that follows
            continue
        unit = f"{pending_heading}\n\n{block}" if pending_heading else block
        pending_heading = None
        pieces = [unit] if words(unit) <= MAX_WORDS else split_long_paragraph(unit)
        for piece in pieces:
            if buffer and words("\n\n".join(buffer + [piece])) > MAX_WORDS:
                flush()
            buffer.append(piece)
    flush()
    if pending_heading:
        chunks.append(Chunk(pending_heading, send=False))

    # A chunk under the API minimum is sent as-is rather than rejected with a 400.
    for chunk in chunks:
        if chunk.send and words(chunk.text) < MIN_WORDS:
            chunk.send = False
    return list(enumerate(chunks))


def reassemble(results):
    """results: dict of index -> text. Order comes from the index, never from finish time."""
    return "\n\n".join(results[i] for i in sorted(results))


if __name__ == "__main__":
    import sys
    text = open(sys.argv[1], encoding="utf-8").read()
    for index, chunk in chunk_document(text):
        print(index, "SEND" if chunk.send else "KEEP", words(chunk.text), "words")

Script 3 packs whole paragraphs under a 4,500-word budget and never cuts a sentence. It keeps each heading attached to the paragraph after it and passes code blocks, tables and bare URLs through untouched, because a humanizer would rewrite them.

chunk_document() returns a list of (index, chunk) tuples, and each chunk carries a send flag. Chunks marked False skip the API, and reassemble() joins every result by index, never by finish time, so a chunk that finishes first can't jump ahead in the document. A chunk under 20 words also stays as it is, because Phrasly rejects requests under that minimum.

Chunk by Paragraph and Keep the Order

Paragraph boundaries keep meaning intact, while a split in the middle of a sentence leaves broken transitions after the rewrite. Per-call caps vary by vendor, so set your budget from the vendor's own docs.

Per-Call Word Limits by Vendor

Vendor

Words per call

Source and date

Phrasly

20 to 5,000

Phrasly API docs, November 2026

WriteHuman

2,000 (Standard); 4,000 to 6,000 (Premium)

WriteHuman API docs, November 2026

Walter Writes AI

50 to 2,000

Walter Writes API docs, November 2026

ToHuman

2,000 on the sync endpoint

ToHuman API page, November 2026

Limits come from each vendor's own live docs, checked November 2026, and can change. Check the vendor's docs before you set your budget.

๐Ÿ’ก Headings Survive on Phrasly

On Phrasly's standard model, paragraphs under 15 words pass through unchanged, so short headings keep their exact wording after a rewrite.

Run Chunks Concurrently Under Your Rate Limit

To humanize AI-generated text in bulk with Python, send chunks concurrently with httpx.AsyncClient and an asyncio.Semaphore sized below the vendor's documented rate limit. Script 4 caps open requests at 4 and spaces request starts 0.25 seconds apart, which keeps it under Phrasly's 5 requests per second without any extra humanize AI text Python library.

Script 4: batch_async.py (checked against Phrasly's API docs, November 2026). What this adds: concurrent calls with the Rung 2 retry rules, order kept by index, failed chunks tracked.

batch_async.py (python)

import asyncio
import csv
import os
import re
import sys

import httpx

from chunker import chunk_document, reassemble
from retry import RETRYABLE, MAX_ATTEMPTS, backoff, error_message, log, retry_after_seconds

API_URL = os.environ.get("HUMANIZER_API_URL", "https://business.phrasly.ai/api/v1/humanize")
API_KEY = os.environ["HUMANIZER_API_KEY"]

MAX_CONCURRENT = 4        # below Phrasly's 5 requests per second per key
MIN_START_GAP = 0.25      # seconds between request starts, so bursts stay under the limit
PRICE_PER_1K = 0.14       # Phrasly standard humanize rate, USD per 1,000 input words
BRANDS = ["Phrasly"]      # add your own brand and product names

URL = re.compile(r"https?://[^\s)\]>\"']+")
MD_ANCHOR = re.compile(r"\[([^\]]+)\]\(https?://[^)]+\)")


def build_protected_terms(row):
    """Target keyword, link anchors, URLs, brand names and citations for one draft."""
    terms = [row.get("keyword", "").strip()]
    terms += MD_ANCHOR.findall(row["body"])
    terms += URL.findall(row["body"])
    terms += [b for b in BRANDS if b in row["body"]]
    terms += [c.strip() for c in row.get("citations", "").split("|")]
    return sorted({t for t in terms if t and t in row["body"]})


class StartGate:
    """Spaces out request starts across all workers."""
    def __init__(self, gap):
        self.gap, self.lock, self.last = gap, asyncio.Lock(), 0.0

    async def wait(self):
        async with self.lock:
            now = asyncio.get_running_loop().time()
            delay = self.last + self.gap - now
            if delay > 0:
                await asyncio.sleep(delay)
            self.last = asyncio.get_running_loop().time()


async def humanize_async(client, semaphore, gate, text):
    """Rung 2 retry rules, written for async code."""
    for attempt in range(1, MAX_ATTEMPTS + 1):
        async with semaphore:
            await gate.wait()
            try:
                response = await client.post(API_URL, json={"text": text})
            except (httpx.TimeoutException, httpx.TransportError):
                status, wait = "network_error", backoff(attempt)
            else:
                status = response.status_code
                if status == 200:
                    return response.text
                if status == 429 and "Retry-After" in response.headers:
                    seconds = retry_after_seconds(response)
                    wait = seconds if seconds is not None else backoff(attempt)
                elif status in RETRYABLE:
                    wait = backoff(attempt)
                else:
                    raise RuntimeError(f"{status}: {error_message(response)}")
        if attempt < MAX_ATTEMPTS:
            log(status=status, attempt=attempt, delay=round(wait, 2))
            await asyncio.sleep(wait)
    raise RuntimeError(f"gave up after {MAX_ATTEMPTS} attempts, last status {status}")


async def process_draft(client, semaphore, gate, row):
    chunks = chunk_document(row["body"])
    results, failed = {}, []

    async def run(index, chunk):
        if not chunk.send:
            results[index] = chunk.text
            return
        try:
            results[index] = await humanize_async(client, semaphore, gate, chunk.text)
        except RuntimeError as exc:
            results[index] = chunk.text   # keep the original so the draft stays whole
            failed.append(index)
            log(slug=row["slug"], chunk=index, error=str(exc))

    await asyncio.gather(*(run(i, c) for i, c in chunks))
    return reassemble(results), sorted(failed)


async def main(export_path, output_path):
    with open(export_path, newline="", encoding="utf-8") as f:
        rows = list(csv.DictReader(f))   # columns: slug, title, body, keyword, citations

    headers = {"x-api-key": API_KEY, "Content-Type": "application/json"}
    timeout = httpx.Timeout(300.0, connect=10.0)
    semaphore, gate = asyncio.Semaphore(MAX_CONCURRENT), StartGate(MIN_START_GAP)

    async with httpx.AsyncClient(headers=headers, timeout=timeout) as client:
        outputs = await asyncio.gather(*(process_draft(client, semaphore, gate, r) for r in rows))

    total_words = 0
    with open(output_path, "w", newline="", encoding="utf-8") as f:
        writer = csv.writer(f)
        writer.writerow(["slug", "title", "original", "humanized", "protected_terms", "failed_chunks"])
        for row, (humanized, failed) in zip(rows, outputs):
            total_words += len(row["body"].split())
            writer.writerow([row["slug"], row["title"], row["body"], humanized,
                             "|".join(build_protected_terms(row)), " ".join(map(str, failed))])

    print(f"{len(rows)} drafts, {total_words:,} input words, "
          f"estimated cost ${total_words / 1000 * PRICE_PER_1K:,.2f}")


if __name__ == "__main__":
    asyncio.run(main(sys.argv[1], sys.argv[2]))
  • ๐Ÿ“ Sizing the semaphore: Size it from the vendor limit. Walter Writes AI caps synchronous calls at 3 per minute per user, so concurrency there often has to be 1.

  • โณ Timeouts: WriteHuman's API page lists an average response of about 20 seconds, so set the read timeout well above your vendor's average. Script 4 uses 300 seconds.

  • ๐Ÿงฏ Partial failures: Script 4 records failed chunk numbers, keeps the original text for them and lets you rerun only those chunks.

Script 4 starts every draft and every chunk inside one asyncio.gather() call, while the semaphore and the start gate decide how fast the requests actually go. Because of that split, you can raise MAX_CONCURRENT for a vendor with a higher limit without changing anything else.

Example: Humanize 50 Blog Drafts From a CMS Export

For a content team, the bulk job usually starts with a CMS export. Export the drafts as a CSV with slug, title, body, keyword and citations columns, run python batch_async.py export.csv humanized.csv, and send the output file to editorial review.

๐Ÿ”’ Before you send anything, Script 4 builds a protected-terms list for each draft:

  • The target keyword

  • Internal link anchors and their URLs

  • Brand names

  • Citations

Script 8 checks later that every term survived the rewrite. A rewrite that drops a target keyword or breaks an internal link undoes the SEO work behind a draft, which is why keyword handling weighs heavily in how SEO content teams choose a humanizer.

To estimate cost, multiply your total input words by the vendor's rate per 1,000 words. At Phrasly's $0.14 per 1,000 words, 50 drafts of 1,500 words (75,000 words) cost about $10.50, paid from the $100 in credits that the $100 monthly plan includes.

Rung 4: Use Async Jobs, Webhooks and Streaming for Slow Calls

For slow or bulk calls, submit the text as an async job, store the job ID it returns, then poll with exponential backoff or receive a webhook, and keep the number of open jobs under the API's pending-jobs limit. Async jobs and rate limits work together, because every status check counts against the same limit and needs the Rung 2 backoff.

A synchronous call inside a web request handler blocks a worker for as long as the rewrite takes, and long drafts can take about 20 seconds per call on some APIs. Script 5 and Script 6 are vendor-neutral and target a generic POST /jobs and GET /jobs/{id} shape, so check your vendor's docs for the real paths and field names.

๐Ÿ”’ What Phrasly's API Supports

  • โœ… Synchronous responses

  • โœ… Streaming with stream: true

  • โŒ Async jobs

  • โŒ Webhooks

Source: Phrasly API docs, November 2026.

Poll an Async Job (Vendor-Neutral)

Script 5 submits the text, reads the job_id, then checks the status with growing gaps until the job is completed or failed. It caps open jobs with a semaphore, because job APIs limit pending jobs per plan.

Script 5: poll_job.py (vendor-neutral pattern). What this adds: job polling with backoff, a total timeout and a cap on open jobs.

poll_job.py (python)

# Vendor-neutral pattern. Phrasly's API answers synchronously, so this script
# targets an API that uses POST /jobs and GET /jobs/{id}. Check your vendor's docs
# for the real paths, field names and pending-jobs limit.
import json
import os
import random
import threading
import time

import requests

JOBS_URL = os.environ["JOBS_BASE_URL"]       # for example https://api.example.com/v1
API_KEY = os.environ["HUMANIZER_API_KEY"]
HEADERS = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}

TIMEOUT = (10, 60)          # (connect, read) seconds, tunable
FIRST_POLL = 2.0            # seconds before the first status check
MAX_POLL_GAP = 30.0         # ceiling between checks
TOTAL_TIMEOUT = 600.0       # give up on one job after 10 minutes
MAX_OPEN_JOBS = 5           # set from your vendor's pending-jobs limit

open_jobs = threading.BoundedSemaphore(MAX_OPEN_JOBS)


def log(**fields):
    print(json.dumps(fields), flush=True)


def submit(text):
    response = requests.post(f"{JOBS_URL}/jobs", json={"text": text}, headers=HEADERS, timeout=TIMEOUT)
    response.raise_for_status()
    return response.json()["job_id"]


def wait_for(job_id):
    started, gap = time.monotonic(), FIRST_POLL
    while time.monotonic() - started < TOTAL_TIMEOUT:
        time.sleep(gap + random.uniform(0, gap / 2))
        response = requests.get(f"{JOBS_URL}/jobs/{job_id}", headers=HEADERS, timeout=TIMEOUT)
        if response.status_code == 429:
            gap = float(response.headers.get("Retry-After", gap * 2))
            continue
        response.raise_for_status()
        job = response.json()
        if job["status"] == "completed":
            return job["output"]
        if job["status"] == "failed":
            raise RuntimeError(job.get("error", "job failed"))
        gap = min(MAX_POLL_GAP, gap * 2)
    raise TimeoutError(f"job {job_id} still running after {TOTAL_TIMEOUT:.0f}s")


def humanize_job(text, retries_left=1):
    with open_jobs:                      # never more than MAX_OPEN_JOBS in flight
        job_id = submit(text)
        log(job_id=job_id, event="submitted")
        try:
            return wait_for(job_id)
        except (RuntimeError, TimeoutError) as exc:
            log(job_id=job_id, event="failed", error=str(exc))
    if retries_left:                     # one fresh attempt, never a tight loop
        return humanize_job(text, retries_left - 1)
    return text                          # keep the original untouched


if __name__ == "__main__":
    print(humanize_job("Paste a draft paragraph of at least 50 words here to test the job flow."))
  • ๐Ÿ” Failure branch: The script logs the job ID, keeps the original text and retries the job once, never in a tight loop.

  • โฒ๏ธ Timeouts: TIMEOUT = (10, 60) sets connect and read limits on every request, and you can tune both.

  • ๐Ÿšฆ Retry-After: A 429 during polling waits for the header value before the next check.

The gap between checks doubles after each one, from 2 seconds up to a 30-second ceiling, and TOTAL_TIMEOUT stops a single job after 10 minutes. Random jitter on every wait keeps many polling workers from checking at the same moment.

Receive Results With a FastAPI Webhook (Vendor-Neutral)

A webhook receiver is a route on your server that the vendor calls when a job finishes. Script 6 answers with a 2xx status at once and hands the work to BackgroundTasks, so the vendor never retries because of a slow reply.

Script 6: webhook_app.py (vendor-neutral pattern). What this adds: a signed, idempotent webhook route that answers fast.

webhook_app.py (python)

# Vendor-neutral pattern. Phrasly's API returns results in the response, so it
# sends no webhooks. Header names below are placeholders: use the names your
# vendor documents for its signature and timestamp.
import hashlib
import hmac
import json
import os
import time

from fastapi import BackgroundTasks, FastAPI, HTTPException, Request

SECRET = os.environ["WEBHOOK_SECRET"].encode()
MAX_AGE = 300                    # reject events older than 5 minutes
processed_ids = set()            # use a database table in production

app = FastAPI()


def valid_signature(raw_body, timestamp, signature):
    message = f"{timestamp}.".encode() + raw_body
    expected = hmac.new(SECRET, message, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature)   # constant-time compare, never ==


def save_result(event):
    # Write event["output"] to your CMS, database or queue here.
    print("saved", event["job_id"])


@app.post("/humanizer-callback")
async def humanizer_callback(request: Request, tasks: BackgroundTasks):
    raw = await request.body()                       # raw bytes before any JSON parsing
    timestamp = request.headers.get("X-Webhook-Timestamp", "0")
    signature = request.headers.get("X-Webhook-Signature", "")

    if not valid_signature(raw, timestamp, signature):
        raise HTTPException(status_code=401, detail="bad signature")
    if abs(time.time() - int(timestamp)) > MAX_AGE:
        raise HTTPException(status_code=401, detail="stale event")

    event = json.loads(raw)
    if event["job_id"] in processed_ids:             # duplicate delivery: accept and ignore
        return {"ok": True, "duplicate": True}
    processed_ids.add(event["job_id"])

    tasks.add_task(save_result, event)               # answer fast, work later
    return {"ok": True}

BackgroundTasks runs save_result() after the response goes out, so a slow database write never delays the 2xx status the vendor waits for.

The handler is idempotent, which means a repeated event changes nothing: it stores processed job IDs and ignores duplicates, because webhook senders can deliver one event more than once. For local testing, expose the route with a tunnel tool such as ngrok, and use HTTPS in production.

Verify the Signature Before You Trust the Payload

  • Read the raw bytes with await request.body() before any JSON parsing

  • Compute an HMAC-SHA256 with the shared secret, and compare with hmac.compare_digest, never ==

  • Reject a mismatch with a 401

  • Reject events with a stale timestamp, which blocks replayed requests

Header names and the signed string differ by vendor, so copy them from your vendor's webhook docs. The humanizer API Node equivalent uses express.raw() to keep the raw body and crypto.timingSafeEqual on equal-length buffers.

webhook.mjs (Express) (javascript)

import crypto from "node:crypto";
import express from "express";

const app = express();
const secret = process.env.WEBHOOK_SECRET;
const seen = new Set();

app.post("/humanizer-callback", express.raw({ type: "application/json" }), (req, res) => {
  const ts = req.get("X-Webhook-Timestamp") ?? "0";
  const sig = Buffer.from(req.get("X-Webhook-Signature") ?? "");
  const expected = Buffer.from(crypto.createHmac("sha256", secret).update(`${ts}.`).update(req.body).digest("hex"));
  if (sig.length !== expected.length || !crypto.timingSafeEqual(sig, expected)) return res.sendStatus(401);
  if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return res.sendStatus(401);
  const event = JSON.parse(req.body);
  res.sendStatus(200);                       // answer first
  if (!seen.has(event.job_id)) { seen.add(event.job_id); /* save event.output */ }
});

app.listen(3000);

Stream Results as Each Chunk Finishes

Phrasly streams: set "stream": true, and the body arrives as chunked plain UTF-8 text that you append in order, with no SSE or NDJSON framing to parse. Script 7 reads that stream with requests.post(..., stream=True) inside a with block and adds a FastAPI route that streams a long draft chunk by chunk.

Script 7: stream.py (checked against Phrasly's API docs, November 2026). What this adds: live output from Phrasly's stream, plus a route that streams a long draft chunk by chunk.

stream.py (python)

import os

import requests
from fastapi import FastAPI
from fastapi.responses import StreamingResponse
from pydantic import BaseModel

from chunker import chunk_document

API_URL = os.environ.get("HUMANIZER_API_URL", "https://business.phrasly.ai/api/v1/humanize")
API_KEY = os.environ["HUMANIZER_API_KEY"]
HEADERS = {"x-api-key": API_KEY, "Content-Type": "application/json"}


def stream_humanize(text):
    """Yield pieces of humanized text as the API writes them."""
    payload = {"text": text, "stream": True}
    with requests.post(API_URL, json=payload, headers=HEADERS, stream=True, timeout=(10, 300)) as r:
        r.raise_for_status()
        r.encoding = "utf-8"                 # the body is chunked plain UTF-8 text
        for piece in r.iter_content(chunk_size=None, decode_unicode=True):
            if piece:
                yield piece


app = FastAPI()


class Draft(BaseModel):
    text: str


@app.post("/humanize-stream")
def humanize_stream(draft: Draft):
    def generate():
        for index, chunk in chunk_document(draft.text):
            if index:
                yield "\n\n"
            if chunk.send:
                yield from stream_humanize(chunk.text)
            else:
                yield chunk.text             # code, tables and URLs go out unchanged
    return StreamingResponse(generate(), media_type="text/plain; charset=utf-8")


if __name__ == "__main__":
    sample = (
        "Content teams publish faster when every draft follows the same checklist. "
        "A shared checklist also makes reviews quicker, because editors know where to look first."
    )
    for piece in stream_humanize(sample):
        print(piece, end="", flush=True)
    print()

Streaming lets the first paragraph appear in the editor within seconds while the rest of a long draft is still processing. With proofread on, Phrasly sends the text in one piece after proofreading finishes, so a live stream shows no partial text in that case.

๐Ÿงญ Which pattern to choose:

  • โšก Sync: Short inputs, low volume and scripts with no user waiting

  • ๐Ÿ”„ Polling: Batch jobs and cron scripts with no public endpoint

  • ๐Ÿ“ฌ Webhook: Production apps with a public HTTPS URL and many concurrent jobs

  • ๐Ÿ“บ Streaming: Editor and CMS screens where a person watches the output appear

Rung 5: Check Every Output Before It Ships

Yes, humanized text can still be flagged, so check that the meaning, protected terms, numbers and links survived before you look at any detection score. Script 8 is the humanizer API Python step that runs after every batch from Scripts 1 to 7, and it writes a pass or fail report per draft to a CSV file.

Script 8 can also send each output to the detection endpoint on the same account. Phrasly's detect endpoint uses the same API key and the same x-api-key header, costs $0.02 per 1,000 words and accepts 50 words up to 15,000 characters. It returns a label with AI and human percentages, and Phrasly builds that label from sentence-level scores, one of the methods behind how an AI detection API scores text.

Script 8: verify.py (checked against Phrasly's API docs, November 2026). What this adds: a pass or fail report per draft, a diff for every failure and an optional detection signal.

verify.py (python)

import csv
import difflib
import os
import re
import sys

import requests

API_KEY = os.environ["HUMANIZER_API_KEY"]
DETECT_URL = os.environ.get("DETECT_API_URL", "https://business.phrasly.ai/api/v1/detect")

WORD_RATIO_BAND = (0.85, 1.15)   # illustrative starting band: tune it on your own sample
NUMBER = re.compile(r"\d[\d,]*(?:\.\d+)?%?")
URL = re.compile(r"https?://[^\s)\]>\"']+")


def missing_terms(terms, output):
    return [t for t in terms if t not in output]          # case-sensitive on purpose


def changed_items(pattern, original, output):
    before, after = set(pattern.findall(original)), set(pattern.findall(output))
    return sorted(before - after)                          # dropped or altered


def detection_signal(text):
    """Optional: one signal from the detect endpoint on the same API key."""
    if len(text.split()) < 50 or len(text) > 15000:       # endpoint input limits
        return "skipped"
    r = requests.post(DETECT_URL, json={"text": text},
                      headers={"x-api-key": API_KEY, "Content-Type": "application/json"},
                      timeout=(10, 60))
    r.raise_for_status()
    data = r.json()["data"]
    return f'{data["Label"]} (AI {data["AI"]}%)'


def check(row, run_detection):
    original, output = row["original"], row["humanized"]
    terms = [t for t in row["protected_terms"].split("|") if t]
    ratio = len(output.split()) / max(1, len(original.split()))
    problems = []
    if lost := missing_terms(terms, output):
        problems.append(f"missing terms: {lost}")
    if not WORD_RATIO_BAND[0] <= ratio <= WORD_RATIO_BAND[1]:
        problems.append(f"word ratio {ratio:.2f}")
    if nums := changed_items(NUMBER, original, output):
        problems.append(f"numbers changed: {nums}")
    if urls := changed_items(URL, original, output):
        problems.append(f"URLs changed: {urls}")
    signal = detection_signal(output) if run_detection else "not run"
    return problems, ratio, signal


def main(batch_csv, report_csv, run_detection=False):
    with open(batch_csv, newline="", encoding="utf-8") as f:
        rows = list(csv.DictReader(f))
    with open(report_csv, "w", newline="", encoding="utf-8") as f:
        writer = csv.writer(f)
        writer.writerow(["slug", "result", "word_ratio", "problems", "detection_signal"])
        for row in rows:
            problems, ratio, signal = check(row, run_detection)
            writer.writerow([row["slug"], "FAIL" if problems else "PASS",
                             f"{ratio:.2f}", "; ".join(problems), signal])
            if problems:                                   # readable diff for the editor
                print(f"\n=== {row['slug']}: {'; '.join(problems)}")
                diff = difflib.unified_diff(row["original"].splitlines(), row["humanized"].splitlines(),
                                            "original", "humanized", lineterm="")
                print("\n".join(diff))


if __name__ == "__main__":
    main(sys.argv[1], sys.argv[2], run_detection="--detect" in sys.argv)

Run python verify.py humanized.csv report.csv to check a batch, and add --detect to request a detection signal for each draft. Drafts under 50 words or over 15,000 characters skip the detection call, because the detect endpoint rejects them.

  • ๐Ÿ”’ Protected terms: Script 8 reuses the Rung 3 list and fails the draft if any term is missing or changed. The check is case-sensitive, so "Phrasly" and "phrasly" count as different terms.

  • ๐Ÿ“ Word ratio: Output words divided by input words must stay inside a band. The 0.85 to 1.15 band in the config is illustrative, so tune it on your own sample.

  • ๐Ÿ”ข Numbers and URLs: A regex pulls both from the input and the output, and the script reports anything dropped or changed.

  • ๐Ÿงพ Readable diff: Every failed draft prints a line-by-line diff, so an editor can fix it by hand.

A changed statistic or a broken internal link costs more than a detector flag, because it puts a false fact or a dead link on a live page.

What a Detection Score Can and Cannot Tell You

A detection score is one signal, because detectors use different models and can score the same humanized text differently. No humanizer, including Phrasly's, can promise a specific detector result.

๐Ÿ“Š Detectors React to Humanizers Differently

In a 2025 University of Chicago working paper by Jabarian and Imas, Pangram stayed robust to humanizer tools such as StealthGPT, while the performance of the other detectors tested became case-dependent.

Read a score as a prompt for a human editor, never as a pass or fail gate. Script 8 can't judge tone or flow, so manual humanization techniques that still matter after the API belong in your editing pass.

โœ… Pre-publish checklist:

  • All protected terms are present and spelled exactly

  • The word ratio stays inside the team's band

  • No numbers, URLs or citations were dropped or changed

  • A human editor has read the intro, the headings and any flagged diffs

  • Any detection score is logged as one signal, not a pass or fail gate

Which Humanizer API Should You Pick for a Python Project?

Pick on five criteria, then run Script 1 and Script 8 on your own sample before you commit:

  • The per-call word cap

  • The rate limit

  • The billing unit

  • The documentation quality

  • Whether detection shares the same key

Disclosure: Phrasly builds one of the APIs in this table and in the examples on this page, and the comparison uses each vendor's own published figures. If you need an AI humanizer API free tier for prototyping, ToHuman is the only vendor here with an ongoing free API allowance.

Humanizer APIs Compared for Python Projects

Vendor

Free tier or entry

Billing unit

Notable limit

Source and date

ToHuman

Free: 250 word credits. Entry: Starter at $29/mo for 72,500 words

Words

2,000 words per sync call; 60 req/min free, 300 on Pro

ToHuman API page, November 2026

StealthGPT

Free: none listed. Entry: $0.20 per 1K words extra usage (Super $0.50)

Input plus output words; Super uses 2.5 plan words

3,000 input words per sync call; rate limit not listed

StealthGPT API page, November 2026

WriteHuman

Free: none for the API. Entry: $29/mo for 125K words

Input words

2,000 words per call and 40 req/min on Standard

WriteHuman API page, November 2026

Undetectable AI

Free: 250-word trial. Entry: $9.99/mo for 10K words, billed monthly

Words (API plan)

3 req/sec per IP; 50 to 15,000 characters per call

Undetectable AI pricing, November 2026

Walter Writes AI

Free: 2,000-credit trial (5 days). Entry: $49/mo for 300K credits

Credits (1 credit per word)

50 to 2,000 words per call; 3 sync req/min

Walter Writes API docs, November 2026

Phrasly

Free: none. Entry: $100/mo plan with $100 in credits, $0.14 per 1K words

Input words

20 to 5,000 words per call; 5 req/sec per key

Phrasly Business API pricing and docs, November 2026

Prices and limits come from each vendor's own live pages, checked November 2026. Prices can change, so check the vendor's page before you buy.

Each vendor's auth style, response format and async support are covered in our full comparison of AI humanizer APIs for developers, which Phrasly also publishes.

Check the billing unit before the headline rate. StealthGPT counts input plus output words, so its effective cost per published word can be roughly double its $0.20 rate, and its Super model uses 2.5 plan words for each word processed.

Monthly minimums matter as much as rates at low volume. Phrasly's $100 plan suits steady production traffic, while ToHuman's free allowance or $19 Pro plan costs less for a side project that sends a few thousand words a month.

๐Ÿ“š For developers, the best AI humanizer API is often the one with the clearest docs, so score each vendor on the same checklist:

  • The auth header format

  • A request and response sample

  • Every error code and what to do about it

  • Rate limits stated as numbers

  • Webhook signing or streaming details

  • Working Python examples

How Each Vendor's API Docs Score on the Checklist

Vendor

Auth header

Request and response sample

Error codes

Rate limits as numbers

Webhook signing or streaming

Python examples

Score

Phrasly

โœ…

โœ…

โœ…

โœ…

โœ… Streaming

โœ…

6/6

Walter Writes AI

โœ…

โœ…

โœ…

โœ…

โš ๏ธ Shared-secret header, no signature

โŒ cURL only

4/6

WriteHuman

โœ…

โœ…

โœ…

โœ…

โŒ

โš ๏ธ Python tab, TypeScript shown first

4/6

Undetectable AI

โœ…

โœ…

โœ…

โœ…

โŒ Polling only

โš ๏ธ Incomplete snippets

4/6

ToHuman

โœ…

โœ…

โœ…

โœ…

โŒ No signing details

โŒ cURL only

4/6

StealthGPT

โœ…

โš ๏ธ Excerpts only

โœ…

โŒ

โš ๏ธ Signed webhook, no verify steps

โœ…

3/6

Scored from each vendor's own API docs and API pages, checked November 2026. โœ… = covered, โš ๏ธ = partly covered, โŒ = missing. The score counts โœ… only. Docs change often, so recheck before you pick.

Is There a Pip Package, or Do You Need an API Key?

You can humanize text without a vendor's API key, through an open-source project from GitHub or PyPI, or through a local open-weight LLM that you prompt to paraphrase. One trending open-source humanizer on GitHub installs from a cloned repo with a requirements file, and its config still asks for an LLM key and a translation key.

โš–๏ธ What the open-source path costs you:

  • ๐Ÿ› ๏ธ Maintenance: You own dependency updates and model downloads

  • ๐ŸŽฒ Output quality: Quality varies between projects and model sizes

  • ๐Ÿ’ป Compute cost: A local model needs GPU or CPU time that you pay for

  • ๐Ÿ†˜ Support: You get no SLA and no vendor to contact when it breaks

A hosted API still means writing a thin Python client like Script 1, unless the vendor publishes an SDK. Phrasly publishes no official SDK, so Script 1 is the client.

What 1 Million Words a Month Costs

At 1 million input words a month, Phrasly costs $140: the $100 plan covers about 714,000 words, and autopay bills the rest at the same $0.14 rate.

  • Phrasly: $140 (1,000,000 words at $0.14 per 1,000)

  • Walter Writes AI: $129 on the 1M-credit plan

  • WriteHuman: $179 on Premium 800K ($129) plus two 100K top-ups ($25 each)

  • ToHuman: $181 on Pro ($19 for 100K words) plus eighteen 50K-word packs ($9 each)

  • StealthGPT: about $400 at the $0.20 extra-usage rate, if output length matches input, because 1M input words become about 2M billable words

Costs are our own math from each vendor's live pricing, checked November 2026. Prices can change, so recheck them before you budget.

A November 2026 comparison on dev.to reached similar totals from published pricing: Walter $129, Phrasly $140, WriteHuman $179 to $225, ToHuman about $181 and StealthGPT about $379. Plug your own volume into this formula:

cost.py (python)

def monthly_cost(words, rate_per_1k, minimum=0.0, billable_multiplier=1.0):
    return max(minimum, words * billable_multiplier / 1000 * rate_per_1k)

print(monthly_cost(1_000_000, 0.14, minimum=100))           # Phrasly: 140.0
print(monthly_cost(1_000_000, 0.20, billable_multiplier=2))  # StealthGPT, input + output: 400.0

Ship Your First Humanizer Pipeline This Week

The easiest way to build a humanizer API Python pipeline for bulk text is to run Scripts 1 and 2 on a small sample, add the bulk and chunking scripts as volume grows, and keep Script 8 on every run. Start with a test batch of 10 drafts and log the cost per draft, so you know your real per-word spend before you scale.

Start With Scripts 1 and 2, Then Add Rungs as Volume Grows

  • ๐Ÿ“… Day 1: Scripts 1 and 2 (humanize.py and retry.py) for the first POST request, key handling and errors

  • ๐Ÿ“š When drafts pass the per-call cap or you process a CMS export: Scripts 3 and 4 (chunker.py and batch_async.py)

  • โฑ๏ธ When calls get slow or users wait on results: Scripts 5 to 7 (poll_job.py, webhook_app.py and stream.py)

  • โœ… Every run, without exception: Script 8 (verify.py)

Scripts 4 and 7 import their helpers from Scripts 2 and 3, so a new rung builds on the code you already run instead of replacing it.

Connect No-Code Tools and MCP Servers if You Do Not Want to Write Code

Content-ops leads who'd rather not maintain scripts have two no-code options on Phrasly. The Business dashboard accepts a CSV bulk upload of up to 100 documents, and the Phrasly Business MCP server connects the same humanizer and detector to Claude, ChatGPT, Cursor and other MCP clients.

An MCP server is a connector that lets an AI assistant such as Claude call outside tools, and MCP servers that connect writing tools to AI assistants give writers the same no-code route.

Get a Phrasly API Key With Per-Word Billing

Phrasly's own SEO team runs this pipeline on its blog content, and the Business plan bills per word: $0.14 per 1,000 words for humanizing and $0.02 per 1,000 for detection, from the $100 in credits in the $100 monthly plan. You can cancel anytime from the dashboard.


Get your key, paste it into Script 1 and run your first humanize call today.


FAQs

How Do I Use an AI Humanizer API in Python or JavaScript?

Send an HTTP POST request with your API key in a header and the text in a JSON payload. In Python, the requests library does this in one call, as Script 1 shows. In JavaScript, the built-in fetch in Node 18 sends the same request. Phrasly uses an x-api-key header, while vendors such as WriteHuman use a Bearer token.

Which AI Humanizer API Has a Real Free Tier?

ToHuman has the only ongoing free API allowance among the vendors compared here, at 2,500 words a month, per its API page in November 2026. Walter Writes AI offers a one-time 2,000-credit trial for 5 days, and Undetectable AI gives new accounts 250 word credits. Phrasly's Business API has no free tier or trial, and its $100 monthly plan includes $100 in credits.

Which AI Humanizer API Has the Best Documentation?

The best docs show the auth header format, a request and response sample, every error code, the rate limits, webhook or streaming details and working Python examples. Many comparison pages praise documentation without linking to it, so open each vendor's docs and score them on that checklist before you pick.

Can Humanized AI Text Still Be Detected?

Yes, it can. No humanizer can promise a result, and detectors respond differently to humanized text, as what Pangram's tests show about humanized text illustrates. Run every output through Script 8 before you ship, and remember that academic-integrity rules and platform terms of service still apply to humanized work.

Does an AI Humanizer Work With Long Texts?

Yes, once you split the text by paragraph under the per-call cap. Phrasly accepts up to 5,000 words per request. Script 3 packs whole paragraphs under a 4,500-word budget, and Script 4 reassembles the results by index, so the order of the document never changes.

Can I Humanize Python Code?

No, a humanizer API is built to rewrite prose, and running source code through it can break syntax or logic. Limit humanizing to docstrings, comments and README text. Script 3 keeps fenced code blocks out of the payload, so code in a draft passes through unchanged.

Is There a Python Library I Can Pip Install Instead of Using an API Key?

Open-source humanizer projects exist on GitHub and PyPI, but the trending one we checked still calls an LLM API, so you manage keys anyway. These projects also bring maintenance work, uneven output and no SLA. A hosted API needs only the requests library and a short client like Script 1.

Is It Allowed to Use a Humanizer API for Academic Work?

It depends on your institution's policy, so read it before you use any AI tool on graded work, and disclose AI use wherever the policy requires it. If a tool is allowed, keep your meaning and sources intact, using the steps for protecting meaning and citations in academic writing.

Written by

Alina Shah

SEO Content Specialist ยท Karachi, Pakistan

She writes about AI so you don't have to guess. 8+ years in content strategy and editing. Now she puts AI writing tools and detection systems through real tests and shares what actually works.

Share this article