{"uid":"cap_4U99mLJTVKQTg30Rb1pmV","slug":"agenttools-text-chunker-003b29ba","name":"AgentTools Text Chunker","description":"Split text into retrieval-friendly chunks with a token budget and sentence-aware boundaries. Overlap between consecutive chunks preserves context across splits — the standard preparation step before embedding. Use this when an agent needs to rAG-ready chunks with token budgets and overlap.","url":"https://agentstoolshub.com/api/v1/dev/text-chunker?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Text"},"targetTokens":{"type":"number","description":"Target tokens per chunk"},"overlapTokens":{"type":"number","description":"Overlap tokens"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LIwcEaC-Y1Uq5WPA-N6in","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Splits raw text into token-budget-aware, sentence-boundary-respecting chunks with configurable overlap for RAG pipeline preparation.","exampleAgentPrompt":"Can you chunk this article into segments of about 256 tokens each, with 32 tokens of overlap between chunks, so I can embed them for a RAG pipeline?","exampleUseCases":[{"title":"Indexing research papers into vector store","prompt":"I have this long research paper — can you split it into 512-token chunks with 64 tokens of overlap so I can embed and store each chunk in my vector database?"},{"title":"Preparing customer support docs for semantic search","prompt":"Take this customer support documentation and break it into 200-token retrieval-friendly chunks with 20 tokens of overlap between each one, so users can find answers with semantic search."},{"title":"Chunking book chapters for LLM Q&A","prompt":"I want to answer questions about this book chapter — can you chunk it into 300-token segments with 50 tokens of overlap so I can feed the most relevant pieces into my LLM as context?"}],"resultDescription":"Returns an array of text chunks derived from the input, each respecting sentence boundaries and staying within the specified token budget. Consecutive chunks share an overlapping token window to preserve context across splits. Likely includes chunk index, token count per chunk, and the chunk text itself.","failureModes":["Missing required 'text' query parameter returns 400 error","Extremely short text with a large token target may return a single unsplit chunk","Non-numeric values for targetTokens or overlapTokens cause validation errors","Very large input text may hit request size limits","Overlap value equal to or greater than targetTokens may cause infinite or degenerate chunking"],"whenToPreferThis":"Choose this endpoint when you need deterministic, sentence-aware text chunking with precise token budgets and configurable overlap — especially as a preprocessing step before embedding or vector store ingestion. Prefer this over naive character-splitting when context continuity across chunks matters, or when you need to respect token limits of embedding models without cutting mid-sentence.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:50:50.531Z","isFirstParty":false,"canonicalSlug":"agenttools-text-chunker-003b29ba"}