Segment sentences
POST /v1/text/segmentations
Semantic sentence segmentation over a JSON body. Supply plain text or timed segments[]; the desktop gateway also accepts file, a server-local exported Transcript JSON path, while Headless requires inline content. Setting paragraph_threshold switches to paragraph mode, where each returned item is a paragraph and the top-level text joins paragraphs with a blank line. This endpoint always segments and does not accept semantic_sentence_enabled.
Guide and examplesText processingLocal Gateway APIAll endpoints
Request body
application/jsonRequired
textstringPlain text input. Paragraph mode requires this form.segmentsobject[]Timed input; timestamps and speakers can be preserved.idintegerSequential index of the segment within the result.startnumberSegment start in seconds.endnumberSegment end in seconds.textstringSegment text.speakerstring | nullSpeaker label, or null when no speaker was assigned.wordsobject[]Word timings. Present only when word timestamps were requested.filestringDesktop gateway only: absolute path to an exported Transcript JSON on the service host. Headless rejects it.thresholdnumberSentence threshold.paragraph_thresholdnumberEnables native model paragraph boundaries. Must be at least threshold. Omit for sentence mode.min_charsintegerDefault length 12. Length constraints are off by default; supplying a length field enables them.max_charsintegerDefault length 42.start_marginnumberSeconds; default margin 0.2.end_marginnumberSeconds; default margin 0.2.optionsobjectparagraph_threshold and the length or margin fields may also be supplied here; a matching top-level field takes precedence.Responses
200Segmented text. Plain text input has no timestamps or speakers.taskstringtextstringIn paragraph mode this joins paragraphs with a blank line.segmentsobject[]idintegerSequential index of the segment within the result.startnumberSegment start in seconds.endnumberSegment end in seconds.textstringSegment text.speakerstring | nullSpeaker label, or null when no speaker was assigned.wordsobject[]Word timings. Present only when word timestamps were requested.{
"task": "segment",
"text": "Hello world. Let us begin.",
"segments": [
{
"text": "Hello world."
},
{
"text": "Let us begin."
}
]
}400Invalid request. Fix the request before retrying; use error.code for program logic and error.param to locate the input.401Invalid or missing API key.403Host or origin is not allowed, or the license was rejected. Inspect error.code to tell them apart.503A required local model is still being prepared (model_downloading) or the service is busy (service_busy). Honor Retry-After when present.