Billing

Get organization AI inference usage costs

Changed on

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.

get/v1/organizations/{organizationId}/inferenceUsageCost

Request

  • Base URL
    https://api.clickhouse.cloud
  • Auth
    HTTP basic

Path parameters

organizationId, string uuid required

ID of the requested organization.

Query parameters

from_date, string date required
Example:2024-12-19

Start date for the report, e.g. 2024-12-19.

to_date, string date required
Example:2024-12-20

End date (inclusive) for the report, e.g. 2024-12-20. This date cannot be more than 30 days after from_date (for a maximum queried period of 31 days).

Response

Successful response

object required
status, number

HTTP status code.

requestId, string uuid

Unique id assigned to every request. UUIDv4

result, InferenceUsageCost

Example response

{
  "status": 200,
  "result": {
    "costs": [
      {
        "date": "2026-10-01",
        "provider": "anthropic",
        "model": "claude-opus-4-8",
        "modelName": "Claude Opus 4.8",
        "metrics": [
          {
            "metric": "cache_write_5m"
          }
        ]
      }
    ]
  }
}

Changes