API Documentation
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.
All public API requests go to this base path.
Get your API key from dashboard API panel.
credits, humanize, detect, writing/create, writing/refine.
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
- 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.
{
"code": 200,
"message": "Success",
"data": {
"request_id": "req_1711863600123_ab12cd34e",
"humanized_text": "Rewritten text appears here"
},
"timestamp": 1711863600456
}{
"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"
}Get Remaining Credits
GETUse 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.
Requires X-API-Key.
No credits are consumed by this endpoint.
Current server response returns words as the unit even though the number is credit balance.
Response Fields
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
}Humanize Text
POSTTurn 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.
Also capped at 40000 characters and 5000 input tokens.
Estimated using 1 word ≈ 1.2 tokens. Actual billing still uses counted input tokens, rounded up.
All three are optional. Language auto-detects if omitted.
Supported models
Lowest-cost mode. Fast, but output quality is usually the weakest.
Recommended default. Best tradeoff between speed and quality.
Highest-quality mode. Use when output quality matters most.
Supported styles
Default style for most content.
Formal and academic wording.
More conversational tone.
Business-friendly and polished.
Lighter, article-style writing.
Email-style phrasing and structure.
Recommended language codes
English
Spanish
Chinese
Request Fields
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
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
}AI Detection
POSTDetect 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.
Also capped at 40000 characters and 5000 input tokens.
Each detection request costs exactly 1 credit.
Detection runs asynchronously and is polled until completion.
Request Fields
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
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.
Validation failure, text too short, content too long, or unsupported payload shape.
Missing or invalid X-API-Key.
Insufficient API credits for the requested operation.
Mapped rate-limit error. Can also surface when upstream polling is rate-limited.
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.