HQL is currently available to selected workspaces. If you don’t see the HQL page in your dashboard, click “Request Access” from the HQL screen or contact support.
What you can query
- request_created_at: timestamp of the request
- request_model: model name used (e.g.
gpt-4o) - status: HTTP status code
- user_id: your application user identifier (if provided)
- cost / provider_total_cost: cost metrics
- prompt_tokens, completion_tokens, total_tokens: token usage
- properties: custom properties map (e.g.
properties['Helicone-Session-Id'])
Examples
Top costly requests (last 7 days)
Error rate (last 24 hours)
Active users by day (last 14 days)
Session analysis using custom properties
Cost by model (last 30 days)
How to use HQL
In the Dashboard
- Go to
HQLin the sidebar - Browse tables and columns in the left panel
- Write your SQL in the editor
- Press Cmd/Ctrl+Enter to run; Cmd/Ctrl+S to save as a query
Via REST API
The HQL REST API allows you to execute SQL queries programmatically. All endpoints require authentication via API key.Authentication
Include your API key in theAuthorization header:
Execute a Query
Endpoint:POST https://api.helicone.ai/v1/helicone-sql/execute
Get Schema
Endpoint:GET https://api.helicone.ai/v1/helicone-sql/schema
Returns available tables and columns for querying.
Download Results as CSV
Endpoint:POST https://api.helicone.ai/v1/helicone-sql/download
Executes a query and returns a signed URL to download the results as CSV.
Saved Queries
You can also manage saved queries programmatically:GET /v1/helicone-sql/saved-queries- List all saved queriesPOST /v1/helicone-sql/saved-query- Create a new saved queryGET /v1/helicone-sql/saved-query/{queryId}- Get a specific saved queryPUT /v1/helicone-sql/saved-query/{queryId}- Update a saved queryDELETE /v1/helicone-sql/saved-query/{queryId}- Delete a saved query
API Limits
- Query limit: 300,000 rows maximum per query
- Timeout: 30 seconds per query
- Rate limits: 100 queries/min, 10 CSV downloads/min
Related
Custom Properties
Enrich requests to make querying easier and more powerful
Reports
Build saved charts on top of your data
Sessions
Analyze multi‑turn conversations with session identifiers
Datasets
Export curated data for fine‑tuning and evaluation