test_framework

Get monthly usage and credits per billable unit

Changed on

Returns an organization's usage per billable unit (voice and text simulations, monitored calls, metric evaluations, triage, insights, Labs and AI metric building) with the credits billed for each, one column per calendar month (UTC) plus a total. The range may span at most 12 months. Each row's values maps a month (YYYY-MM) to a number; other_credits covers any remaining billed item and refunds are a negative row, so credit rows sum to total_credits. With an organization-scoped API key the organization comes from the key; with a user session pass organization_id (organization admins only). Pass format=csv to download the same table as CSV. Results may lag usage by up to 30 minutes.

get/test_framework/billing/unit-usage-report/

Request

  • Base URL
    https://api.cekura.ai
  • URL
    https://api.cekura.ai/test_framework/billing/unit-usage-report/
  • Auth
    • API key in header X-CEKURA-API-KEY
    • or HTTP bearer
    • or HTTP bearer

Query parameters

format'csv' | 'json'

Response format. Default: json.

organization_idinteger

Organization ID. Required for user sessions; ignored for organization-scoped API keys.

start_datestring date required

First day of the range (YYYY-MM-DD), inclusive.

end_datestring date required

Last day of the range (YYYY-MM-DD), inclusive. At most 12 calendar months after start_date.

group_by'month'

Period to group by. Default: month.

Response

organization_idinteger required
start_datestring date required
end_datestring date required
group_bystring required
timezonestring required

Timezone of the month boundaries (UTC).

untyped_schemeboolean required

True when the organization's charges in this range weren't recorded per unit; per-unit credit rows are then null and only counts and totals apply.

old_text_pricingboolean required

True when text simulations are billed at a flat rate, so #Responses is null.

periodsstring[] required

Month keys (YYYY-MM) in order.

Changes