Back to Blog
Guides

AI Humanizer API: Humanize Text Programmatically With ClearPen

ClearPen's Humanize API runs the same humanizer as the web app from your own scripts, CMS or workflow tools. One authenticated POST returns the rewritten text with AI-detection scores before and after.

ClearPen Team4 min read

Short answer

ClearPen's Humanize API is a REST endpoint (POST https://www.clearpen.ai/api/v1/humanize) available on Pro and Power plans. You authenticate with a bearer API key, send JSON with the text to humanize, and get back the rewritten text plus aiScoreBefore, aiScoreAfter, word count and your remaining monthly words. API usage draws from the same word allowance as the web app.

Try it now

See how your writing scores

Paste a paragraph for an instant AI-detection score — free, no signup, your text is never stored. Then humanize 500 words free when you're ready.

0/300 words
Private — your text is never stored.

Some writing never touches a browser tab. It lives in a CMS, a content pipeline, a spreadsheet of product descriptions or an internal tool. ClearPen's Humanize API brings the same humanizer that powers the web app to those workflows — with one difference from most humanizer APIs: every response tells you the AI score before and after.

What the ClearPen API Does

The API exposes a single operation: humanize a piece of text. It runs ClearPen's full block-based pipeline — the same one described in how ClearPen's humanizer works — and returns structured JSON.

Because the response includes the before and after scores, your own systems can make decisions with them: flag items that started high, log the improvement, or route anything that is still amber to a human editor.

Quick Start

1. Create an API key

In the ClearPen dashboard, open Settings → API & Developers and create a key. The full secret, beginning cp_live_, is shown once — store it in your secrets manager. Keys can be revoked from the same screen at any time.

2. Send a request

curl https://www.clearpen.ai/api/v1/humanize \
  -H "Authorization: Bearer cp_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Our platform leverages cutting-edge technology to streamline workflows and drive meaningful outcomes for teams of every size."
  }'

3. Read the response

{
  "id": "9f1c…",
  "text": "Our platform takes the busywork out of your team's day…",
  "aiScoreBefore": 96,
  "aiScoreAfter": 4,
  "wordCount": 142,
  "processingTimeMs": 18450,
  "usage": {
    "wordsUsed": 12842,
    "wordsLimit": 80000,
    "wordsRemaining": 67158
  }
}

(Values are illustrative.)

Request and Response Reference

FieldDirectionDescription
textRequest (required)The text to humanize. Minimum 10 words; the maximum is your plan's per-request limit.
textResponseThe humanized text.
aiScoreBeforeResponseAI-detection probability (0–100) of your input.
aiScoreAfterResponseAI-detection probability (0–100) of the result.
wordCountResponseWords processed and charged.
processingTimeMsResponseServer-side processing time.
usageResponsewordsUsed, wordsLimit and wordsRemaining for the current month.

Errors

Errors return a non-2xx status and a JSON body of the form { "error": "...", "code": "..." }.

StatusCodeMeaning
401missing_api_key / invalid_api_keyMissing, invalid or revoked key.
403plan_requiredYour plan does not include API access.
400text_too_short / text_too_longOutside the word limits.
429quota_exceededMonthly word allowance used up.
429rate_limitedToo many requests in a short window — back off and retry.
500pipeline_errorTransient failure — retry.

Integration Tips

  • Keep keys server-side. Never ship a key in browser code or a public repository.
  • Use a generous timeout. Most requests finish in well under a minute, but long documents are processed block by block, so allow a few minutes before timing out.
  • Retry with backoff on 429 rate_limited and 500 pipeline_error.
  • Use the scores. Store aiScoreBefore and aiScoreAfter alongside each item so you can report on improvement and route anything still above your threshold to an editor.
  • Split very long content into sections under your plan's per-request limit, ideally at heading boundaries.

Common Use Cases

  • Content operations: humanize AI-assisted drafts as they move from draft to review in a CMS.
  • Product and catalog copy: refine large batches of descriptions so they read naturally and consistently.
  • Internal tools: add a "refine and score" step to an in-house writing assistant.
  • Quality reporting: track before-and-after scores across a content library over time.

Use the API to refine writing you or your team are responsible for, within your organization's policies on AI use. It is not intended for mass-producing content.

Plans and Usage

The Humanize API is included on Pro and Power plans. There is no separate API subscription: words processed through the API come out of the same monthly allowance as the web app, and one-time word packs top up both. See pricing for current limits.

Get an API key

Create an account, upgrade to Pro or Power, and generate a key under Settings → API & Developers.

Frequently asked questions

Does ClearPen have an API?
Yes. ClearPen's Humanize API is available on Pro and Power plans at POST https://www.clearpen.ai/api/v1/humanize. It runs the same humanizer as the web app.
How do I authenticate with the ClearPen API?
Create an API key in Settings → API & Developers in the ClearPen dashboard and send it as a bearer token: Authorization: Bearer cp_live_your_key. The full key is shown once at creation and can be revoked at any time.
What does the ClearPen API return?
A JSON object with the humanized text, aiScoreBefore and aiScoreAfter (0–100), the word count, processing time, and a usage object with words used, the monthly limit and words remaining.
Is API usage billed separately?
No. Words processed through the API come out of the same monthly word allowance as the web app. There is no separate API subscription.
How long can an API request take?
Most requests complete in well under a minute. Long documents take a little longer, so set a client timeout of a few minutes rather than relying on a short default.
clearpenapiai humanizer apidevelopersautomation

Try ClearPen Free — Humanize 500 Words

Paste your text and see your AI-detection score before and after. No credit card required.