DEVELOPER API
Humanize text API
free, no key.
A JSON API that runs the same rule engine as the workbench. No account, no API key, and no AI model: send text and get back the revised text with before and after metrics. Provided best effort, so it may be rate limited or withdrawn if usage costs grow.
Quick start
curl -s https://humanize.lbyte.app/api/rewrite \
-H 'Content-Type: application/json' \
-d '{"text":"In order to test, we utilize this.","contractions":true}'The response's revised field for this request is "To test, we use this.". Alongside it, before and after hold word, sentence, contraction, em dash, and stock phrase counts for the original and revised text.
Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /api/rewrite | Rewrite text and return before/after metrics |
POST | /api/batch | Rewrite a list of drafts with seeded variety and a cross-item report |
GET | /api/healthz | Service status and build identity |
The full contract is the OpenAPI 3.1 spec. Agents can read the plain text summary at /llms.txt.
POST /api/rewrite
Cleans one draft. With no options it applies the phrase rules and em dash cleanup only. Code, Markdown links and images, URLs, and double-quoted text are never edited.
| Field | Type | Description |
|---|---|---|
text required | string | Draft to rewrite. |
typos | boolean, default false | Insert up to two minor slips in prose of at least 250 words. |
stripFormatting | boolean, default false | Remove Markdown emphasis, code delimiters, quote markers, and table decoration. Links become "label (url)". |
contractions | boolean, default false | Add conversational contractions such as "do not" to "don't". |
expandContractions | boolean, default false | Spell out contractions such as "don't" to "do not". Ignored when contractions or a usable sample is set. |
synonyms | boolean or number, default false | Force plainer synonyms from a built-in dictionary, such as "utilization" to "use". true swaps every match; a number from 0 to 1 swaps that share of matches, spread evenly. Mostly safe; review the result. |
splitSentences | boolean, default false | Split long sentences joined by ", and I" or ", but we" into two sentences. |
expandAbbreviations | boolean, default false | Spell out short forms such as "apps", "e.g.", and "ASAP". |
extraSpaces | boolean or number, default false | Slip in spacing: a double space between words or after a sentence, or one trailing space at a line end. A number from 0 to 1 is the chance per word gap, and line ends get 5 times that chance (at most 1); true uses 0.02. Seeded from the text, so the same input gives the same result. |
sample | string | Genuine author prose (100+ words). Moves contraction use toward the sample's rate and overrides contractions. |
POST /api/batch
Cleans a list of related drafts, such as reviews, replies, or product blurbs. A number for an option is the exact share of items it applies to. Every random choice comes from seed, so the same request gives the same output.
curl -s https://humanize.lbyte.app/api/batch \
-H 'Content-Type: application/json' \
-d '{"texts":["We do not utilize it.","A large number of teams use it."],"contractions":0.5,"vary":true,"seed":7}'| Field | Type | Description |
|---|---|---|
texts required | string[] | Drafts to rewrite, 1 to 50 items, 60,000 characters in total. |
seed | integer | Seed for every shuffle. Omit to derive one from the texts; the response returns the seed used. |
contractions | boolean or number | Add conversational contractions. true applies to every item; a number from 0 to 1 is the exact share of items, chosen by seeded shuffle. |
typos | boolean or number | Allow slips: one per 250 eligible words across the batch, at most one or two per item, never the same slip twice. true applies to every item; a number from 0 to 1 is the exact share of items, chosen by seeded shuffle. |
stripFormatting | boolean or number | Remove Markdown styling. true applies to every item; a number from 0 to 1 is the exact share of items, chosen by seeded shuffle. |
synonyms | boolean or number | Force plainer synonyms from a built-in dictionary on every match in the chosen items. Mostly safe; review the result. true applies to every item; a number from 0 to 1 is the exact share of items, chosen by seeded shuffle. |
expandContractions | boolean or number | Spell out contractions; contractions win where both apply. true applies to every item; a number from 0 to 1 is the exact share of items, chosen by seeded shuffle. |
splitSentences | boolean or number | Split long sentences joined by ", and I" or ", but we". true applies to every item; a number from 0 to 1 is the exact share of items, chosen by seeded shuffle. |
expandAbbreviations | boolean or number | Spell out short forms such as "apps" and "e.g.". true applies to every item; a number from 0 to 1 is the exact share of items, chosen by seeded shuffle. |
extraSpaces | boolean or number | Slip in spacing (double spaces, trailing spaces at line ends) at a 0.02 chance per word gap (5 times that at line ends) in the chosen items. true applies to every item; a number from 0 to 1 is the exact share of items, chosen by seeded shuffle. |
moods | "casual" | "neutral" | "formal"[] | Deal mood presets evenly across items instead of per-option settings. casual: contractions, stripped formatting, typos, extra spaces. neutral: phrase cleanup only. formal: expand contractions and abbreviations. |
vary | boolean, default false | Rotate equally safe replacement wording and em-dash aside style across items. |
sample | string | Genuine author prose (100+ words). Its contraction rate applies to every item and overrides contraction settings and moods. |
Limits and errors
- Rewrite: up to 20,000 characters of text, a 50,000 character author sample, and a 75,000 character body.
- Batch: up to 50 drafts, 60,000 characters in total, and a 120,000 character body.
- Rate limit: 20 requests per 60 seconds per client, shared by both endpoints. Send one request at a time: a second concurrent request from the same client gets 429.
- Text is processed in memory and not stored.
Errors return { "error": string }:
400Invalid JSON or fields.413Request body too large.415Content-Type is not application/json.422Processing failed.429Too many requests from this client. Honor the Retry-After header.503Server is at capacity. Honor the Retry-After header.