AI text cleaner API
Paste text from ChatGPT, Claude or any AI writer. The cleaner swaps em dashes for commas, straightens quotes, removes zero-width characters and stray markdown, and points out phrases like delve so you can rewrite them yourself.
- Endpoint:
POST https://postboost.co/app/api/tools/ai-text-cleaner(operationIdcleanText) - Web tool: postboost.co/tools/ai-text-cleaner
- Token: optional (limits)
- MCP: tool
clean-textonhttps://postboost.co/mcp/tools
Request
| Field | Type | Default | Description |
|---|---|---|---|
text | string | ||
dashes | string: comma, hyphen, spaced, keep | "comma" | What replaces an em or en dash between words: ", " (comma), "-" (hyphen), " - " (spaced) or nothing (keep). Number ranges like 2020–2024 always get a hyphen. |
quotes | boolean | true | Curly quotes and apostrophes to straight ones. |
invisible | boolean | true | Remove zero-width characters and soft hyphens; turn non-breaking and thin spaces into normal spaces. |
spaces | boolean | true | Collapse double spaces between words and remove spaces at line ends. |
ellipsis | boolean | true | The ellipsis character to three dots. |
markdown | boolean | true | Strip bold, bold, italic and italic markers, keeping the words. |
flag_phrases | boolean | true | List common AI phrases (e.g. "delve") with their offsets. They are never changed. |
Call it
- curl
- Python
- Node.js
- PHP
- Go
- Ruby
- Java
- C#
- Rust
- CLI
curl -X POST https://postboost.co/app/api/tools/ai-text-cleaner \
-H 'Content-Type: application/json' \
-d '{"text":"Fast — reliable… and “simple”."}'
from postboost import ApiClient, Configuration
from postboost.api.free_tools_api import FreeToolsApi
from postboost.models import FreeToolCleanTextRequest
with ApiClient(Configuration()) as client:
api = FreeToolsApi(client)
result = api.clean_text(FreeToolCleanTextRequest.from_dict({"text": "Fast — reliable… and “simple”."}))
print(result.to_dict())
import { FreeToolsApi } from 'postboost';
const api = new FreeToolsApi();
const { body } = await api.cleanText({ text: "Fast — reliable… and “simple”." });
console.log(body);
use PostBoostClient\Api\FreeToolsApi;
use PostBoostClient\Model\FreeToolCleanTextRequest;
$api = new FreeToolsApi(new GuzzleHttp\Client());
$result = $api->cleanText(new FreeToolCleanTextRequest(['text' => "Fast — reliable… and “simple”."]));
echo $result;
import (
"context"
"encoding/json"
"fmt"
postboost "github.com/postboost-co/postboost-go"
)
var request postboost.FreeToolCleanTextRequest
if err := json.Unmarshal([]byte(`{"text":"Fast — reliable… and “simple”."}`), &request); err != nil {
panic(err)
}
client := postboost.NewAPIClient(postboost.NewConfiguration())
result, _, err := client.FreeToolsAPI.CleanText(context.Background()).FreeToolCleanTextRequest(request).Execute()
fmt.Println(result, err)
require 'postboost'
api = PostBoost::FreeToolsApi.new
result = api.clean_text(PostBoost::FreeToolCleanTextRequest.new({ text: "Fast — reliable… and “simple”." }))
puts result.to_hash
import com.postboost.ApiClient;
import com.postboost.api.FreeToolsApi;
import com.postboost.model.FreeToolCleanTextRequest;
import com.postboost.model.FreeToolCleanTextResponse;
FreeToolsApi api = new FreeToolsApi(new ApiClient());
FreeToolCleanTextRequest request = FreeToolCleanTextRequest.fromJson("{\"text\":\"Fast — reliable… and “simple”.\"}");
FreeToolCleanTextResponse result = api.cleanText(request);
System.out.println(result.toJson());
using Newtonsoft.Json;
using PostBoost.Client.Api;
using PostBoost.Client.Client;
using PostBoost.Client.Model;
var api = new FreeToolsApi(new Configuration());
var request = JsonConvert.DeserializeObject<FreeToolCleanTextRequest>(@"{""text"":""Fast — reliable… and “simple”.""}");
var result = await api.CleanTextAsync(request);
Console.WriteLine(result.ToJson());
use postboost::apis::configuration::Configuration;
use postboost::apis::free_tools_api;
use postboost::models::FreeToolCleanTextRequest;
let config = Configuration::new();
let request: FreeToolCleanTextRequest = serde_json::from_str(r##"{"text":"Fast — reliable… and “simple”."}"##)?;
let result = free_tools_api::clean_text(&config, request).await?;
println!("{:?}", result);
echo '{"text":"Fast — reliable… and “simple”."}' | ./postboost-cli --content-type application/json cleanText -
With a token, send Authorization: Bearer YOUR_API_TOKEN as a default header (how, per SDK).
Response
{
"text": "Fast, reliable... and \"simple\".",
"changes": [
{
"type": "dashes",
"count": 1
},
{
"type": "quotes",
"count": 2
},
{
"type": "ellipsis",
"count": 1
}
],
"flags": []
}
With MCP
Connect https://postboost.co/mcp/tools (setup) and ask, for example: Clean AI-written text: dashes, quotes, invisible characters, markdown with the PostBoost clean-text tool.
Errors
| Status | When |
|---|---|
401 | The Authorization header holds an invalid token. Leave it out to call as a guest. |
413 | The JSON body is larger than 128 KB. |
422 | A field is invalid; the body lists the errors per field. |
429 | A limit is reached; see limits. |