---
title: "POST /v1/request/count/query"
method: POST
path: "/v1/request/count/query"
tags: ["Request"]
---

# POST /v1/request/count/query

`POST /v1/request/count/query`

## Request body

- RequestQueryParams
  - `filter` union, required
    - FilterLeafSubsetFeedbackOrRequestOrResponseOrPropertiesOrValuesOrRequestResponseRmtOrSessionsRequestResponseRmt — From T, pick a set of properties whose keys are in the union K
      - `values` object
      - `response` PartialResponseTableToOperators — Make all properties in T optional
        - `body_tokens` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `body_model` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `body_completion` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `status` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `model` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
      - `request` PartialRequestTableToOperators — Make all properties in T optional
        - `prompt` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `created_at` PartialTimestampOperators — Make all properties in T optional
          - `equals` string
          - `gte` string
          - `lte` string
          - `lt` string
          - `gt` string
        - `user_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `auth_hash` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `org_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `node_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `model` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `modelOverride` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `path` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `country_code` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `prompt_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
      - `feedback` PartialFeedbackTableToOperators — Make all properties in T optional
        - `id` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `created_at` PartialTimestampOperators — Make all properties in T optional
          - `equals` string
          - `gte` string
          - `lte` string
          - `lt` string
          - `gt` string
        - `rating` PartialBooleanOperators — Make all properties in T optional
          - `equals` boolean
        - `response_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
      - `request_response_rmt` PartialRequestResponseRMTToOperators — Make all properties in T optional
        - `country_code` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `latency` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `cost` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `provider` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `time_to_first_token` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `status` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `request_created_at` PartialTimestampOperatorsTyped — Make all properties in T optional
          - `equals` string, date-time
          - `gte` string, date-time
          - `lte` string, date-time
          - `lt` string, date-time
          - `gt` string, date-time
        - `response_created_at` PartialTimestampOperatorsTyped — Make all properties in T optional
          - `equals` string, date-time
          - `gte` string, date-time
          - `lte` string, date-time
          - `lt` string, date-time
          - `gt` string, date-time
        - `model` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `user_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `organization_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `node_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `job_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `threat` PartialBooleanOperators — Make all properties in T optional
          - `equals` boolean
        - `request_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `prompt_tokens` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `completion_tokens` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `prompt_cache_read_tokens` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `prompt_cache_write_tokens` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `total_tokens` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `target_url` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `property_key` object
          - `equals` string, required
        - `properties` object
        - `search_properties` object
        - `scores` object
        - `scores_column` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `request_body` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `response_body` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `cache_enabled` PartialBooleanOperators — Make all properties in T optional
          - `equals` boolean
        - `cache_reference_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `cached` PartialBooleanOperators — Make all properties in T optional
          - `equals` boolean
        - `assets` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `helicone-score-feedback` PartialBooleanOperators — Make all properties in T optional
          - `equals` boolean
        - `prompt_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `prompt_version` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `request_referrer` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `is_passthrough_billing` PartialBooleanOperators — Make all properties in T optional
          - `equals` boolean
      - `sessions_request_response_rmt` PartialSessionsRequestResponseRMTToOperators — Make all properties in T optional
        - `session_session_id` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `session_session_name` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
        - `session_total_cost` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `session_total_tokens` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `session_prompt_tokens` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `session_completion_tokens` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `session_total_requests` PartialNumberOperators — Make all properties in T optional
          - `not-equals` number, double
          - `equals` number, double
          - `gte` number, double
          - `lte` number, double
          - `lt` number, double
          - `gt` number, double
        - `session_created_at` PartialTimestampOperatorsTyped — Make all properties in T optional
          - `equals` string, date-time
          - `gte` string, date-time
          - `lte` string, date-time
          - `lt` string, date-time
          - `gt` string, date-time
        - `session_latest_request_created_at` PartialTimestampOperatorsTyped — Make all properties in T optional
          - `equals` string, date-time
          - `gte` string, date-time
          - `lte` string, date-time
          - `lt` string, date-time
          - `gt` string, date-time
        - `session_tag` PartialTextOperators — Make all properties in T optional
          - `not-equals` string
          - `equals` string
          - `like` string
          - `ilike` string
          - `contains` string
          - `not-contains` string
      - `properties` object
    - RequestFilterBranch
      - `right` RequestFilterNode, required — recursive
      - `operator` 'or' | 'and', required
      - `left` RequestFilterNode, required — recursive
    - 'all'
  - `offset` number, double
  - `limit` number, double
  - `sort` SortLeafRequest
    - `random` true
    - `created_at` 'asc' | 'desc'
    - `cache_created_at` 'asc' | 'desc'
    - `latency` 'asc' | 'desc'
    - `last_active` 'asc' | 'desc'
    - `total_tokens` 'asc' | 'desc'
    - `completion_tokens` 'asc' | 'desc'
    - `prompt_tokens` 'asc' | 'desc'
    - `user_id` 'asc' | 'desc'
    - `body_model` 'asc' | 'desc'
    - `is_cached` 'asc' | 'desc'
    - `request_prompt` 'asc' | 'desc'
    - `response_text` 'asc' | 'desc'
    - `properties` object
    - `values` object
    - `cost` 'asc' | 'desc'
    - `time_to_first_token` 'asc' | 'desc'
  - `isCached` boolean
  - `includeInputs` boolean
  - `isPartOfExperiment` boolean
  - `isScored` boolean

## Response `200`

Ok

- union
  - ResultSuccessNumber
    - `data` number, double, required
    - `error` null, nullable, required
  - ResultErrorString
    - `data` null, nullable, required
    - `error` string, required

---

[API](https://skmtc.net/helicone/apis/helicone-api.md) · [All operations](https://skmtc.net/helicone/apis/helicone-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/helicone/helicone-api/revisions/b369e9e3e80c/schema)
