Endpoint
POST https://requiems.xyz/v1/systems/text/normalize
Normalize Text
Apply a composable pipeline of normalization operations to a string. Trim whitespace, fix encoding, normalize unicode, strip HTML, and more — in a single call.
Parameters
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
text |
string | yes | body | The text to normalize. Required. |
operations |
array | yes | body | Ordered list of normalization operations to apply. At least one required. Valid values: trim, lowercase, uppercase, normalize_unicode, collapse_whitespace, strip_html, remove_punctuation |
Request Example
{
"text": " Hello, World! ",
"operations": ["trim", "lowercase", "collapse_whitespace"]
}
Response Example
{
"data": {
"original": " Hello, World! ",
"normalized": "hello, world!",
"operations": ["trim", "lowercase", "collapse_whitespace"]
},
"metadata": {
"timestamp": "2026-01-01T00:00:00Z"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
original |
string | The input text as provided |
normalized |
string | The text after all operations have been applied in order |
operations |
array | The operations list echoed from the request |
Errors
undefined422 — text is empty or operations array is empty or missingundefined401 — Missing or invalid API key