Sari la conținut
Humanizer API
Obține o cheie API

Documentație

Documentația Humanizer API

Un REST API cu JSON pentru umanizarea și detectarea textului AI. Te autentifici cu o cheie, trimiți text, primești text înapoi.

URL de bazăhttps://api.humanizertool.io/v1

Documentația este în limba engleză.

Quickstart

Make your first request in under five minutes. All you need is an API key and any HTTP client.

  1. Create an account and a key

    Sign up with email or Google, open API keys in the dashboard and create a key. The full secret is shown once — copy it then.

  2. Keep the key on your server

    export HUMANIZER_API_KEY="ht_live_…"
  3. Send your first request

    curl https://api.humanizertool.io/v1/humanize \
      -H "Authorization: Bearer $HUMANIZER_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "text": "Artificial intelligence has fundamentally transformed the way organizations approach content creation, enabling unprecedented efficiency.",
        "style": "business"
      }'
  4. Read the response

    200 OK
    {
      "id": "hum_oJoMouByloZk",
      "object": "humanize",
      "output": "AI has changed how teams write. Work that took days now takes an afternoon.",
      "words_in": 16,
      "words_out": 15,
      "style": "business",
      "usage": {
        "words_used": 1240,
        "words_limit": 100000,
        "words_remaining": 98760,
        "period_end": "2026-11-30T08:25:17.000Z"
      },
      "request_id": "req_8e2d4f6a1b3c5d7e9f0a2b4c"
    }

    output holds the rewritten text. usage tells you how many words are left this period, so you never have to guess.

Authentication

Every request is authenticated with a secret API key sent in a header.

Authorization: Bearer ht_live_…
# or
x-api-key: ht_live_…

Keys look like ht_live_ or ht_test_ followed by 43 random characters. We store only a hash, so a lost key can't be recovered — revoke it and create a new one. Each key can be limited to the humanize and/or detect scopes and can expire after 30, 60 or 90 days.

Live and test keys

Key modes
ModeBehaviourMetered
ht_live_Real humanize and detect results. Counts toward your plan's live-key limit.Yes
ht_test_Deterministic stub responses with the same shape. Limited to 60 requests per minute; never counts toward the key limit.Never

Keys are secrets.

Call the API from your backend, not from browsers or mobile apps. Never commit keys to git — use environment variables or a secrets manager.

To check a key, call GET https://api.humanizertool.io/v1/me: it returns the account, plan and key details (see Usage & account).

Playground

Try every option in the browser before you write code.

The playground in your dashboard runs humanize and detect with the same options as the API and shows the request you can copy. Playground calls use your account's words and are logged as playground:humanize / playground:detect.

Open the playground

Humanize

Rewrites AI-generated text so it reads naturally.

POSThttps://api.humanizertool.io/v1/humanize

Body

Humanize parameters
FieldTypeDescription
textstring, requiredThe text to rewrite. Up to your plan's words-per-request limit.
stylestring (enum)One of neutral (default), academic, business, creative, technical, friendly, informal.
lengthstring (enum)concise, normal (default) or expanded.
similaritystring (enum)How close to stay to the original: low, moderate (default) or high.
languagestringauto (default) or an ISO 639-1 code such as en, de, es.
curl https://api.humanizertool.io/v1/humanize \
  -H "Authorization: Bearer $HUMANIZER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Artificial intelligence has fundamentally transformed the way organizations approach content creation, enabling unprecedented efficiency.",
    "style": "business"
  }'

Response

Humanize response fields
FieldTypeDescription
idstringUnique id, prefixed hum_.
objectstringAlways humanize.
outputstringThe humanized text.
words_in / words_outintegerWord counts of the input and the output. You are charged words_in.
stylestring (enum)The style that was applied.
usageobjectwords_used, words_limit, words_remaining (integers) and period_end (date-time, null on the Free trial) after this request.
request_idstringSame as the X-Request-Id header.
200 OK
{
  "id": "hum_oJoMouByloZk",
  "object": "humanize",
  "output": "AI has changed how teams write. Work that took days now takes an afternoon.",
  "words_in": 16,
  "words_out": 15,
  "style": "business",
  "usage": {
    "words_used": 1240,
    "words_limit": 100000,
    "words_remaining": 98760,
    "period_end": "2026-11-30T08:25:17.000Z"
  },
  "request_id": "req_8e2d4f6a1b3c5d7e9f0a2b4c"
}

Detect

Scores how likely a text is to be AI-generated and flags the sentences that look machine-written.

POSThttps://api.humanizertool.io/v1/detect

Send { "text": "…" } with at least 300 characters; shorter texts return 422 text_too_short. Detect draws from the same word pool as humanize and takes longer, so keep a generous client timeout.

curl https://api.humanizertool.io/v1/detect \
  -H "Authorization: Bearer $HUMANIZER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Artificial intelligence has fundamentally transformed the way modern organizations approach content creation. By automating repetitive writing tasks, these systems enable teams to produce high-quality material at unprecedented speed. Furthermore, they ensure consistency across channels while significantly reducing operational costs for businesses of every size."
  }'
Detect response fields
FieldTypeDescription
idstringUnique id, prefixed det_.
objectstringAlways detect.
scorenumber0–100: likelihood the text is AI-generated.
verdictstring (enum)human, mixed or ai.
human_scorenumber100 − score.
ai_word_count / total_word_countintegerWords in flagged sentences vs. all words.
sentencesarrayFlagged sentences only: [{ text, flagged: true }].
usage, request_idobject, stringSame as humanize.
200 OK
{
  "id": "det_a1B2c3D4e5F6",
  "object": "detect",
  "score": 93,
  "verdict": "ai",
  "human_score": 7,
  "ai_word_count": 44,
  "total_word_count": 44,
  "sentences": [
    { "text": "Artificial intelligence has fundamentally transformed the way modern organizations approach content creation.", "flagged": true },
    { "text": "By automating repetitive writing tasks, these systems enable teams to produce high-quality material at unprecedented speed.", "flagged": true },
    { "text": "Furthermore, they ensure consistency across channels while significantly reducing operational costs for businesses of every size.", "flagged": true }
  ],
  "usage": {
    "words_used": 1284,
    "words_limit": 100000,
    "words_remaining": 98716,
    "period_end": "2026-11-30T08:25:17.000Z"
  },
  "request_id": "req_3c5e7a9b1d3f5a7c9e1b3d5f"
}

Usage & account

Read-only endpoints for checking a key and its quota. They are not metered.

GEThttps://api.humanizertool.io/v1/me
200 OK
{
  "object": "account",
  "email": "dev@example.com",
  "plan": { "id": "starter", "name": "Starter" },
  "key": {
    "id": "302a20f0-67ce-4507-a7ae-e272f633941b",
    "name": "Production",
    "prefix": "ht_live_Ab3x",
    "mode": "live",
    "scopes": ["humanize", "detect"],
    "created_at": "2026-10-30T09:12:44.000Z"
  },
  "limits": { "words_per_month": 100000, "trial_words": null, "max_words_per_request": 1500, "requests_per_minute": 30 },
  "period": { "start": "2026-10-30T08:25:17.000Z", "end": "2026-11-30T08:25:17.000Z" },
  "request_id": "req_e5bbc9b25e899a4dd055209e"
}
GEThttps://api.humanizertool.io/v1/usage
200 OK
{
  "object": "usage",
  "plan": { "id": "starter", "name": "Starter" },
  "period": { "start": "2026-10-30T08:25:17.000Z", "end": "2026-11-30T08:25:17.000Z" },
  "words": { "used": 1284, "limit": 100000, "remaining": 98716 },
  "requests": { "period": 12 },
  "by_endpoint": {
    "humanize": { "requests": 9, "words": 1240 },
    "detect": { "requests": 1, "words": 44 }
  },
  "request_id": "req_c813a184dba46eed6b2dff78"
}

key.id is a UUID. On the Free trial the word pool is one-time, so period.start and period.end are null (and so is usage.period_end in humanize and detect responses); limits.trial_words is set and limits.words_per_month is null.

Public utility endpoints
EndpointAuthDescription
GET /healthNone{ "ok": true, "version": "1", "service": "humanizer-api", "commit": "4cb8285" } — use it for uptime checks. commit identifies the deployed build.
GET /openapi.jsonNoneThe OpenAPI 3.1 document rendered in the reference below.

Errors

Every non-2xx response uses the same JSON envelope, so one error handler covers the whole API.

402 Payment Required
{
  "error": {
    "type": "billing_error",
    "code": "quota_exceeded",
    "message": "Your word quota for this billing period is exhausted.",
    "request_id": "req_e004dfec06a3b07a59d03767",
    "details": {
      "words_used": 100000,
      "words_limit": 100000,
      "period_end": "2026-11-30T08:25:17.000Z",
      "upgrade_url": "https://api.humanizertool.io/billing"
    }
  }
}

Branch on error.code (stable) rather than message (human-readable, may change). On the Free trial the 402 message reads “Your free trial words are used up. Upgrade to keep going.” and details.period_end is null. Requests that fail with 4xx or 503 never consume words.

Error codes
StatusTypeCodeMeaning
400invalid_request_errorinvalid_requestThe body failed validation. details.issues lists each problem (path and message).
401authentication_errormissing_api_key, invalid_api_key, key_revoked, key_expiredNo key, wrong key, or the key is no longer active.
402billing_errorquota_exceededNot enough words left. Nothing was consumed. details has words_used, words_limit, period_end (null on the Free trial) and upgrade_url.
403permission_errorscope_not_allowed, plan_requiredThe key lacks the scope for this endpoint (details.scope). plan_required is reserved for plan-only features; no current endpoint returns it.
404invalid_request_errornot_foundUnknown path, for example a typo in the URL.
409invalid_request_errorkey_limit_reached, already_subscribedDashboard actions only: live-key limit reached (details.max_keys) or already on that plan.
413invalid_request_errortext_too_longText exceeds your plan's words per request (details.max_words, details.words). Nothing consumed.
422invalid_request_errortext_too_shortDetect needs at least details.min_chars (300) characters.
429rate_limit_errorrate_limitedToo many requests this minute. Wait Retry-After seconds (also in details.retry_after; details.limit is your per-minute limit). Nothing consumed.
500api_errorinternal_errorUnexpected error on our side. Safe to retry once.
503api_errorupstream_unavailable, api_disabled, db_unavailableTemporarily unavailable; words were refunded. Retry with backoff. db_unavailable (a brief database issue) sends Retry-After: 5 and is safe to retry.
503api_errorcancel_failedDashboard only: deleting the account couldn't cancel its paid API subscription. Nothing was deleted; try again later.

Rate limits & headers

Limits are applied per key, per minute, and depend on your plan.

Response headers
HeaderDescription
X-Request-IdUnique id of the request (req_…), on every response. Include it when you contact support.
X-RateLimit-LimitRequests allowed per minute for this key (humanize and detect only).
X-RateLimit-RemainingRequests left in the current minute.
X-RateLimit-ResetUnix time (seconds) when the minute window resets.
X-Words-RemainingWords left in your current period after this request (successful humanize and detect responses).
Retry-AfterOn 429 and on 503 db_unavailable: seconds to wait before retrying.

Limits by plan

Limits by plan
PlanRequests / minuteMax words / requestLive keys
Free trial51,0001
Starter301,5002
Growth603,0005
Scale1205,00010
Enterprise2406,000Unlimited

Test keys have their own budget of 60 requests per minute. When you exceed a limit you get 429 rate_limited with a Retry-After header; nothing is consumed. details repeats the wait and your limit:

429 Too Many Requests
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limited",
    "message": "Too many requests, please slow down.",
    "request_id": "req_13112eb48b2eb75ea30f53e2",
    "details": { "limit": 30, "retry_after": 44 }
  }
}

Best practices

A few habits that make integrations fast and resilient.

  • Use generous timeouts. Long texts can take a while, detect more than humanize; set your client timeout to at least 180 seconds and split long documents. If a request times out on your side, check GET /usage before retrying: the request may still have completed.
  • Retry 429 and 503 with backoff. Respect Retry-After when present, otherwise back off exponentially. Don't retry 4xx errors other than 429.
  • Keep keys server-side. Proxy requests through your backend; rotate keys by creating a new one before revoking the old one.
  • Use test keys in CI. Same response shape, zero words used.
  • Split long documents into chunks under your plan's words-per-request limit, ideally on paragraph boundaries.
  • Log request_id. It lets us find a specific request quickly if you contact support.
retry.js
const API_BASE = "https://api.humanizertool.io/v1";
const API_KEY = process.env.HUMANIZER_API_KEY;

async function humanize(text, attempt = 0) {
  const res = await fetch(`${API_BASE}/humanize`, {
    method: "POST",
    headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
    body: JSON.stringify({ text }),
    signal: AbortSignal.timeout(180_000),
  });
  if ((res.status === 429 || res.status === 503) && attempt < 3) {
    const wait = Number(res.headers.get("Retry-After")) || 2 ** attempt;
    await new Promise((r) => setTimeout(r, wait * 1000));
    return humanize(text, attempt + 1);
  }
  if (!res.ok) throw new Error((await res.json()).error.message);
  return res.json();
}

// const { output } = await humanize("Our new release makes it simple to manage invoices and share reports with your team.");

Changelog

  1. v1 — public launch

    • POST /v1/humanize and POST /v1/detect with one shared word pool.
    • GET /v1/me and GET /v1/usage for account and quota checks.
    • Live and test keys, scopes, optional expiry, revocation.
    • Rate-limit and quota headers on every metered response.
    • OpenAPI 3.1 spec at /v1/openapi.json.

API reference

Generated from /v1/openapi.json. Every endpoint, parameter and schema, with request examples.