POST
text
fix_line_endings
1 creditNormalize all line endings in text to a consistent style (Unix LF or Windows CRLF).
Endpoint
POST /api/v1/tools/text/fix_line_endings
Body Parameters
text
string
required
target
string
optional
default: "lf"
Options:
lf
crlf
Example
input
Request
{
"text": "line1\r\nline2\r\nline3",
"target": "lf"
}
output
Response
"line1\nline2\nline3"
Response Format
HTTP/1.1 200 OK
SUCCESS
{
"success": true,
"data": "line1\nline2\nline3",
"meta": {
"tool": "fix_line_endings",
"credits_consumed": 1
}
}
HTTP/1.1 422 Unprocessable Entity
ERROR
{
"success": false,
"data": null,
"error": {
"code": "validation_error",
"message": "The given data was invalid."
}
}
Sign in to try this tool directly from the docs.
Code Examples
Request Example
lightbulb
Developer Tip
Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.