BiGapiguides
POST /v1/text/chunk · 1 cent per operation

Text → RAG chunks

Split text for embeddings: turn text/Markdown into RAG-ready chunks — token-based sizing, heading-aware boundaries, overlap, heading path and page metadata per chunk. The standard step before a vector DB.

Try it

curl -X POST https://api.bigapi.dev/v1/text/chunk -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"text":"# Doc...","maxTokens":512,"overlap":50}'

New keys come with 100 free operations, no signup: curl -X POST https://api.bigapi.dev/v1/keys. Failed calls cost nothing.

Parameters

NameMeaning
textText or Markdown to split into chunks for embeddings (or upload a file instead).
Default: none, send text or a file
maxTokensChunk size in tokens, 50 to 8000. 512 suits most embedding models; use the limit of your model if it is smaller.
Default: 512
overlapTokens repeated at the start of the next chunk so no sentence loses its context; at most half of maxTokens.
Default: 0
splitOnheading starts a new chunk at every heading so chunks follow the chapters; paragraph fills chunks paragraph by paragraph up to maxTokens.
Allowed: heading, paragraph
Default: "heading"

Result and price

1¢ · 1 cent per operation

Returns application/json. Response headers carry the cost (X-BigAPI-Cost) and notes about your input (X-BigAPI-Warnings).

From an agent (MCP)

Connect BiGapi as an MCP server: https://api.bigapi.dev/mcp (hosted) or npx -y @bigapi/mcp (local). Then ask in plain words; the agent finds text_chunk on its own.