GET /v1/organization/usage
GET
/v1/organization/usageAuthorization
AuthorizationBearer token · headerrequiredQuery parameters
limitinteger<int64>min 1 · max 200
afterstring<uuid>orderOrderParamNewest first when omitted.
Allowed:
ascdescResponses
200One page, newest recorded first unless order=asc.
itemsUsageEventBody[]requiredShow propertiesHide properties
Array of
UsageEventBodyadjustsstring<uuid> | nullrequiredThe event this one corrects.
costinteger<int64> | nullrequiredHundred-millionths of a credit, as `balance`. Absent for a byok call
or a platform one nothing priced.
idstring<uuid>requiredoccurred_atstring<date-time>requiredrecorded_atstring<date-time>requiredresourceUsageResourceBodyrequiredWhat an event measured; `kind` names the shape.
Show propertiesHide properties
One of:
object
kindstringrequiredAllowed:
llm_tokensmodelstringrequiredmodel_call_idstring<uuid>requiredmodel_provider_idstring<uuid>requiredprovider_ownerModelProviderOwnerBodyrequiredMirrors `ModelProviderOwner`'s spellings; same rule as the format body.
Allowed:
platformworkspacerun_idstring<uuid>requiredsession_idstring<uuid>requiredusageModelUsageBodyrequiredShow propertiesHide properties
One of:
object
formatstringrequiredAllowed:
anthropicusageAnthropicUsageBodyrequiredShow propertiesHide properties
cache_creation_input_tokensinteger<int64>requiredcache_read_input_tokensinteger<int64>requiredinput_tokensinteger<int64>requiredoutput_tokensinteger<int64>requiredobject
formatstringrequiredAllowed:
openai_responsesusageOpenaiResponsesUsageBodyrequiredShow propertiesHide properties
cache_write_input_tokensinteger<int64>requiredcached_input_tokensinteger<int64>requiredinput_tokensinteger<int64>requiredoutput_tokensinteger<int64>requiredreasoning_output_tokensinteger<int64>requiredobject
duration_msinteger<int64>requiredharnessstringrequiredkindstringrequiredAllowed:
harness_runtimerun_idstring<uuid>requiredsession_idstring<uuid>requiredworkspace_idstring<uuid>requirednext_cursorstring<uuid> | nullrequired`None` on the last page.
400Bad limit, cursor, or order.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired401Missing, malformed, or invalid bearer token.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired403Caller lacks org.usage.read.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired