Open-source pipeline for rewriting AI-generated text into natural human prose. Need it in your app? Try the Lynote Humanizer API → lynote.ai/ai-humanizer-api
See the codeAn open-source pipeline for rewriting AI-generated text into natural human prose
Website · Humanizer API · Product Hunt · Try the detector · Discord · X
English | 中文
🚀 New: the Lynote Humanizer API is live. Need humanization inside your own app, workflow, or SaaS? Call Lynote's production humanizer with one REST request — no pipeline to host. Get an API key → lynote.ai/ai-humanizer-api
Most humanizers are a black box with marketing claims attached. This one is open source, so you can read what it actually does.
The current method is a structure-first data pipeline that trains the model to rewrite structure, not just launder surface style — the full implementation is in training-data-pipeline/. The original translation-chain approach is kept below as a runnable reference.
The current method is a structure-first data pipeline that builds the SFT + preference (KTO) training data for our own AI→human rewrite model — it teaches the model to rewrite structure, not just launder surface style. Full implementation, policies, tests, and 50 demo records per stage live in training-data-pipeline/.
flowchart LR
sources["Public Crawl + private pairs"] --> gates["Quality + structure gates"]
gates --> split["Deterministic stratified split"]
split --> sft["SFT training pool"]
sft --> reserve["Reserve a disjoint KTO pool"]
reserve --> gen["6 candidate chains · temps 0.3-1.0"]
gen --> select["Negative selection + structure-first 60/20/20 mix"]
select --> review["Human review gate"] --> kto["Balanced KTO train / validation"]
Full method: DATA_CONSTRUCTION.md · ARCHITECTURE.md · PROMPTS.md
The translation chain below is our earlier open exploration. It still runs and is kept as a readable reference — the current method is the structure-first pipeline above.
| Step | Engine | From → To | Purpose |
|---|---|---|---|
| 1 | LLM (temp 1.3) | Input → Chinese (Chinese Rewriting) | LLM humanization rewrite + language shift |
| 2 | LLM (temp 1.3) | Chinese → Japanese (Japanese Rewriting) | Second LLM humanization, carries Step 1 as history |
| 3 | Google Translate | Japanese → Finnish (First Round of Translation) | First translation hop — distant language structural disruption |
| 4 | Niutrans | Finnish → English (Second-Round Translation) | Second translation hop — cross-engine reconstruction |
git clone https://github.com/lynote-ai/humanize-text.git
cd humanize-text
pip install -r requirements.txt
cp config/config.example.toml config/config.toml # add your API key
python -m src.standard.pipeline --input draft.txt
| Tier | What it does | Best for |
|---|---|---|
standard | 2 LLM rewrites + 2 MT hops | The default balance |
advanced | + multi-round LLM rewriting | Deeper restructuring |
focus | + detection-guided feedback loop | Maximum restructuring |
Note on intended use. This toolkit is for improving the readability and natural cadence of AI-assisted drafts. If you are writing in an academic setting, follow your institution's policies on AI use and disclosure.
Important: Detector scores are probabilistic. This project does not guarantee that rewritten text will be classified as human, and it should not be used to misrepresent authorship or evade institutional policies.
Where this repo fits. The pipeline here is our team's open exploration from early 2026 — the most effective approach we'd found at the time, released so anyone can read it, run it, and build on it. We've since moved well beyond it: Lynote.ai now runs proprietary detect + humanize models we trained ourselves, using a structure-first SFT + KTO data pipeline (the method in
training-data-pipeline/) on curated, high-quality datasets.Against this repo's open-source chain, Lynote.ai's current humanizer raises the detector-bypass rate by ~30% and rates ~50% higher on output quality — both are relative gains over this chain. The detection side draws on the latest research into what actually separates human from AI writing — not surface style, but discourse-level narrative structure (e.g. the StoryScope study, UMD & Google DeepMind, COLM 2026). Style-only rewriting no longer tells the whole story — which is exactly why this open chain has a ceiling.
This repo stays a faithful, runnable reference. For the current best results, try Lynote.ai.
The Standard pipeline above is one of three tiers available. Each has different trade-offs:
| Tier | Style Preservation | Speed | Approach |
|---|---|---|---|
| Standard (this repo) | Best | Fast | Translation chain |
| Advanced | Good | Medium | Translation chain + LLM multi-round rewriting |
| Focus | Moderate | Slower | Translation chain + Detection-guided feedback loop |
Lynote.ai combines all three tiers and automatically selects the optimal approach for each text passage:
Running this repo's pipeline means juggling LLM keys, translation engines, and your own infrastructure. If you just want humanization inside your product, the Lynote Humanizer API gives you the same engine that powers Lynote.ai through a single endpoint:
curl https://api.lynote.ai/v1/humanize \
-H "Authorization: Bearer $LYNOTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Your AI-generated draft here", "readability": "University", "purpose": "Academic"}'
Plans, rate limits, and full docs: lynote.ai/ai-humanizer-api
| Method | Who It's For | How |
|---|---|---|
| Lynote.ai | Everyone — all tiers, zero setup | Visit lynote.ai |
| Lynote Humanizer API | Developers adding humanization to their own app | Get a key at lynote.ai/ai-humanizer-api |
| n8n Workflow | No-code automation users | Import n8n/humanize_standard.json |
| Python Script | Developers | See below |
git clone https://github.com/lynote-ai/humanize-text.git
cd humanize-text
pip install -r requirements.txt
cp config/config.example.toml config/config.toml
# Fill in your API keys in config.toml (see examples below)
python -m src.standard.pipeline --input "Your AI-generated text here"
DeepSeek (default):
[api_keys]
deepseek_api_key = "sk-..."
niutrans_api_key = "your-key"
[llm]
provider = "deepseek"
OpenRouter:
[api_keys]
openrouter_api_key = "sk-or-..."
niutrans_api_key = "your-key"
[llm]
provider = "openrouter"
model = "deepseek/deepseek-chat" # any OpenRouter model slug
Atlas Cloud:
[api_keys]
atlascloud_api_key = "ak-..."
niutrans_api_key = "your-key"
[llm]
provider = "atlascloud"
model = "qwen/qwen3.5-flash"
OrcaRouter:
[api_keys]
orcarouter_api_key = "sk-orca-..."
niutrans_api_key = "your-key"
[llm]
provider = "orcarouter"
model = "deepseek/deepseek-chat" # any OrcaRouter model slug
Override the API endpoint with base_url in [llm], or via LLM_BASE_URL / LLM_API_KEY environment variables. Full reference: docs/configuration.md.
n8n/humanize_standard.json into your n8n instancehttps://openrouter.ai/api/v1/chat/completions to use OpenRouter)Results below are from the legacy v1.x translation-chain scheme, not the current structure-first pipeline.
We ran the pipeline end-to-end on 5 real input texts and saved every intermediate step. On these samples, all five final outputs were classified as human by the detector we tested. These are illustrative traces from the open chain, not a guarantee — detection is probabilistic and varies by detector and version (see the note at the top of this README).
| # | Topic | Detection | Confidence |
|---|---|---|---|
| 01 | Quantum Computing | human | 0.9997 |
| 02 | Quantum Readiness Strategy | human | 0.9982 |
| 03 | Sustainable Supply Chains | human | 0.7810 |
| 04 | Financial Literacy | human | 0.9924 |
| 05 | Peer Review in Science | human | 0.7218 |
Each example shows: original input → Step 1 (中文改写) → Step 2 (日语改写) → Step 3 (一轮翻译) → Step 4 (二轮翻译, final). See examples/showcase/ for full traces.
Tested on 50 text pairs with expert evaluation:
| Dimension | Score (out of 10) |
|---|---|
| Information Completeness | 10.0 |
| Language Fluency | 9.0 |
| Style Adaptability | 8.8 |
| Readability | 9.2 |
| Creativity & Impact | 8.5 |
| Overall | 9.1 |
These scores evaluate the legacy v1.x translation-chain output only — a static measure of the old scheme, not the current structure-first method or the Lynote.ai figures referenced at the top.
| Standard (this repo) | Lynote.ai | |
|---|---|---|
| Tiers Available | Standard only | Standard + Advanced + Focus |
| Tier Selection | Manual | Automatic per-passage |
| Style Preservation | Best | Adaptive — best possible per passage |
| Setup | Python + API keys | Zero setup |
| Best For | Style-sensitive content | Any content type |
training-data-pipeline/ # ★ current method — structure-first SFT + KTO data pipeline
├── code/ # ordered stages a–f, harness, tests
├── configs/ data/demos/ # versioned policies + 50 demo records per stage
└── docs/ # ARCHITECTURE, DATA_CONSTRUCTION, PROMPTS
src/ # legacy v1.x translation-chain reference (runnable)
├── standard/ # Standard Pipeline (4-step chain, CLI entry)
│ ├── pipeline.py # 4-step chain, CLI entry
│ ├── llm_client.py # OpenAI-compatible client (DeepSeek / OpenRouter)
│ ├── llm_rewriter.py # LLM humanization rewrite
│ └── translators.py # Google + Niutrans engines
│
└── methodologies/ # v1.0 four-methodology reference implementations
├── humanizer.py # v1.0 dispatcher + FastAPI app
├── translation_chain.py # Method 1
├── llm_rewriter.py # Method 2
├── detection_pipeline.py# Method 3
├── mixed_engine.py # Method 4
├── postprocess.py
├── detectors/ # Method 3 detectors
└── utils/
examples/
├── example_usage.py # ★ v1.5.1 minimal entry
├── showcase/ # ★ 5 real samples with intermediate-step outputs
└── legacy/ # v1.0 examples + 4-method comparison outputs
Round-trip translation costs precision. Technical terminology and citations can drift, and the deeper tiers trade more of your original voice for more restructuring. If you're working with anything where exact wording matters, read the output carefully rather than trusting the pipeline.
No rewriting method makes text reliably undetectable. Detectors update faster than pipelines do, and results vary by input length, subject matter, and which detector you're facing. Treat the showcase/ results as a snapshot, not a guarantee.
MIT License. See LICENSE for details.
⭐ Star this repository if this all-in-one text humanization toolkit helps you.
🌐 Visit official website lynote.ai to unlock full premium features.
🔌 Need an API? Visit lynote.ai/ai-humanizer-api to get your Humanizer API key.
💬 Have questions, feature requests or usage troubles? Feel free to start a discussion in Discussions.
86 followers · starred May 2026
349 followers · starred Oct 2026
21 followers · starred Jun 2026
Open-source pipeline for rewriting AI-generated text into natural human prose. Need it in your app? Try the Lynote Humanizer API → lynote.ai/ai-humanizer-api
See the codeAn open-source pipeline for rewriting AI-generated text into natural human prose
Website · Humanizer API · Product Hunt · Try the detector · Discord · X
English | 中文
🚀 New: the Lynote Humanizer API is live. Need humanization inside your own app, workflow, or SaaS? Call Lynote's production humanizer with one REST request — no pipeline to host. Get an API key → lynote.ai/ai-humanizer-api
Most humanizers are a black box with marketing claims attached. This one is open source, so you can read what it actually does.
The current method is a structure-first data pipeline that trains the model to rewrite structure, not just launder surface style — the full implementation is in training-data-pipeline/. The original translation-chain approach is kept below as a runnable reference.
The current method is a structure-first data pipeline that builds the SFT + preference (KTO) training data for our own AI→human rewrite model — it teaches the model to rewrite structure, not just launder surface style. Full implementation, policies, tests, and 50 demo records per stage live in training-data-pipeline/.
flowchart LR
sources["Public Crawl + private pairs"] --> gates["Quality + structure gates"]
gates --> split["Deterministic stratified split"]
split --> sft["SFT training pool"]
sft --> reserve["Reserve a disjoint KTO pool"]
reserve --> gen["6 candidate chains · temps 0.3-1.0"]
gen --> select["Negative selection + structure-first 60/20/20 mix"]
select --> review["Human review gate"] --> kto["Balanced KTO train / validation"]
Full method: DATA_CONSTRUCTION.md · ARCHITECTURE.md · PROMPTS.md
The translation chain below is our earlier open exploration. It still runs and is kept as a readable reference — the current method is the structure-first pipeline above.
| Step | Engine | From → To | Purpose |
|---|---|---|---|
| 1 | LLM (temp 1.3) | Input → Chinese (Chinese Rewriting) | LLM humanization rewrite + language shift |
| 2 | LLM (temp 1.3) | Chinese → Japanese (Japanese Rewriting) | Second LLM humanization, carries Step 1 as history |
| 3 | Google Translate | Japanese → Finnish (First Round of Translation) | First translation hop — distant language structural disruption |
| 4 | Niutrans | Finnish → English (Second-Round Translation) | Second translation hop — cross-engine reconstruction |
git clone https://github.com/lynote-ai/humanize-text.git
cd humanize-text
pip install -r requirements.txt
cp config/config.example.toml config/config.toml # add your API key
python -m src.standard.pipeline --input draft.txt
| Tier | What it does | Best for |
|---|---|---|
standard | 2 LLM rewrites + 2 MT hops | The default balance |
advanced | + multi-round LLM rewriting | Deeper restructuring |
focus | + detection-guided feedback loop | Maximum restructuring |
Note on intended use. This toolkit is for improving the readability and natural cadence of AI-assisted drafts. If you are writing in an academic setting, follow your institution's policies on AI use and disclosure.
Important: Detector scores are probabilistic. This project does not guarantee that rewritten text will be classified as human, and it should not be used to misrepresent authorship or evade institutional policies.
Where this repo fits. The pipeline here is our team's open exploration from early 2026 — the most effective approach we'd found at the time, released so anyone can read it, run it, and build on it. We've since moved well beyond it: Lynote.ai now runs proprietary detect + humanize models we trained ourselves, using a structure-first SFT + KTO data pipeline (the method in
training-data-pipeline/) on curated, high-quality datasets.Against this repo's open-source chain, Lynote.ai's current humanizer raises the detector-bypass rate by ~30% and rates ~50% higher on output quality — both are relative gains over this chain. The detection side draws on the latest research into what actually separates human from AI writing — not surface style, but discourse-level narrative structure (e.g. the StoryScope study, UMD & Google DeepMind, COLM 2026). Style-only rewriting no longer tells the whole story — which is exactly why this open chain has a ceiling.
This repo stays a faithful, runnable reference. For the current best results, try Lynote.ai.
The Standard pipeline above is one of three tiers available. Each has different trade-offs:
| Tier | Style Preservation | Speed | Approach |
|---|---|---|---|
| Standard (this repo) | Best | Fast | Translation chain |
| Advanced | Good | Medium | Translation chain + LLM multi-round rewriting |
| Focus | Moderate | Slower | Translation chain + Detection-guided feedback loop |
Lynote.ai combines all three tiers and automatically selects the optimal approach for each text passage:
Running this repo's pipeline means juggling LLM keys, translation engines, and your own infrastructure. If you just want humanization inside your product, the Lynote Humanizer API gives you the same engine that powers Lynote.ai through a single endpoint:
curl https://api.lynote.ai/v1/humanize \
-H "Authorization: Bearer $LYNOTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Your AI-generated draft here", "readability": "University", "purpose": "Academic"}'
Plans, rate limits, and full docs: lynote.ai/ai-humanizer-api
| Method | Who It's For | How |
|---|---|---|
| Lynote.ai | Everyone — all tiers, zero setup | Visit lynote.ai |
| Lynote Humanizer API | Developers adding humanization to their own app | Get a key at lynote.ai/ai-humanizer-api |
| n8n Workflow | No-code automation users | Import n8n/humanize_standard.json |
| Python Script | Developers | See below |
git clone https://github.com/lynote-ai/humanize-text.git
cd humanize-text
pip install -r requirements.txt
cp config/config.example.toml config/config.toml
# Fill in your API keys in config.toml (see examples below)
python -m src.standard.pipeline --input "Your AI-generated text here"
DeepSeek (default):
[api_keys]
deepseek_api_key = "sk-..."
niutrans_api_key = "your-key"
[llm]
provider = "deepseek"
OpenRouter:
[api_keys]
openrouter_api_key = "sk-or-..."
niutrans_api_key = "your-key"
[llm]
provider = "openrouter"
model = "deepseek/deepseek-chat" # any OpenRouter model slug
Atlas Cloud:
[api_keys]
atlascloud_api_key = "ak-..."
niutrans_api_key = "your-key"
[llm]
provider = "atlascloud"
model = "qwen/qwen3.5-flash"
OrcaRouter:
[api_keys]
orcarouter_api_key = "sk-orca-..."
niutrans_api_key = "your-key"
[llm]
provider = "orcarouter"
model = "deepseek/deepseek-chat" # any OrcaRouter model slug
Override the API endpoint with base_url in [llm], or via LLM_BASE_URL / LLM_API_KEY environment variables. Full reference: docs/configuration.md.
n8n/humanize_standard.json into your n8n instancehttps://openrouter.ai/api/v1/chat/completions to use OpenRouter)Results below are from the legacy v1.x translation-chain scheme, not the current structure-first pipeline.
We ran the pipeline end-to-end on 5 real input texts and saved every intermediate step. On these samples, all five final outputs were classified as human by the detector we tested. These are illustrative traces from the open chain, not a guarantee — detection is probabilistic and varies by detector and version (see the note at the top of this README).
| # | Topic | Detection | Confidence |
|---|---|---|---|
| 01 | Quantum Computing | human | 0.9997 |
| 02 | Quantum Readiness Strategy | human | 0.9982 |
| 03 | Sustainable Supply Chains | human | 0.7810 |
| 04 | Financial Literacy | human | 0.9924 |
| 05 | Peer Review in Science | human | 0.7218 |
Each example shows: original input → Step 1 (中文改写) → Step 2 (日语改写) → Step 3 (一轮翻译) → Step 4 (二轮翻译, final). See examples/showcase/ for full traces.
Tested on 50 text pairs with expert evaluation:
| Dimension | Score (out of 10) |
|---|---|
| Information Completeness | 10.0 |
| Language Fluency | 9.0 |
| Style Adaptability | 8.8 |
| Readability | 9.2 |
| Creativity & Impact | 8.5 |
| Overall | 9.1 |
These scores evaluate the legacy v1.x translation-chain output only — a static measure of the old scheme, not the current structure-first method or the Lynote.ai figures referenced at the top.
| Standard (this repo) | Lynote.ai | |
|---|---|---|
| Tiers Available | Standard only | Standard + Advanced + Focus |
| Tier Selection | Manual | Automatic per-passage |
| Style Preservation | Best | Adaptive — best possible per passage |
| Setup | Python + API keys | Zero setup |
| Best For | Style-sensitive content | Any content type |
training-data-pipeline/ # ★ current method — structure-first SFT + KTO data pipeline
├── code/ # ordered stages a–f, harness, tests
├── configs/ data/demos/ # versioned policies + 50 demo records per stage
└── docs/ # ARCHITECTURE, DATA_CONSTRUCTION, PROMPTS
src/ # legacy v1.x translation-chain reference (runnable)
├── standard/ # Standard Pipeline (4-step chain, CLI entry)
│ ├── pipeline.py # 4-step chain, CLI entry
│ ├── llm_client.py # OpenAI-compatible client (DeepSeek / OpenRouter)
│ ├── llm_rewriter.py # LLM humanization rewrite
│ └── translators.py # Google + Niutrans engines
│
└── methodologies/ # v1.0 four-methodology reference implementations
├── humanizer.py # v1.0 dispatcher + FastAPI app
├── translation_chain.py # Method 1
├── llm_rewriter.py # Method 2
├── detection_pipeline.py# Method 3
├── mixed_engine.py # Method 4
├── postprocess.py
├── detectors/ # Method 3 detectors
└── utils/
examples/
├── example_usage.py # ★ v1.5.1 minimal entry
├── showcase/ # ★ 5 real samples with intermediate-step outputs
└── legacy/ # v1.0 examples + 4-method comparison outputs
Round-trip translation costs precision. Technical terminology and citations can drift, and the deeper tiers trade more of your original voice for more restructuring. If you're working with anything where exact wording matters, read the output carefully rather than trusting the pipeline.
No rewriting method makes text reliably undetectable. Detectors update faster than pipelines do, and results vary by input length, subject matter, and which detector you're facing. Treat the showcase/ results as a snapshot, not a guarantee.
MIT License. See LICENSE for details.
⭐ Star this repository if this all-in-one text humanization toolkit helps you.
🌐 Visit official website lynote.ai to unlock full premium features.
🔌 Need an API? Visit lynote.ai/ai-humanizer-api to get your Humanizer API key.
💬 Have questions, feature requests or usage troubles? Feel free to start a discussion in Discussions.
86 followers · starred May 2026
349 followers · starred Oct 2026
21 followers · starred Jun 2026