{"slug":"api-sitecheck-api-workers-dev-api-text-chunk-f90b48","title":"Split a long text into chunks for retrieval (RAG)","host":"api.sitecheck-api.workers.dev","method":"POST","resource":"https://api.sitecheck-api.workers.dev/api/text/chunk","category":"market","description":"Split a long text into chunks for retrieval (RAG): split on paragraphs, then sentences, then words, each chunk within maxTokens (default 500) with the overlap you ask for (default 50 tokens). Each chunk has its index, text, start and end character offsets and an estimated token count (characters div","price_listed":0.001,"price_asked":0.001,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":25,"reported_calls_30d":2,"reported_payers_30d":2,"networks":["eip155:5042","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"maxTokens":"20","overlap":"5","text":"Alpha beta gamma delta. Epsilon zeta eta theta iota kappa.\n\nLambda mu nu xi omicron pi rho."},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"maxTokens":{"description":"Largest chunk in estimated tokens, 20 to 8000, default 500","type":"string"},"overlap":{"description":"Tokens shared by neighbouring chunks, 0 up to maxTokens minus 1, default 50","type":"string"},"text":{"description":"The text, up to 1 MB (JSON body field)","type":"string"}},"required":["text"]},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-18","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":25,"error":null}],"description_full":"Split a long text into chunks for retrieval (RAG): split on paragraphs, then sentences, then words, each chunk within maxTokens (default 500) with the overlap you ask for (default 50 tokens). Each chunk has its index, text, start and end character offsets and an estimated token count (characters divided by 4, a rough rule for English). Up to 1 MB and 2,000 chunks.","last_updated":"2026-10-15T20:03:18.397Z","schemes":["exact"]}