GPTHumanizer Logo
GPTHumanizer AI
Developer Docs

API Documentation

Open Dashboard
Production-Verified API

Complete API docs built from the real server contract, not placeholders.

This page documents the public API at /api/v1. It reflects the current API behavior, AI service integration, billing rules, and actual response formats so developers can copy examples and start building immediately.

Base URL
https://api.gpthumanizer.ai/api/v1

All public API requests go to this base path.

Authentication
X-API-Key

Get your API key from dashboard API panel.

Endpoints
5 public endpoints

credits, humanize, detect, writing/create, writing/refine.

Start Here
1
Generate an API key in your dashboard and store it on the server side.
2
Send JSON bodies and include X-API-Key in the request headers.
3
Parse the outer wrapper first: code, message, data, timestamp.
4
Handle 400, 401, 402, 429, and 500 errors explicitly in your client code.

Humanize

100 input words = 1 credit. Default model is balanced.

Detect

Costs 1 credit per detection request.

Writing Create

10 output tokens = 1 credit. Supports research mode.

Credits

Check remaining balance before expensive generation calls.

Request Basics

Required headers
X-API-Key: YOUR_API_KEY
Content-Type: application/json
General rules
  • All endpoints are synchronous from the client perspective. The service handles internal polling for you.
  • Use server-side API calls whenever possible. Do not expose secret API keys in public frontend code.
  • Humanize and detect reject inputs under 50 characters.
  • Writing endpoints bill on generated output tokens, not on input tokens.
Successful response wrapper
{
  "code": 200,
  "message": "Success",
  "data": {
    "request_id": "req_1711863600123_ab12cd34e",
    "humanized_text": "Rewritten text appears here"
  },
  "timestamp": 1711863600456
}
Error response wrapper
{
  "code": 402,
  "message": "Insufficient API credits. Required: 3 credits, Available: 0 credits.",
  "data": null,
  "timestamp": "2026-03-31T10:16:55.031Z",
  "path": "/api/v1/humanize",
  "method": "POST"
}
Contents
Balance

Get Remaining Credits

GET
/api/v1/credits

Use this endpoint to fetch the current remaining API credit balance for the API key. It is the safest way to check whether a user can afford a generation or detection request before you send it.

Authentication
Required

Requires X-API-Key.

Billing
Free

No credits are consumed by this endpoint.

Response note
unit = words

Current server response returns words as the unit even though the number is credit balance.

Response Fields

Field
Type
Required
Description
balance
number
Yes
Current remaining API credits balance.
unit
string
Yes
Current implementation returns words, even though balance represents API credits.
userId
string | number
Yes
Owner user ID for the API key.

Code Example

curl -X GET https://api.gpthumanizer.ai/api/v1/credits \
  -H "X-API-Key: YOUR_API_KEY"

Response Example

{
  "code": 200,
  "message": "Success",
  "data": {
    "balance": 96,
    "unit": "words",
    "userId": 1024
  },
  "timestamp": 1711863600456
}
Core Endpoint

Humanize Text

POST
/api/v1/humanize

Turn your text into natural writing. For a simpler estimate, you can think of it as 100 words = 1 credit based on 1 word ≈ 1.2 tokens. Actual billing still uses counted input tokens and rounds up.

Validation
>= 50 chars

Also capped at 40000 characters and 5000 input tokens.

Billing
100 words = 1 credit

Estimated using 1 word ≈ 1.2 tokens. Actual billing still uses counted input tokens, rounded up.

Default config
balanced + general + auto

All three are optional. Language auto-detects if omitted.

Supported models

free

Lowest-cost mode. Fast, but output quality is usually the weakest.

balanced

Recommended default. Best tradeoff between speed and quality.

enhanced

Highest-quality mode. Use when output quality matters most.

Supported styles

general

Default style for most content.

academic

Formal and academic wording.

casual

More conversational tone.

professional

Business-friendly and polished.

blog

Lighter, article-style writing.

email

Email-style phrasing and structure.

Recommended language codes

en-US

English

es-ES

Spanish

zh-CN

Chinese

Request Fields

Field
Type
Required
Description
text
string
Yes
Source text to humanize. At least 50 characters. Hard-capped at 40000 characters and 5000 input tokens.
model
string
No
Humanization model. Default is balanced.
style
string
No
Output writing style. Default is general.
language
string
No
Language code such as en-US or zh-CN. Default is auto (automatic language detection).

Code Example

curl -X POST https://api.gpthumanizer.ai/api/v1/humanize \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Artificial intelligence has revolutionized modern technology, but the wording still sounds too mechanical and repetitive.",
    "model": "balanced",
    "style": "general",
    "language": "en-US"
  }'

Response Fields

Field
Type
Required
Description
request_id
string
Yes
Public API request identifier.
upstream_request_id
string
Yes
Internal processing task identifier.
humanized_text
string
Yes
Final rewritten text.
usage.input_tokens
number
Yes
Input token count used for billing.
usage.output_tokens
number
Yes
Output token count for reference.
usage.credits_charged
number
Yes
Credits deducted for this call.
credits_remaining
number
Yes
Remaining API credits after billing.
ai_confidence
number
No
AI confidence score when available.
human_rate
number
No
Human-likeness score when available.

Response Example

{
  "code": 200,
  "message": "Success",
  "data": {
    "request_id": "req_1711863600123_ab12cd34e",
    "upstream_request_id": "4de55b32-fd3f-4c18-8c53-d00dcdd51a91",
    "humanized_text": "Artificial intelligence is reshaping modern technology at an extraordinary pace.",
    "usage": {
      "input_tokens": 268,
      "output_tokens": 241,
            "credits_charged": 3
    },
        "credits_remaining": 97,
    "ai_confidence": 0.18,
    "human_rate": 0.91
  },
  "timestamp": 1711863600456
}
Analysis

AI Detection

POST
/api/v1/detect

Detect whether a text looks AI-generated. The server validates text length, processes the detection request asynchronously, and returns AI and human probability scores. Each detection costs 1 credit.

Validation
>= 50 chars

Also capped at 40000 characters and 5000 input tokens.

Billing
1 credit

Each detection request costs exactly 1 credit.

Processing
Async

Detection runs asynchronously and is polled until completion.

Request Fields

Field
Type
Required
Description
text
string
Yes
Text to detect. At least 50 characters. Hard-capped at 40000 characters and 5000 input tokens.

Code Example

curl -X POST https://api.gpthumanizer.ai/api/v1/detect \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Your text to analyze for AI detection. Make sure it is long enough to pass minimum-length validation."
  }'

Response Fields

Field
Type
Required
Description
request_id
string
Yes
Public API request identifier.
is_ai_generated
boolean
Yes
Whether the text is predicted to be AI-generated.
ai_probability
number
Yes
Probability score for AI-generated content (0-100).
human_probability
number
Yes
Probability score for human-written content (0-100).
confidence
number
Yes
Confidence score for the prediction (0-1).
usage.input_tokens
number
Yes
Input tokens counted before detection.
usage.credits_charged
number
Yes
Credits deducted (always 1 credit).
credits_remaining
number
Yes
Remaining API credits after billing.

Response Example

{
  "code": 200,
  "message": "Success",
  "data": {
    "request_id": "req_1711863600789_f0ab19ce2",
    "is_ai_generated": true,
    "ai_probability": 84.2,
    "human_probability": 15.8,
    "confidence": 0.93,
    "usage": {
      "input_tokens": 411,
      "credits_charged": 1
    },
    "credits_remaining": 95
  },
  "timestamp": 1711863600832
}

Error Handling

Business failures are returned with an HTTP status code and the same outer response wrapper shape. Handle the HTTP status code first, then read message for user-facing details.

400
Bad Request

Validation failure, text too short, content too long, or unsupported payload shape.

401
Unauthorized

Missing or invalid X-API-Key.

402
Payment Required

Insufficient API credits for the requested operation.

429
Too Many Requests

Mapped rate-limit error. Can also surface when upstream polling is rate-limited.

Common error messages you should expect include text_too_short, text_too_long, content_too_long, topic_required, content_required, insufficient_credits, upstream_rate_limited, and internal_error.

Ready to generate your first request?

Create an API key, check your remaining balance, and start with the humanize example above. Every endpoint example on this page is designed to be copied and adapted directly.