All API requests (except /health) require authentication using an API key passed as a Bearer token in the Authorization header.
Get your API key
You can generate and manage your API keys from the AiQL Dashboard.
Making authenticated requests
Include your API key in the Authorization header with the Bearer scheme:
curl https://api.aiql.io/workspaces \
-H "Authorization: Bearer YOUR_API_KEY"
Replace YOUR_API_KEY with your actual API key from the dashboard.
All ingestion and query requests require the AiQL-Workspace header containing your workspace ID. This tells the API which workspace to operate on.
curl https://api.aiql.io/ingestions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "AiQL-Workspace: YOUR_WORKSPACE_ID"
Replace YOUR_WORKSPACE_ID with your workspace ID from the dashboard. You can get your workspace ID by listing workspaces or from the dashboard URL.
Example request
Here’s a complete example of creating a workspace:
curl -X POST https://api.aiql.io/workspaces \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Public endpoints
The /health endpoint does not require authentication and can be accessed without an API key:
curl https://api.aiql.io/health
Keep your API keys secure and never commit them to version control. If you believe your API key has been compromised, regenerate it immediately from the dashboard.