{"uid":"cap_hI7Hh-DYthynGlvNQ-EB4","slug":"x402-deployer-x402-deployer-workers-dev-9b72d74f","name":"Semantic Text Chunker / RAG Chunker","description":"Semantic chunker / text splitter / RAG chunker / chunking with overlap / sentence + paragraph aware. Splits long text into chunks with three modes: 'fixed' (hard char-count windows with overlap), 'sentence' (greedy pack of sentences up to chunk_size), 'paragraph' (split on blank lines, never pack across paragraphs). Returns each chunk's text, start/end character offsets, and char count. Pure local — no upstream call.","url":"https://x402-deployer.x402-deployer.workers.dev/semantic-chunk","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["text"],"properties":{"mode":{"enum":["fixed","sentence","paragraph"],"type":"string","description":"Splitting strategy. Default 'fixed'."},"text":{"type":"string","description":"Text to split. Up to 1,000,000 chars."},"overlap":{"type":"number","description":"Overlap between chunks in characters. Default 50. Capped at chunk_size - 1."},"chunk_size":{"type":"number","description":"Target chunk size in characters. Range [50, 20000]. Default 500."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"mode":{"type":"string"},"chunks":{"type":"array","items":{"type":"object","properties":{"end":{"type":"integer"},"text":{"type":"string"},"start":{"type":"integer"},"char_count":{"type":"integer"}}}},"source":{"type":"string"},"overlap":{"type":"integer"},"chunk_size":{"type":"integer"},"text_chars":{"type":"integer"},"chunk_count":{"type":"integer"}}}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"mode":"sentence","text":"Artificial intelligence is transforming industries worldwide. Machine learning models are becoming increasingly sophisticated. Natural language processing enables computers to understand human communication. Deep learning networks power modern computer vision systems. These technologies are reshaping how businesses operate and compete.","overlap":50,"chunk_size":500},"type":"http","method":"POST","bodyType":"json"}},"response":{"mode":"sentence","chunks":[{"end":337,"text":"Artificial intelligence is transforming industries worldwide. Machine learning models are becoming increasingly sophisticated. Natural language processing enables computers to understand human communication. Deep learning networks power modern computer vision systems. These technologies are reshaping how businesses operate and compete.","start":0,"char_count":337}],"source":"DIY (pure local)","overlap":50,"chunk_size":500,"text_chars":337,"chunk_count":1}},"exampleRequest":{"mode":"sentence","text":"Artificial intelligence is transforming industries worldwide. Machine learning models are becoming increasingly sophisticated. Natural language processing enables computers to understand human communication. Deep learning networks power modern computer vision systems. These technologies are reshaping how businesses operate and compete.","overlap":50,"chunk_size":500},"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__p8VKbh7xWRRZkses16h6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Splits long text into chunks using fixed, sentence-aware, or paragraph-aware modes, returning each chunk's text, character offsets, and size.","exampleAgentPrompt":"Split this 10,000-word article into sentence-aware chunks of 500 characters each so I can embed them for my RAG pipeline: [article text here].","exampleUseCases":null,"resultDescription":"An array of chunk objects, each containing the chunk text, its start and end character offsets within the original input, and the character count of that chunk. Three chunking modes are available: fixed (hard character windows with configurable overlap), sentence (greedy sentence packing up to chunk_size), and paragraph (split on blank lines without cross-paragraph packing).","failureModes":["Empty or missing text body returns an error","Invalid mode value returns a validation error","chunk_size too small for sentence mode may produce single-sentence chunks larger than requested","Very large text inputs may hit Cloudflare Worker memory or time limits"],"whenToPreferThis":"Use this endpoint when you need to preprocess long documents for vector embedding or RAG pipelines and want control over chunking strategy (fixed windows, sentence-aware greedy packing, or paragraph boundaries). It runs purely locally with no upstream AI calls, making it fast, deterministic, and cheap. Prefer it over regex-based client-side splitting when you need accurate character offsets and sentence/paragraph awareness.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:41:00.195Z","isFirstParty":false}