AI Humanizer and AI Detector API

Updated 2026-10-29

The Online Humanizer API exposes the same humanizer and AI detector you use on the site. Send JSON over HTTPS with a bearer key and get a synchronous result. API access is included with the Premium plan.

Base URL: https://api.onlinehumanizer.com

Authentication

Every request needs your API key as a bearer token:

Authorization: Bearer YOUR_API_KEY

Keep the key secret and call the API from your server, not from a browser. A missing or malformed header, an unknown or revoked key, or a suspended account returns 401 unauthorized.

API keys are issued by our team for now. Contact us with your expected volume and we will set one up.

Endpoints

  • POST /v1/humanize rewrites text to read more naturally.
  • POST /v1/scan returns an AI-likelihood score for text, optionally per sentence.

Both endpoints are synchronous: each call waits for its result and returns it in the response, up to your account's wait timeout. Set your client timeout accordingly.

Send Content-Type: application/json. Unknown request fields are ignored.

Humanize text

POST /v1/humanize

Request fields:

  • text (string, required): the text to rewrite. It must contain a non-whitespace character and stay within your words-per-request limit.
  • model (string, optional): standard or advanced. standard always uses the standard model; advanced uses the stronger model when available and otherwise falls back to standard. If omitted, the request behaves like advanced.
  • level (integer, optional): rewrite strength from 1 (light) to 10 (strong).
  • include_alternatives (boolean, optional): also return alternative rewrites per sentence. Defaults to false.

Example request:

curl -sS https://api.onlinehumanizer.com/v1/humanize \
  -H "Authorization: Bearer $ONLINE_HUMANIZER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Artificial intelligence has fundamentally transformed the way we work.",
    "model": "standard",
    "level": 5,
    "include_alternatives": true
  }'

Response fields:

  • job_id (string, UUID): identifier for this request. Include it when contacting support.
  • text (string): the rewritten text.
  • alternatives (array, optional): alternative rewrites per sentence when include_alternatives is true.
  • alternatives[].id (string): sentence identifier.
  • alternatives[].original (string): the original sentence.
  • alternatives[].alternatives (array of strings): alternative rewrites of that sentence.

Example response:

{
  "job_id": "9a1c4e2b-5d6f-4a3b-8c7d-2e1f0a9b8c7d",
  "text": "AI has changed how we work, from the ground up.",
  "alternatives": [
    {
      "id": "1",
      "original": "Artificial intelligence has fundamentally transformed the way we work.",
      "alternatives": [
        "AI has changed how we work, from the ground up.",
        "The way we work looks very different now that AI is here."
      ]
    }
  ]
}

Scan text for AI patterns

POST /v1/scan

Request fields:

  • text (string, required): the text to scan. It must contain a non-whitespace character and stay within your words-per-request limit.
  • include_sentences (boolean, optional): also return a score per sentence. Defaults to false.

Example request:

curl -sS https://api.onlinehumanizer.com/v1/scan \
  -H "Authorization: Bearer $ONLINE_HUMANIZER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The quick brown fox jumps over the lazy dog. It was a sunny day.",
    "include_sentences": true
  }'

Response fields:

  • job_id (string, UUID): identifier for this request.
  • score (number): detection score for the whole text, from 0 to 1; 1 means human-written and 0 means AI-generated.
  • sentences (array, optional): per-sentence scores when include_sentences is true and the text has sentences.
  • sentences[].id (string): sentence identifier.
  • sentences[].sentence (string): the sentence text.
  • sentences[].score (number): detection score for that sentence, on the same scale. Depending on the detector that handles the request, a sentence score is either a graded value or only 0 (flagged as AI) or 1 (not flagged).

Example response:

{
  "job_id": "3f2b8c1e-7a4d-4e3b-9c2a-1d5e6f7a8b9c",
  "score": 0.42,
  "sentences": [
    { "id": "1", "sentence": "The quick brown fox jumps over the lazy dog.", "score": 0.31 },
    { "id": "2", "sentence": "It was a sunny day.", "score": 0.53 }
  ]
}

Scores are a guide, not proof of authorship. Every AI detector makes mistakes, including on text a person wrote. See why AI detectors disagree.

Limits

Limits are set per account. Contact us for your values or to change them. A limit of 0 blocks every request it applies to with 429.

  • Words per request: the maximum number of words in text. Words are counted by splitting on whitespace, so well-known is one word. Exceeding the limit returns 413 text_too_long; exactly the limit is accepted.
  • Requests per minute: maximum requests per calendar minute (UTC), shared by scan and humanize. Exceeding it returns 429 rate_limited.
  • Daily quota: requests per UTC day, counted separately for scan and humanize and regardless of text length. Resets at 00:00 UTC.
  • Monthly quota: requests per calendar month (UTC), counted separately for scan and humanize. Resets at 00:00 UTC on the first of the month.
  • Wait timeout: how long a request waits for its result. A request that takes longer returns 504 timeout.
  • Request body: at most 1 MiB. A larger body is rejected with 400 invalid_request.

Errors

Errors return a non-2xx status and a JSON body with an error object:

{
  "error": {
    "code": "rate_limited",
    "message": "too many requests this minute",
    "retry_after": 60
  }
}
  • code: machine-readable error code; see the list below.
  • message: human-readable detail. Do not parse it; it may change.
  • retry_after: seconds to wait before retrying. Present only when the Retry-After header is set.

Error codes:

  • 400 invalid_request: the body is not valid JSON, a field has the wrong type, model is not standard or advanced, level is not an integer from 1 to 10, the body is larger than 1 MiB, or text is missing or blank.
  • 401 unauthorized: missing or malformed Authorization header, unknown or revoked API key, or suspended account.
  • 413 text_too_long: text has more words than your words-per-request limit.
  • 429 rate_limited: your requests-per-minute limit is used up for this minute.
  • 429 quota_exceeded: your daily or monthly quota for this operation is used up; message says which.
  • 502 provider_error: processing failed. The request can be retried.
  • 503 capacity_exhausted: no processing capacity is available right now.
  • 504 timeout: the result was not ready within your wait timeout. The request may still finish and count toward your quota, but its result cannot be retrieved.

Retries

  • 429 and 503: wait the number of seconds in the Retry-After header (also in retry_after) before retrying.
  • 502 provider_error: retry with exponential backoff, for example after 1, 2 and 4 seconds, then give up.
  • 504 timeout: a retry is a new request and counts toward your quota again. Consider sending shorter texts.
  • 400, 401 and 413: do not retry unchanged; fix the request or the key first.
  • A 429 that comes back right after the time its Retry-After pointed to usually means that limit is 0 for your account: contact support instead of retrying.

A request that fails while being processed is refunded to your daily and monthly quota, so 503 capacity_exhausted and 502 provider_error responses normally do not use them up. The requests-per-minute limit is never refunded: every accepted request uses a slot in its minute. A request that ended in 504 timeout counts if it later finishes.

JavaScript example

const text = "Artificial intelligence has fundamentally transformed the way we work.";

const res = await fetch("https://api.onlinehumanizer.com/v1/humanize", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.ONLINE_HUMANIZER_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ text, model: "standard", level: 5 }),
});

const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? "Request failed");
console.log(data.text);

Python example

import os
import requests

text = "The quick brown fox jumps over the lazy dog. It was a sunny day."

res = requests.post(
    "https://api.onlinehumanizer.com/v1/scan",
    headers={"Authorization": f"Bearer {os.environ['ONLINE_HUMANIZER_API_KEY']}"},
    json={"text": text, "include_sentences": True},
    timeout=70,
)
res.raise_for_status()
print(res.json()["score"])

Plans and access

API access is included with Premium. Compare plans and limits, or read more about the AI humanizer and AI detector.

Your text stays right where you left it.

or

Create an account · Forgot your password?