---
title: "Get organization AI inference usage costs"
method: GET
path: "/v1/organizations/{organizationId}/inferenceUsageCost"
tags: ["Billing"]
---

# Get organization AI inference usage costs

`GET /v1/organizations/{organizationId}/inferenceUsageCost`

## Request

- Base URL: `https://api.clickhouse.cloud`
- URL: `https://api.clickhouse.cloud/v1/organizations/{organizationId}/inferenceUsageCost`
- Auth: HTTP basic

**Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Returns a grand total and a list of daily AI inference usage cost records for the organization in the queried time period (maximum 31 days). There is one record per day, provider and model. Each record lists the tokens used, the average price and the cost for each metric, such as input, output, cache read and each cache write duration. All costs are at list price. All days in both the request and the response are evaluated based on the UTC timezone.

## Path parameters

- `organizationId` string, uuid, required

## Query parameters

- `from_date` string, date, required
- `to_date` string, date, required

## Response `200`

Successful response

- object
  - `status` number: HTTP status code.
  - `requestId` string, uuid: Unique id assigned to every request. UUIDv4
  - `result` InferenceUsageCost
    - `grandTotalCHC` number: Grand total cost of AI inference usage in ClickHouse Credits (CHCs).
    - `costs` InferenceUsageCostRecord[]: List of AI inference usage cost records, one per day, provider and model. Empty when the organization has no usage.
      - `date` string, date: Date of the usage. ISO-8601 date, based on the UTC timezone.
      - `provider` string: Provider of the model.
      - `model` string: ID of the model. This is the raw model ID; `modelName` has the display name.
      - `modelName` string: Display name of the model, as the usage page and the usage statement CSV show it.
      - `metrics` InferenceUsageCostMetric[]: Usage and cost for each metric that has usage. The costs add up to `totalCHC`.
        - `metric` string: Name of the metric: `input`, `output`, `cache_read`, `cache_write_5m`, `cache_write_30m` or `cache_write_1h`. New values can appear.
        - `tokensMillions` number: Number of tokens used, in millions. For example, 1.5 means 1,500,000 tokens.
        - `pricePerMillionTokensCHC` number: Average price per million tokens in ClickHouse Credits (CHCs): `totalCHC` divided by `tokensMillions`. It is an average because one model can have more than one price. Zero when no tokens were used.
        - `totalCHC` number: Cost of the tokens used in ClickHouse Credits (CHCs).
      - `totalCHC` number: Total cost of usage in ClickHouse Credits (CHCs) for this model on this date.
      - `locked` boolean: When true, the record is immutable. Unlocked records are subject to change until locked.

## Other responses

- `400`: The request cannot be processed due to a client error. Please verify your request parameters and try again.
- `500`: An internal server error has occurred. If this issue persists, please contact ClickHouse Cloud support for assistance.

## Changes

- **2026-11-20** `8c4f8f52b600`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/changes/v1/organizations/:organizationId/inferenceUsageCost/get.md)

---

[API](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud.md) - [All operations](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/revisions/eac345053548?raw)
