The split tool breaks converted text into smaller chunks. Chunking keeps each piece small enough for the shape and extract steps to process reliably.

Prerequisites

  • An AiQL API key in the AIQL_API_KEY environment variable
  • Converted text from the Convert step

Split converted text

Send the text to split and set a maximum chunk size. Tool requests authenticate with a Bearer token and do not need a workspace.
curl -X POST https://api.aiql.io/split \
  -H "Authorization: Bearer $AIQL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "The full converted document text...", "max_words": 500}'
The response is an ordered list of chunks. Smaller chunks isolate context more tightly; larger chunks keep related content together.

Next step

Pass the chunks to Shape to infer the schema of the data.
split is billed at 1 credit per 1,000 words of converted text, with a minimum of 1 credit. See Pricing for details.