AIHumanizer

Developers

Text detection for your workflow

The AIHumanizer API analyzes English text and returns a document score, a threshold-based verdict and sentence scores. Use it to support a review workflow; the estimate cannot establish authorship or misconduct.

Manage API keys

Authentication and limits

Send Authorization: Bearer <API_KEY> from your server. Keys can spend account credits; keep them out of client code, URLs, and public repositories. Create or revoke keys in settings.

Each key can make one request every 2 seconds. Each request allows up to 5,000 English words and 100,000 characters; the owner may lower the word limit. Hosted providers require at least 300 characters; the configured Modal endpoint may accept shorter text. JSON request bodies are capped at 450,000 bytes.

Requests cost 1 credit per 100 words, rounded up. Failed or timed-out detection refunds charged credits. Responses are synchronous, with a maximum wait of 25 seconds. Requests are not retried automatically.

The API does not create a scan record or log submitted text in this application. Text is sent to the configured detection provider, whose retention and training practices also apply. Built-in public examples may use cached results. Do not submit confidential material without checking the provider’s terms.


POST /api/v1/detect

The request body is { text: string }. Preserve the original text to use the response character offsets.

The English text in these examples is sample input for the detector. Replace it with the text you want to check.

curl

curl
curl "https://tryaihumanizer.com/api/v1/detect" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  --data '{"text":"Our editing team reviews each draft before publication. We compare names, dates and quotations with the source material, then ask the writer to explain any passage that needs more context. A detector score can help us choose where to begin that conversation, but it does not tell us who wrote the text. We keep earlier drafts and use human judgment when deciding which changes to accept."}'

JavaScript (Node.js)

JavaScript
// Run on your server. Keep API keys out of browser code.const response = await fetch("https://tryaihumanizer.com/api/v1/detect", {  method: 'POST',  headers: {    Authorization: `Bearer ${process.env.API_KEY}`,    'Content-Type': 'application/json',  },  body: JSON.stringify({ text: "Our editing team reviews each draft before publication. We compare names, dates and quotations with the source material, then ask the writer to explain any passage that needs more context. A detector score can help us choose where to begin that conversation, but it does not tell us who wrote the text. We keep earlier drafts and use human judgment when deciding which changes to accept." }),});const result = await response.json();if (!response.ok || result.code !== 0) {  throw new Error(result.message);}console.log(result.data.verdict, result.data.docScore);

Python

Python
# Run on your server. Keep API keys out of browser code.import jsonimport osfrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenrequest = Request(    "https://tryaihumanizer.com/api/v1/detect",    data=json.dumps({"text": "Our editing team reviews each draft before publication. We compare names, dates and quotations with the source material, then ask the writer to explain any passage that needs more context. A detector score can help us choose where to begin that conversation, but it does not tell us who wrote the text. We keep earlier drafts and use human judgment when deciding which changes to accept."}).encode("utf-8"),    headers={        "Authorization": f"Bearer {os.environ['API_KEY']}",        "Content-Type": "application/json",    },    method="POST",)try:    with urlopen(request, timeout=30) as response:        result = json.load(response)    if result["code"] != 0:        raise RuntimeError(result["message"])    print(result["data"]["verdict"], result["data"]["docScore"])except HTTPError as error:    raise RuntimeError(error.read().decode("utf-8")) from error

Response

Success uses code: 0 with results in data. docScore and sentence.score are detector estimates from 0 to 1; a higher score indicates stronger AI-like signals. They are not the percentage of words written by AI or proof of authorship. The verdict is human, uncertain, or ai, using the configured thresholds. Character offsets use JavaScript UTF-16 indices.

JSON
{  "code": 0,  "message": "ok",  "data": {    "status": "done",    "verdict": "uncertain",    "docScore": 0.5,    "wordCount": 3,    "modelVersion": "configured-model-version",    "sentences": [      {        "start": 0,        "end": 15,        "text": "Text to review.",        "score": 0.5,        "verdict": "uncertain"      }    ],    "l1": {      "wordCount": 3,      "sentenceCount": 1,      "score": 0,      "band": "low",      "signals": [],      "phrases": [],      "hints": []    }  }}

Values above illustrate the response structure and are not an actual detection result. L1 information provides rule-based explanations, not a verdict.


Errors

Errors return code: -1 and a readable message.

400
Invalid JSON, empty text, fewer than 300 characters with a hosted provider, or input over the size limit.
401
Missing, invalid, or revoked API key.
402
Insufficient available credits.
429
Too many requests; follow the Retry-After header.
502 / 503
The detector is unavailable or has not been configured.
504
Detection did not finish within 25 seconds. Charged credits are refunded.