Docs/Text Utils/GET /v1/chunk-text

GET /v1/chunk-textSplit text into chunks by word/char/sentence/paragraph

Text Utils lf-text-utils

Cuts long text into smaller pieces by words, characters, sentences or paragraphs. Split text into chunks by word/char/sentence/paragraph

Query Parameters

ParameterTypeRequiredDescription
textstringYesText to split
max_chunk_sizeintegerNoMax chunk size
overlapintegerNoOverlap size
modestringNoword, char, sentence, or paragraph

Response Schema

chunks (array): Array of text chunks
total_chunks (integer): Number of chunks
mode (string): Split mode

cURL Example

curl 'https://lf-text-utils.laminarforge.dev/v1/chunk-text?text=<text>' -H 'Authorization: Bearer lf_YourApiKey'

Python Example

import requests
url = 'https://lf-text-utils.laminarforge.dev/v1/chunk-text'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'text': '<text>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())