Get organization AI inference usage costs
Changed onDisclaimer: 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.
Request
- Base URLhttps://api.clickhouse.cloud
- AuthHTTP basic
Path parameters
ID of the requested organization.
Query parameters
Start date for the report, e.g. 2024-12-19.
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
HTTP status code.
Unique id assigned to every request. UUIDv4
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
- info
endpoint added
- info