Prerequisites
- Node.js 18 or later
- An AiQL API key from the Dashboard
Install
Authenticate
Create a client with your API key. Read the key from an environment variable instead of hardcoding it.workspaceId on the client to send it as the AiQL-Workspace header on every workspace-scoped call.
Workspaces
Ingestions
Queries
Sources
Tools
Error handling
The SDK throwsAiqlError for failed requests. Inspect status and detail to handle specific cases.