DevelopersDocumentation

API Documentation

Everything you need to integrate AI text humanization into your application.

Base URL: https://thehumanizeai.pro/apiVersion: v1

Getting Started

The Humanize AI API lets you convert AI-generated text into natural, human-sounding content with a single POST request. Here is how to get started in 3 steps:

1

Generate an API Key

Go to your API Dashboard and click Generate Key. You get 500 free credits on your first key.

2

Make Your First Request

Send a POST request to the humanize endpoint with your text and API key.

3

Use the Humanized Text

The response includes the humanized text, word count, and your updated credit balance.

bash
curl -X POST https://thehumanizeai.pro/api/v1/humanize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "AI-generated text here", "model": "fast"}'

Authentication

All API requests require a valid API key sent in the Authorization header as a Bearer token.

http
Authorization: Bearer hmai_ak_your_key_here
Keep your key secret. Never expose API keys in client-side code, public repos, or browser requests. Keys are shown only once when generated. If compromised, delete the key from your dashboard and create a new one.

Key Format

All API keys start with the hmai_ak_ prefix followed by 64 hex characters.

text
hmai_ak_2bba8fd5233829de7d4e00882a5a37e5...

Humanize Text

POST/v1/humanize

Send text and receive a humanized version. Supports two models and five tones for the HumanoidX model.

Request Body

ParameterTypeDescription
textREQUIREDstringThe text to humanize. Max 50,000 characters.
modelstring"fast" (default) or "humanoidx"
tonestringOnly for humanoidx model. One of: academic, formal, casual, concise, expand

Example Request

bash
curl -X POST https://thehumanizeai.pro/api/v1/humanize \
  -H "Authorization: Bearer hmai_ak_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Machine learning algorithms utilize statistical methods to identify patterns.",
    "model": "humanoidx",
    "tone": "academic"
  }'

Response

json
{
  "humanized_text": "Machine learning models use statistical techniques to find patterns in data.",
  "original_words": 9,
  "credits_used": 9,
  "credits_remaining": 4991,
  "model": "humanoidx",
  "tone": "academic"
}

Response Fields

FieldTypeDescription
humanized_textstringThe humanized output text
original_wordsintegerWord count of the input text
credits_usedintegerCredits deducted for this request
credits_remainingintegerYour remaining credit balance
modelstringModel used: "fast" or "humanoidx"
tonestring|nullTone used, or null for fast model

Check Usage

GET/v1/usage

Check your current credit balance, lifetime usage, tier, and rate limits.

Example Request

bash
curl https://thehumanizeai.pro/api/v1/usage \
  -H "Authorization: Bearer hmai_ak_your_key_here"

Response

json
{
  "credits_remaining": 4991,
  "credits_used_total": 9,
  "tier": "Explorer",
  "rate_limit": 1,
  "max_keys": 1
}
FieldTypeDescription
credits_remainingintegerAvailable credits
credits_used_totalintegerLifetime credits consumed
tierstringCurrent tier: Explorer, Builder, Scale, or Enterprise
rate_limitintegerRequests per second allowed
max_keysintegerMaximum API keys allowed for your tier

Models and Tones

Fast Model

model: "fast"

Default model. Returns results in under 3 seconds. Best for high-volume workloads where speed matters more than tone control. Does not accept a tone parameter.

json
{"text": "Your text here", "model": "fast"}

HumanoidX Model

model: "humanoidx"PRO

Premium engine with tone control. Takes 3 to 5 seconds. Best for content that needs specific writing style. If no tone is provided, defaults to "academic".

Available Tones

ToneBest For
academicResearch papers, essays, scholarly writing
formalBusiness reports, proposals, professional emails
casualBlog posts, social media, casual writing
conciseSummaries, abstracts, shortened versions
expandAdding detail, elaborating, lengthening text

Error Handling

The API uses standard HTTP status codes. Errors return a JSON body with error and message fields.

json
{
  "error": "insufficient_credits",
  "credits_remaining": 3,
  "words_required": 50,
  "message": "Purchase credits at https://thehumanizeai.pro/dashboard/api"
}

Status Codes

200Request succeeded
400Bad request (missing or invalid parameters)
401Unauthorized (invalid or missing API key)
402Insufficient credits
405Method not allowed (wrong HTTP method)
429Rate limit exceeded
500Internal server error
502Humanization engine temporarily unavailable

Rate Limits

Rate limits scale automatically based on your lifetime credit usage. No manual upgrades needed. Use more credits and your limits increase.

TierThresholdRate LimitMax Keys
Explorer0 credits used1 req/s1 key
Builder50,000 credits used5 req/s3 keys
Scale200,000 credits used15 req/s10 keys
Enterprise1,000,000 credits used30 req/s25 keys

If you hit a rate limit, wait 1 second and retry. The API returns a 429 status when you exceed your tier limit.

Code Examples

Python

python
import requests

API_KEY = "hmai_ak_your_key_here"
BASE_URL = "https://thehumanizeai.pro/api"

# Humanize with fast model
response = requests.post(f"{BASE_URL}/v1/humanize", json={
    "text": "AI-generated text goes here",
    "model": "fast"
}, headers={
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
})

data = response.json()
print(data["humanized_text"])
print(f"Credits remaining: {data['credits_remaining']}")

JavaScript / Node.js

javascript
const API_KEY = "hmai_ak_your_key_here";
const BASE_URL = "https://thehumanizeai.pro/api";

async function humanize(text, model = "fast", tone = null) {
  const body = { text, model };
  if (tone) body.tone = tone;

  const res = await fetch(`${BASE_URL}/v1/humanize`, {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify(body),
  });

  if (!res.ok) {
    const err = await res.json();
    throw new Error(err.message || "API error");
  }

  return res.json();
}

// Usage
const result = await humanize("Your AI text here");
console.log(result.humanized_text);

PHP

php
<?php
$apiKey = "hmai_ak_your_key_here";
$url = "https://thehumanizeai.pro/api/v1/humanize";

$data = json_encode([
    "text" => "AI-generated text goes here",
    "model" => "humanoidx",
    "tone" => "formal"
]);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer $apiKey",
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
echo $result["humanized_text"];

Ready to Start Building?

Generate your API key and test with 500 free credits. No credit card required.