# Humanize > Offline, deterministic prose checker and rewriter. Removes stock phrases, wordy connectors, sentence-opening preambles, and em-dash habits with 47 fixed phrase rules. No AI model: same input and options give the same output. Text is processed in memory and not stored. Free public API, no key or account. Provided best effort: it may be rate limited or withdrawn if usage costs grow. Send one request at a time: a second concurrent request from the same client gets 429. ## API - [POST /api/rewrite](https://humanize.lbyte.app/api/rewrite): rewrite text and return before/after metrics - [POST /api/batch](https://humanize.lbyte.app/api/batch): rewrite a list of drafts with seeded variety and a cross-item report - [GET /api/healthz](https://humanize.lbyte.app/api/healthz): service status and build commit - [OpenAPI 3.1 spec](https://humanize.lbyte.app/openapi.json): machine-readable contract for every endpoint ### POST /api/rewrite Request: JSON body, `Content-Type: application/json`. - `text` (string, required): draft to rewrite, 1 to 20,000 characters - `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 0 to 1, default false): force plainer synonyms from a built-in dictionary, such as "utilization" to "use"; `true` swaps every match, a number 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 - `expandAbbreviations` (boolean, default false): spell out short forms such as "apps", "e.g.", and "ASAP" - `stripFormatting` (boolean, default false): remove Markdown emphasis, code delimiters, quote markers, and table decoration; links become "label (url)" - `typos` (boolean, default false): insert up to two minor slips in prose of at least 250 words - `extraSpaces` (boolean or number 0 to 1, default false): spacing slips, a double space between words or after a sentence, or one trailing space at a line end; a number 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, optional, max 50,000 characters): genuine author prose (100+ words); moves contraction use toward the sample's rate and overrides `contractions` Whole request body must be under 75,000 characters. Response 200: `{ "revised": string, "before": Analysis, "after": Analysis }`. `Analysis` includes `words`, `sentences`, `paragraphs`, `averageSentenceWords`, `sentenceLengthVariation`, `contractionRate`, `punctuationPer100Words`, `emDashes`, `stockPhrases`, `repeatedOpenings`, and `repeatedTrigrams`. Errors: `{ "error": string }` with 400 (invalid JSON or fields), 413 (body too large), 415 (Content-Type is not `application/json`), or 422 (processing failed). Example: ```sh curl -s https://humanize.lbyte.app/api/rewrite \ -H 'Content-Type: application/json' \ -d '{"text":"In order to test, we utilize this.","contractions":true}' ``` ### POST /api/batch For lists of related drafts (reviews, replies, product blurbs). Same edits as `/api/rewrite`, plus choices that only make sense across a list. Every random choice comes from `seed`, so the same request gives the same output. - `texts` (string array, required): 1 to 50 drafts, each under 20,000 characters, 60,000 in total - `seed` (integer 0 to 4294967295, optional): omit to derive one from the texts; the response returns the seed used - `contractions`, `expandContractions`, `stripFormatting`, `typos`, `synonyms`, `splitSentences`, `expandAbbreviations`, `extraSpaces` (boolean or number 0 to 1): `true` applies to every item; a number is the exact share of items (0.4 of 10 items is always 4) - `typos` budget is batch-wide: one slip per 250 eligible words, spread over items, never the same slip twice - `moods` (array of `casual`, `neutral`, `formal`): deal presets evenly instead of per-option settings. casual: contractions, stripped formatting, typos, extra spaces. neutral: phrase cleanup only. formal: expand contractions and abbreviations. Moods are knob presets, not a tone model. Do not combine with the per-option fields - `vary` (boolean, default false): rotate equally safe replacement wording (for example "many" or "lots of") and em-dash aside style (parentheses or commas) across items - `sample` (string, optional): author prose; its contraction rate applies to every item Whole request body must be under 120,000 characters. Response 200: `{ "seed": number, "items": [{ "revised": string, "settings": { mood?, contractions, expandContractions, stripFormatting, typos, synonyms, splitSentences, expandAbbreviations, extraSpaces, variants, slips } }], "report": { "before": BatchReport, "after": BatchReport } }`. `BatchReport` lists `sharedOpenings`, `sharedClosings`, and `sharedTrigrams` (text plus zero-based item indexes), `nearDuplicates` (item pairs with similarity), and `shape` (word and sentence-length spread, list/heading/plain counts, `uniformLength`). ```sh 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}' ``` ## Behavior - Code blocks, inline code, Markdown links and images, URLs, and double-quoted text are never edited. - Text between a `[//]: # "humanize-ignore"` line and a `[//]: # "humanize-ignore-end"` line is never edited or counted. Use it for wording you reviewed and kept. Put a blank line before and after each marker so Markdown treats it as a comment that renders as nothing. Titles may also use single quotes or parentheses. Without an end line, the block runs to the end of the text. - Default options are idempotent: rewriting the output again changes nothing, so `revised == text` means the text is already clean. - Qualifiers (may, might, generally), numbers, and names are preserved. - Edits are heuristics, not a detector bypass. Review the diff before using revised text. ## Optional - [Web workbench](https://humanize.lbyte.app/): same engine with an inline diff - [API docs](https://humanize.lbyte.app/api-docs): human-readable field tables, limits, and error codes - [Em dash remover](https://humanize.lbyte.app/em-dash-remover): how each em dash is replaced