Rewrite

Rewrite text

Rewrites a draft so it reads more like a person wrote it, toward a writer's measured habits when you pass a voice. Numbers with units, dates, links and preserve strings are checked in code against the output, and a model review checks names, quotes, qualifiers and claims. By default a changed fact is flagged in fidelity.changed_facts and the rewrite is still returned. Under strict fidelity it fails the job instead of shipping. Runs as an asynchronous job by default: you get a Job (202) right away and the Rewrite below arrives as the job's result, by webhook or GET /jobs/{job_id}.

POST

Billing. Billed on input words: 1 word per input word, or 1.5 under strict fidelity, rounded up. Strict fidelity failures and failed jobs are not billed. Test keys are never billed. Credits & pricing

Body

application/json
textstringrequired

Source text, 20 to 25,000 words. Line endings are normalized to \n and outer whitespace trimmed; offsets in the response refer to that text.

voice_idstring

A ready voice profile created with POST /voices, in the same mode (test or live) as the key. Omit to use the neutral house voice.

platformenumdefault: generic

Formatting rules for where the text will be published. x, linkedin, email and thread drop headings; posts under 400 words lose sub-headings; thread returns posts[] split at lines containing only ---. Platforms do not enforce character limits or add hashtags, hooks or subject lines.

Available options:blogxthreadlinkedinemailgeneric
strengthenumdefault: standard

light edits wording only and keeps the draft's plan. standard rewrites from the draft's facts with a new plan, then rewrites each piece with our humanizer model. deep does the same with more rewrites per piece (Pro API and Ultra API; 403 permission_denied on Basic API).

Available options:lightstandarddeep
fidelityenumdefault: standard

standard (the default) always returns the rewrite. If a protected fact changes, fidelity.status is warn and every change is listed in changed_facts next to the original. strict fails the job (422 fidelity_failed, not billed) if any protected fact changes. A successful strict rewrite uses 1.5 words of allowance per input word, rounded up, because it runs extra repairs and checks. Use strict for pipelines that publish without a person reading every line.

Available options:standardstrict
preservestring[]

Up to 200 exact strings that must appear unchanged (product names, quotes, prices). Each must occur in text, or the request fails with 400.

return_diffbooleandefault: false

Include a word-level diff between your text and the rewrite (same as include=diff).

includestring[]

Extras to add to the result. trace: stage-by-stage timeline with timings. spans: character offsets of every checked fact in your text and in the rewrite. signals_detail: the full before and after detections (per-sentence scores with signal labels and plain-language reasons, structure patterns). diff: same as return_diff. voice_match: accepted for compatibility; voice_match is always returned when voice_id is set. Without include you still get text, settings, summary, the fact check, before/after scores with per-detector scores, usage and structure.

Available options:tracespanssignals_detaildiffvoice_match
asyncbooleandefault: true

Default. Returns a Job immediately (202); the result arrives by webhook or GET /jobs/{job_id}. Set false to wait on the open connection for up to 120 seconds; if the job is not done by then you get the 202 Job instead.

webhook_urlstring

Public https URL called with the signed job.succeeded or job.failed event. Recommended for production.

Response

Rewrite object: the job's result (200 when async=false)
idstring

Rewrite id, rw_…

object"rewrite"

Always "rewrite".

modelstring

Rewrite pipeline version. Ends in -test for test keys (deterministic clean-up and simulated scores, no models).

duration_msinteger

Processing time, milliseconds (excludes time queued).

textstring | null

The rewritten text (Markdown headings kept where the platform allows them). Null when strict fidelity failed.

postsstring[] (optional)

platform=thread only: the rewrite split into posts at lines containing only ---.

settingsobject

The settings this rewrite ran with: your request with defaults filled in.

summaryobject

The headline numbers in one flat object, for agents and dashboards. Every value also appears in the detailed fields.

fidelityobject

The fact check: every protected fact, what changed, and the model review of meaning.

signalsobject

Detect scores before and after, from the same detectors as POST /detect. Our own detectors; other tools (GPTZero, Turnitin) can disagree.

usageobject

Word counts and billing for this rewrite.

diffobject[] (optional)

Word-level diff from your text to the rewrite. Only with return_diff=true or include=diff.

voice_matchobject (optional)

How closely the rewrite matches the voice profile. Returned whenever voice_id is set.

traceobject[] (optional)

Stage-by-stage timeline with timings and counts. Only with include=trace.

structureobject (optional)

How far the rewrite moved from the draft's plan, which paraphrase checks look for. Advisory: it never fails a job.

Errors