Prerequisites
- An AiQL API key in the
AIQL_API_KEYenvironment variable - A workspace ID with a finished ingestion (see Run a full ingestion)
Create a query
Send your request ascontent and pass the workspace ID in the AiQL-Workspace header. The query is created with status PENDING and begins processing immediately.
status field that starts at PENDING:
Poll for completion
Queries are processed asynchronously. Poll the query by ID to check its status and retrieve the result when ready.PENDING→ waiting to startPROCESSING→ workflow is runningPROCESSED→ completed, result inoutputfieldFAILED→ workflow failed
List saved queries
Retrieve the queries you have run in a workspace. Results are returned a page at a time — see Pagination for how to page through them.Delete a query
Remove a saved query when you no longer need it. This also cancels the workflow if it’s still running.Queries are billed at 10 credits per 1,000 words, with a minimum of 1 credit per query. Listing, retrieving, and deleting saved queries is free. See Pricing for details.