If you run AI-generated content through a humanizer as part of a real publishing pipeline, a CMS, a docs site, a newsletter, a product catalog, you already know the hidden tax. The text comes back sounding more natural, but the structure is wrecked. Headings collapse into paragraphs. Bullet lists turn into run-on sentences. Anchor tags and their href values vanish. What you save in "sounding human" you lose in re-formatting by hand.
That's the exact problem the Rephrasy AI humanizer API solves with structured input. Instead of flattening your markup into a wall of plain text, it parses your HTML or Markdown, rewrites only the visible text nodes, and hands the document back with its structure byte-for-byte intact.
The problem: humanizing AI text usually means losing your formatting
Under the hood, almost every "humanize AI text" tool works on plain strings. You give it text, it gives you text. So the moment your content contains markup, you're forced into a bad choice:
Strip the formatting first, humanize the plain text, then rebuild all the HTML by hand afterward.
Send the raw HTML as text and pray, the model rewrites your tags as if they were prose, mangling attributes and breaking the DOM.
Skip humanization on any structured content entirely, which defeats the point of an API.
None of these scale. If you're humanizing a few hundred blog posts, product descriptions, or knowledge-base articles a month, "rebuild the HTML by hand" is not an integration, it's a chore.

The fix: one parameter — input_format
Rephrasy's humanize endpoint accepts an input_format field. Set it to html or markdown and the API treats your payload as a document, not a string. It walks the tree, humanizes each text node in place, and leaves tags, attributes, code blocks, and links untouched.
Example request (curl):
curl -X POST https://v2-humanizer.rephrasy.ai/api/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "<h2>Why sleep matters</h2><p>Sleep is essential for <a href=\"/health\">recovery</a>.</p>",
"model": "v3",
"input_format": "html",
"words": true,
"costs": true
}'
The response comes back with the same h2, the same p, and the same anchor tag — only the sentence inside each tag is rewritten to read like a person wrote it. Drop the result straight back into your CMS. No re-formatting step.
What "only the visible text is rewritten" means in practice: your href values, class names, image alt attributes, and code samples are never sent through the rewriter. That protects both your layout and anything a naive rewrite could break — like URLs or JSON embedded in your markup.
Three keywords, one call: humanize, structure-safe, at scale
This unlocks the workflows people actually want from an AI content humanizer API:
Headless CMS pipelines. Pull an entry as HTML, humanize it, write it back, Contentful, Sanity, WordPress REST, Strapi. The rich-text field round-trips cleanly.
Markdown docs and static sites. Send input_format markdown and your headings, code fences, and tables stay put while the prose gets humanized.
Email and newsletters. Humanize the copy without touching the fragile table-based HTML that email clients depend on.
Product and catalog content. Bulk-humanize thousands of descriptions while preserving the markup your storefront renders.
What it costs
Billing is credit-based and fully transparent — pass costs true and every response tells you exactly what it charged. There are two modes:
MODE
| SET
| PRICE
|
|---|
FLAT
| words:false
| 1 credit per call
|
WORD-BASED
| words:true
| 0.1 credit flat, plus 0.1 credit per 100 words
|
Structured input (HTML/Markdown) does slightly more work, parsing the tree and rewriting node by node, so it bills at 2.5 times the word-based rate. Even then, the real cost of humanizing a full article is cents. At $0.10 per credit:

Pick a model for the job
The same model field works with structured input. Choose based on which detectors you care about:
v3 - the strongest all-round model, tuned for advanced detectors like GPTZero.
Undetectable Model v2 - reliable general-purpose bypass.
Undetectable Model - best against academic detectors (Turnitin)
SEO Model - optimized for marketing and search content.
A Writing Style ID, humanize into a cloned brand or personal voice you trained via the Custom Writing Styles API.