SDK Documentation

HumanizedText SDK Guide

Complete SDK reference with accurate parameters, use cases, request and response examples, and integration patterns for Python, Node.js, and raw HTTP.

Authentication

Every SDK request must include a private API key.

X-API-Key: YOUR_API_KEY

Base URL: https://api.humanizedtext.pro/api/v1

Never expose keys in browser-side code or public repos.

SDK Limits

SDK quotas are tracked separately from app dashboard usage.

Free: 50,000 chars per 30 days, 5 ultra uses.

Pro: 500,000 chars per 7 days, 50 ultra uses.

Premium: Unlimited chars, 500 ultra uses per 7 days.

Keyword cap per humanize request: Free 1, Pro 7, Premium 12.

Python Calling Example

Install, call, and handle API errors.

pip install humanizedtext-sdk
from humanizedtext_sdk import HumanizedTextClient
from humanizedtext_sdk.exceptions import HumanizedTextAPIError

client = HumanizedTextClient(
    api_key="YOUR_API_KEY",
    base_url="https://api.humanizedtext.pro/api/v1",
    timeout=60,
)

try:
    result = client.humanize(
        text="Your AI generated paragraph...",
        tone="professional",
        ultra_humanize=True,
        keywords=["SEO", "conversion optimization"],
    )
    print(result["humanized_text"])
except HumanizedTextAPIError as exc:
    print(exc.status_code)
    print(exc.payload)

Node.js / npm Calling Example

Works with JavaScript and TypeScript projects.

npm install humanizedtext-sdk
import { HumanizedTextClient } from "humanizedtext-sdk";

const client = new HumanizedTextClient({
  apiKey: "YOUR_API_KEY",
  baseUrl: "https://api.humanizedtext.pro/api/v1",
  timeout: 60000,
});

try {
  const result = await client.humanize({
    text: "Your AI generated paragraph...",
    tone: "professional",
    ultraHumanize: true,
    keywords: ["SEO", "conversion optimization"],
  });
  console.log(result.humanized_text);
} catch (err) {
  console.error(err.statusCode, err.payload);
}

Raw HTTP Calling Example

Use this when you want full control without SDK wrappers.

curl -X POST "https://api.humanizedtext.pro/api/v1/sdk/humanize" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "text": "Your AI generated paragraph...",
    "tone": "professional",
    "ultra_humanize": true,
    "keywords": ["SEO", "conversion optimization"]
  }'

Endpoint Reference With Deep Parameters

POST /sdk/humanize

Humanize AI text while optionally applying tone and keyword-aware rewriting.

Python SDK method

humanize(text, tone=None, ultra_humanize=False, keywords=None)

npm SDK method

humanize({ text, tone, ultraHumanize, keywords })

Request parameters

  • text: string, required, 1-6000 chars
  • tone: string, optional (example: professional)
  • ultra_humanize: boolean, optional, default false
  • keywords: string[], optional; per-plan keyword cap applies

Response fields

  • original_text: string
  • humanized_text: string
  • tone_applied: string | null
  • ultra_humanize_used: boolean
  • keywords_used: string[]
  • created_at: ISO datetime

Common use cases

  • Rewrite AI copy to sound more natural before publishing.
  • Apply brand tone (professional, friendly, confident) in one call.
  • Inject SEO phrases while preserving readability.

Response example

{
  "original_text": "Your AI generated paragraph...",
  "humanized_text": "Polished and natural sounding output...",
  "tone_applied": "professional",
  "ultra_humanize_used": true,
  "keywords_used": ["SEO", "conversion optimization"],
  "created_at": "2026-04-12T10:25:39.447000+00:00"
}

POST /sdk/grammar-fixer

Fix grammar and sentence correctness without changing core meaning.

Python SDK method

grammar_fixer(text)

npm SDK method

grammarFixer({ text })

Request parameters

  • text: string, required, 1-6000 chars

Response fields

  • original_text: string
  • corrected_text: string
  • created_at: ISO datetime

Common use cases

  • Clean user-generated content before showing to customers.
  • Fix drafts before sending outbound emails.
  • Add language-quality checks in CMS publish workflow.

Response example

{
  "original_text": "this are bad grammar sentence",
  "corrected_text": "This sentence has incorrect grammar.",
  "created_at": "2026-04-12T10:27:01.122000+00:00"
}

POST /sdk/content-rewriter

Rewrite text while preserving meaning and reducing repetitive patterns.

Python SDK method

content_rewriter(text)

npm SDK method

contentRewriter({ text })

Request parameters

  • text: string, required, 1-6000 chars

Response fields

  • original_text: string
  • rewritten_text: string
  • created_at: ISO datetime

Common use cases

  • Generate alternate versions for A/B tests.
  • Refresh old blog sections without changing message intent.
  • Rewrite repetitive support responses into clearer language.

Response example

{
  "original_text": "Original text that should be rewritten",
  "rewritten_text": "A clearer and more natural rewritten version of the same idea.",
  "created_at": "2026-04-12T10:28:10.912000+00:00"
}

POST /sdk/seo-blog-writer

Generate SEO-focused blog content from a given topic.

Python SDK method

seo_blog_writer(topic)

npm SDK method

seoBlogWriter({ topic })

Request parameters

  • topic: string, required, 1-500 chars

Response fields

  • topic: string
  • blog_content: string
  • created_at: ISO datetime

Common use cases

  • Create first-draft blog posts for content teams.
  • Generate topic expansions for editorial planning.
  • Produce long-form content for niche landing pages.

Response example

{
  "topic": "How to improve landing page conversion",
  "blog_content": "Long-form SEO article output...",
  "created_at": "2026-04-12T10:29:42.334000+00:00"
}

Errors, Causes, and Fixes

Use this table to debug integration issues quickly.

401 Unauthorized

Missing or invalid X-API-Key.

Fix: Generate a key and send it in X-API-Key header from server-side code only.

422 Unprocessable Entity

Schema validation failed (for example empty text, missing required field, or wrong field type).

Fix: Validate payload structure and field constraints before calling SDK methods.

400 Bad Request

Business-rule validation failed (for example keyword plan cap exceeded).

Fix: Check plan-specific constraints such as keyword count and retry with valid values.

402 Payment Required

SDK character quota exhausted for the current period.

Fix: Check plan and retry after period reset or upgrade plan.

429 Too Many Requests

Rate limit or ultra_humanize period limit exceeded.

Fix: Use exponential backoff and reduce burst rate.

500 Internal Server Error

Temporary generation failure from upstream processing.

Fix: Retry with backoff and add request tracing in logs.

Production Readiness Checklist

Store API keys in server-only environment variables.

Apply retry with exponential backoff for 429 and 500 responses.

Log endpoint, payload size, and status code for support debugging.

Open API Access