RewriteIQ API

REST · JSON · Authenticate with client_key in the request body

POST/api/rewrite

Rewrite and humanize text. Credits are billed per input word (2× for enhanced depth).

ParameterTypeDescription
text *stringInput text. Max 100,000 chars / 5,000 words.
client_key *stringYour API key.
style *string"general" · "academic" · "formal" · "professional" · "conversational" · "scholar"
context *stringUse case, e.g. essay, thesis, report, email. Guides rewriting approach.
languagestringOutput language. Default: english.
depthstringstandard (default) or enhanced (2× credits, must be enabled on account).
streambooleanStream as newline-delimited JSON. Default: false.
restructurebooleanLight sentence restructuring. Default: false.
voice_profilestring150–250 word description of target writing style.
preserve_markdownbooleanKeep markdown formatting. Default: false.
ultra_modebooleanAdvanced processing mode. Default: false.
settingsobjectOptional tuning: locked_phrases (string[]), preserve_citations (bool, default true), formality (0–100, default 50), variation (0–100, default 50), length_tolerance (0–100, default 20).
Request
{
  "text": "The findings suggest a correlation between variables.",
  "client_key": "your_api_key",
  "style": "academic",
  "context": "research paper",
  "language": "english",
  "depth": "standard"
}

Non-streaming response

{
  "result": "The results indicate a relationship between the variables.",
  "config": {
    "style": "academic",
    "context": "research paper",
    "language": "english",
    "depth": "standard",
    "stream": false,
    "restructure": false,
    "voice_profile": null,
    "preserve_markdown": false,
    "ultra_mode": false,
    "settings": {
      "locked_phrases": [],
      "preserve_citations": true,
      "formality": 50,
      "variation": 50,
      "length_tolerance": 20
    }
  }
}

Streaming response

Content-Type: application/x-ndjson. One JSON object per line. Sort by index, join humanized.

{"index":0,"original":"First sentence.","humanized":"Rewritten sentence."}
{"index":1,"original":"Second sentence.","humanized":"Another rewrite."}

POST/api/usage

Check account credit balance and feature flags.

ParameterTypeDescription
client_key *stringYour API key.
Request
{ "client_key": "your_api_key" }
Response 200
{
  "credits_remaining": 48200,
  "credits_used": 1800,
  "enhanced_enabled": false
}

Errors

All errors return { "error": "...", "code": "..." }.

StatusCodeDescription
403INVALID_KEYAPI key missing or not recognised.
403INSUFFICIENT_CREDITSAccount balance too low.
403ENHANCED_NOT_ENABLEDEnhanced depth not enabled for this account.
413PAYLOAD_TOO_LARGEText exceeds maximum size.
422MISSING_FIELDRequired field missing or invalid.
429RATE_LIMIT_EXCEEDEDToo many requests. Retry after a short delay.
500SERVER_ERRORUnexpected error. Safe to retry with backoff.