Transform Text
POST /api/creative/hawken/transform
POST
/api/creative/hawken/transform
Return a deterministic analytical report for the selection.
Post-M5 this endpoint no longer rewrites prose. It dispatches on
the command label to the Divinity Engine’s analytical surfaces
(sentence metrics, sentiment, register) and streams a human-
readable diagnosis back. The response shape stays
text/plain so existing editor callers keep working.
Request Body required
Section titled “Request Body required ” TransformRequest
Request body for /transform.
object
selectedText
required
Selectedtext
string
command
required
TransformCommand
Available command labels. Preserved from the pre-M5 contract so existing callers bind to the same enum values; post-M5 every value dispatches to a deterministic analytical surface instead of a rewrite.
string
contextBefore
Contextbefore
string
contextAfter
Contextafter
string
Responses
Section titled “ Responses ”Successful Response
Validation Error
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context