Text
Number lines API
Prefixes each line with a right-aligned line number and a custom separator. Answers 'how do I add line numbers to this text?', 'how do I produce a numbered listing?'.
Price$0.01per request
MethodPOST
Route/v1/text/line-numbering
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
textline-numbersnumberinglistingformattingcodeannotategutter
API URL
Integration docshttps://x402.hexl.dev/v1/text/line-numberingExample request
{
"text": "alpha\nbeta\ngamma"
}Example response
{
"result": "1 | alpha\n2 | beta\n3 | gamma",
"lineCount": 3
}Input schema
{
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"examples": [
"alpha\nbeta\ngamma"
]
},
"start": {
"type": "integer",
"examples": [
1
]
},
"separator": {
"type": "string",
"examples": [
" | "
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}