Rewrite text in your voice
You have text that was not written by you: a corporate template, a rate-change announcement, a paragraph from marketing. POST /api/v1/transform rewrites it so it sounds like you, using your stored TrueTone Profile. The request needs the Voice transform Capability Group, which every key can carry; keys minted before Capability Groups existed already have it.
The request
{
"source_text": "Rates moved this week. Here is what that means for your purchase timeline...",
"channel_hint": "email",
"instructions": "Keep it under three short paragraphs.",
"locked_regions": ["NMLS #000000", "Equal Housing Lender"]
}| Field | Required | What it does |
|---|---|---|
source_text | yes | The text to rewrite, up to 50,000 characters |
channel_hint | no | One of email, blog, social, general. Defaults to email. Shapes tone and length for the Channel |
instructions | no | Steering for the rewrite, up to 2,000 characters |
locked_regions | no | Up to 100 exact strings that must survive the rewrite byte for byte. Each must be at least 3 characters and must occur in source_text |
Locked regions are the tool for compliance language, license numbers, legal names, and disclaimers: anything that must come out exactly as it went in.
The response
The endpoint does not stream. You get one settled JSON response when the rewrite is done, typically within the endpoint’s 60 second window:
{
"output": "Big week for rates. If you have been waiting to buy, here is my honest read... NMLS #000000. Equal Housing Lender.",
"profileVersion": "3f9a1c",
"creditsCharged": <credits captured>
}outputis the rewritten text, with every locked region restored exactly.profileVersionidentifies the compiled TrueTone Profile the rewrite used, so you can tell when a change in output came from a profile update.creditsChargedis what the call captured, at the transform rate in the live price table.
Your voice comes only from your stored TrueTone Profile. There is no field for tone or voice traits, and any unknown field you send is ignored rather than obeyed.
When the rewrite cannot be trusted
The transform verifies its own output before you see it. If a locked region was damaged, dropped, duplicated, or moved somewhere unsafe, the endpoint refuses with 422 preservation_failed or 422 placement_failed instead of returning a compromised rewrite, and your credit is released. A refused rewrite is a safety feature, not a billing event; retry it.
Refusals that happen before the model runs cost nothing: naming a locked region that is not in source_text gives 422 locked_region_not_found with the unmatched strings listed, unreadable template syntax gives 422 unbalanced_conditional or 422 unclosed_lock_sentinel, and a document with more protected material than the rewriter will safely handle gives 400 template_too_complex. The full contract is on the Errors page.