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
| Field | Direction | Description |
|---|---|---|
text | Request (required) | The text to humanize. Minimum 10 words; the maximum is your plan's per-request limit. |
text | Response | The humanized text. |
aiScoreBefore | Response | AI-detection probability (0–100) of your input. |
aiScoreAfter | Response | AI-detection probability (0–100) of the result. |
wordCount | Response | Words processed and charged. |
processingTimeMs | Response | Server-side processing time. |
usage | Response | wordsUsed, wordsLimit and wordsRemaining for the current month. |
Errors
Errors return a non-2xx status and a JSON body of the form { "error": "...", "code": "..." }.
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key / invalid_api_key | Missing, invalid or revoked key. |
| 403 | plan_required | Your plan does not include API access. |
| 400 | text_too_short / text_too_long | Outside the word limits. |
| 429 | quota_exceeded | Monthly word allowance used up. |
| 429 | rate_limited | Too many requests in a short window — back off and retry. |
| 500 | pipeline_error | Transient 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_limitedand500 pipeline_error. - Use the scores. Store
aiScoreBeforeandaiScoreAfteralongside 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.
Related Reading
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.