{"uid":"cap_QlbZOtcCE1b_XcMTYfyHm","slug":"vextorium-text-chunker-trocear-texto-fdd8576a","name":"Vextorium Text Chunker (trocear-texto)","description":"Split long text into overlapping chunks for RAG and embeddings, by characters, words or estimated tokens, keeping sentences or paragraphs whole, with each chunk's position and size.","url":"https://api.vextorium.com/trocear-texto-pago?utm_source=zero.xyz","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":["texto"],"properties":{"texto":{"type":"string","description":"Text (up to 2,000,000 characters)"},"solape":{"type":"integer","description":"Overlap (default 100)"},"tamano":{"type":"integer","description":"Chunk size (50-100000, default 1000)"},"unidad":{"enum":["caracteres","palabras","tokens"],"type":"string"},"respetar":{"enum":["frases","parrafos","palabras"],"type":"string"}}},"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","null"],"properties":{"nota":{"type":["string","null"]},"solape":{"type":["number","null"]},"tamano":{"type":["number","null"]},"trozos":{"type":["array","null"],"items":{"type":["null","object"],"properties":{"texto":{"type":["null","string"]},"indice":{"type":["null","number"]},"inicio":{"type":["null","number"]},"palabras":{"type":["null","number"]},"caracteres":{"type":["null","number"]},"tokens_estimados":{"type":["null","number"]}}}},"unidad":{"type":["string","null"]},"respetar":{"type":["string","null"]},"fragmentos":{"type":["number","null"]},"caracteres_totales":{"type":["number","null"]}}}}}}},"responseSchema":{"type":"json","example":{"nota":"Tokens estimados (~4 caracteres por token); el valor exacto depende del modelo.","solape":20,"tamano":80,"trozos":[{"texto":"First sentence of the document. Second sentence with more detail.","indice":0,"inicio":0,"palabras":10,"caracteres":65,"tokens_estimados":16},{"texto":"Third sentence closes the idea. A new paragraph starts here.","indice":1,"inicio":66,"palabras":10,"caracteres":60,"tokens_estimados":15},{"texto":"It keeps going for a while.","indice":2,"inicio":127,"palabras":6,"caracteres":27,"tokens_estimados":7}],"unidad":"caracteres","respetar":"frases","fragmentos":3,"caracteres_totales":154}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8owe58Ryf1Dsa5m0c909Q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","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 overlapping chunks for RAG pipelines and embedding workflows, supporting character, word, or token-based splitting while respecting sentence or paragraph boundaries.","exampleAgentPrompt":"Split this 50,000-word article into chunks of 1000 characters with a 100-character overlap, keeping sentences whole, and tell me each chunk's position and estimated token count.","exampleUseCases":[{"title":"RAG pipeline document ingestion","prompt":"I need to prepare this legal contract for my RAG system — chunk it into 800-character pieces with 150-character overlap, respecting sentence boundaries, so I can embed each chunk separately."},{"title":"Token-aware splitting for LLM context","prompt":"Break this research paper into token-based chunks of 512 tokens each with a 50-token overlap, keeping paragraphs whole, so I can feed them into my embedding model without cutting mid-paragraph."},{"title":"Word-count chunking for semantic search","prompt":"Chunk this 200,000-character book transcript into 500-word segments with 80-word overlap, splitting by words and respecting sentence boundaries, and give me the start position of each chunk."}],"resultDescription":"Returns a JSON object with an array of chunk objects, each containing the chunk text, its index, start character position, word count, character count, and estimated token count. Also returns the total character count, number of fragments, configured chunk size, overlap, and the unit and boundary mode used.","failureModes":["Text exceeds 2,000,000 character limit — request rejected","Chunk size outside 50–100,000 range — validation error","Missing required 'texto' field — 400 bad request","Invalid enum value for 'unidad' or 'respetar' — schema validation error","Empty text input — may return zero chunks or error"],"whenToPreferThis":"Choose this endpoint when you need structured, position-aware text chunking with metadata (character counts, word counts, estimated token counts, start positions) for RAG or embedding pipelines. It is especially useful when boundary-respecting chunking (sentence or paragraph level) is required and when overlap control is needed. Prefer over manual splitting when you need token estimation or multi-unit flexibility (characters, words, tokens) in a single API call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-09T12:40:57.171Z","isFirstParty":false,"canonicalSlug":"vextorium-text-chunker-trocear-texto-fdd8576a"}