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).
| Parameter | Type | Description |
|---|---|---|
| text * | string | Input text. Max 100,000 chars / 5,000 words. |
| client_key * | string | Your API key. |
| style * | string | "general" · "academic" · "formal" · "professional" · "conversational" · "scholar" |
| context * | string | Use case, e.g. essay, thesis, report, email. Guides rewriting approach. |
| language | string | Output language. Default: english. |
| depth | string | standard (default) or enhanced (2× credits, must be enabled on account). |
| stream | boolean | Stream as newline-delimited JSON. Default: false. |
| restructure | boolean | Light sentence restructuring. Default: false. |
| voice_profile | string | 150–250 word description of target writing style. |
| preserve_markdown | boolean | Keep markdown formatting. Default: false. |
| ultra_mode | boolean | Advanced processing mode. Default: false. |
| settings | object | Optional 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). |
{
"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.
| Parameter | Type | Description |
|---|---|---|
| client_key * | string | Your API key. |
{ "client_key": "your_api_key" }Response 200{
"credits_remaining": 48200,
"credits_used": 1800,
"enhanced_enabled": false
}Errors
All errors return { "error": "...", "code": "..." }.
| Status | Code | Description |
|---|---|---|
| 403 | INVALID_KEY | API key missing or not recognised. |
| 403 | INSUFFICIENT_CREDITS | Account balance too low. |
| 403 | ENHANCED_NOT_ENABLED | Enhanced depth not enabled for this account. |
| 413 | PAYLOAD_TOO_LARGE | Text exceeds maximum size. |
| 422 | MISSING_FIELD | Required field missing or invalid. |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests. Retry after a short delay. |
| 500 | SERVER_ERROR | Unexpected error. Safe to retry with backoff. |