Developers

RewriteIQ API

REST · JSON · Authenticate with client_key in the request body. Humanize text from your backend with one endpoint.

Enterprises: for volume pricing, contact partners@rewriteiq.com.

Authentication

Include your API key as client_key in the JSON body. Create and rotate keys in Account → API. Never ship keys in frontend code.

Request body
{
  "text": "Content to process",
  "client_key": "riq_sk_your_key_here",
  "style": "professional",
  "context": "blog post"
}

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.
languagestringOutput language. Default: english.
depthstringstandard (default) or enhanced (2× credits).
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.
settingsobjectlocked_phrases, preserve_citations, formality, variation, length_tolerance.
Request
curl -X POST https://rewriteiq.com/api/rewrite \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The findings suggest a correlation between variables.",
    "client_key": "riq_sk_your_key",
    "style": "academic",
    "context": "research paper",
    "language": "english",
    "depth": "standard"
  }'

Non-streaming response

200 OK
{
  "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.

Request
curl -X POST https://rewriteiq.com/api/usage \
  -H "Content-Type: application/json" \
  -d '{ "client_key": "riq_sk_your_key" }'
200 OK
{
  "credits_remaining": 48200,
  "credits_used": 1800,
  "enhanced_enabled": true
}

Errors

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

StatusCodeDescription
403INVALID_KEYAPI key missing or not recognised.
403FORBIDDENActive Pro subscription required.
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.

Billing

  • 1 credit per input word · enhanced depth = 2×
  • Max text: 100,000 chars · 5,000 words
  • Uses your RewriteIQ Pro subscription / pack word balance