Skip to main content
GET
CSharp (SDK)

Authorizations

Authorization
string
header
required

Send Authorization: Bearer , using an MKA1 API key for automation or an OAuth API access token for a signed-in application. Use a dynamic security callback to refresh OAuth access tokens. Browser session-only operations still require their declared cookie.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Query Parameters

start_time
integer
required

Window start, epoch seconds (inclusive)

Required range: -9007199254740991 < x <= 9007199254740991
end_time
integer
required

Window end, epoch seconds (exclusive)

Required range: -9007199254740991 < x <= 9007199254740991
group_by
string
default:""

CSV of grouping dimensions: service, task_type, model, api_key_id, team_id, user_id, external_user_id, org_id

org_id
string

Target org (cluster admins only; others may only name their own org; omit for the caller's org, or cluster-wide for cluster admins)

Minimum string length: 1

Response

200 - application/json

OK

currency
string
required
start_time
number
required
end_time
number
required
group_by
string[]
required
data
object[]
required
total_cost
number
required
as_of
integer
required

When these figures were computed, epoch seconds

Required range: -9007199254740991 <= x <= 9007199254740991
settlement_window_seconds
integer
required

Seconds after it occurs that usage becomes final

Required range: -9007199254740991 <= x <= 9007199254740991
final_through
integer
required

Usage before this instant (epoch seconds, as_of minus the settlement window) is final; usage at or after it is provisional

Required range: -9007199254740991 <= x <= 9007199254740991
final
boolean
required

True when the window ends at or before final_through, so every figure in this response is final

unpriced_entries
integer
required

Entries in the window with no cost; they add 0 to total_cost

Required range: -9007199254740991 <= x <= 9007199254740991
late_entries
integer
required

Entries in the window that arrived more than the settlement window after they occurred, after their figure was already final

Required range: -9007199254740991 <= x <= 9007199254740991
late_cost
number
required

Summed cost of late_entries, already included in total_cost