POST
/
v1
/
request
/
query-clickhouse
curl --request POST \
  --url https://api.helicone.ai/v1/request/query-clickhouse \
  --header 'Content-Type: application/json' \
  --header 'authorization: <api-key>' \
  --data '{
  "filter": "all",
  "isCached": false,
  "limit": 100,
  "offset": 0,
  "sort": {
    "created_at": "desc"
  },
  "includeInputs": false,
  "isScored": false,
  "isPartOfExperiment": false
}'
{
  "filter": "all",
  "isCached": false,
  "limit": 10,
  "offset": 0,
  "sort": {
    "created_at": "desc"
  },
  "isScored": false,
  "isPartOfExperiment": false
}

For users in the European Union: Please use eu.api.helicone.ai instead of api.helicone.ai to ensure compliance with data residency requirements and optimal performance.

The following API is the same as the Get Requests API, but it is optimized for speed when querying large amount of data. This endpoint will timeout for point queries and is really slow when querying just a few requests.

The following API lets you get all of the requests that would be visible in the request table at helicone.ai/requests.

Premade examples 👇

FilterDescription
Get Request by UserGet all the requests made by a user

Filter

A filter is either a FilterLeaf or a FilterBranch, and can be composed of multiple filters generating an AST of ANDs/ORs.

Here is how it is represented in typescript:

export interface FilterBranch {
  left: FilterNode;
  operator: "or" | "and"; // Can add more later
  right: FilterNode;
}

export type FilterNode = FilterLeaf | FilterBranch | "all";

This allows us to build complex filters like this:

{
  "filter": {
    "operator": "and",
    "right": {
      "request_response_rmt": {
        "model": {
          "contains": "gpt-4"
        }
      }
    },
    "left": {
      "request_response_rmt": {
        "user_id": {
          "equals": "abc@email.com"
        }
      }
    }
  }
}

Authorizations

authorization
string
header
required

Body

application/json
Request query filters

Request query filters

filter
required

From T, pick a set of properties whose keys are in the union K

offset
number
limit
number
sort
object
isCached
boolean
includeInputs
boolean
isPartOfExperiment
boolean
isScored
boolean

Response

200 - application/json
Ok
data
object[]
required
error
enum<number> | null
required