The convert tool is the first step of the pipeline. It takes a source document and normalizes it into clean, machine-readable text and pages that the other tools can process.

Prerequisites

  • An AiQL API key in the AIQL_API_KEY environment variable
  • A source document AiQL can reach (a URL or storage path)

Convert a source document

Send the location of your document as source. Tool requests authenticate with a Bearer token and do not need a workspace.
curl -X POST https://api.aiql.io/convert \
  -H "Authorization: Bearer $AIQL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source": "https://example.com/report.pdf"}'
The response contains the normalized text along with the page count, which is what later steps and billing operate on.

Next step

Pass the converted text to Split to break it into smaller chunks.
convert is billed at 5 credits per page, counted after the source document is normalized, with a minimum of 1 credit. See Pricing for details.