Docs

API reference · AI gateway

The organization's gateway requests from the ledger, newest first, of one key or named budget if asked

GET/v1/orgs/{org}/ai/usage
Permission
ai.usage.read
Operation
ai.usage.list

Parameters

NameInTypeRequiredNotes
orgpathstringyesfor example "org_01h455vb4pex5vsknk084sn02q"
limitqueryintegerno1 to 100; default 50
cursorquerystringnofor example "req_01h455vb4pex5vsknk084sn02q"
keyquerystringnofor example "gwk_01h455vb4pex5vsknk084sn02q"
budgetquerystringnofor example "bud_01h455vb4pex5vsknk084sn02q"
x-obhut-management-assignmentheaderstringnoSelect one staff assignment. Direct membership remains the default. Bound API tokens use their stored source and ignore this selector. For example "masg_01h455vb4pex5vsknk084sn02q"

Response 200

FieldTypeRequiredNotes
itemsarray of objectyes
items[].requestIdstringyesfor example "req_01h455vb4pex5vsknk084sn02q"
items[].orgIdstringyesfor example "org_01h455vb4pex5vsknk084sn02q"
items[].keystringyesfor example "gwk_01h455vb4pex5vsknk084sn02q"
items[].keyNamestringyes
items[].budgetstring or nullyes
items[].aliasstringyes
items[].modelstringyesfor example "cm_01h455vb4pex5vsknk084sn02q"
items[].providerstringyes
items[].providerModelstringyes
items[].locationstringyes
items[].jurisdictionstringyes
items[].inputTokensintegeryes
items[].outputTokensintegeryes
items[].currencystringyes
items[].costNanosstringyesNano-units (10^-9) of the currency as a decimal string.
items[].chargedNanoEurstringyesNano-euros (10^-9 EUR) as a decimal string. For example "50000000000"
items[].eurNanosPerUnitstringyesNano-units (10^-9) of the currency as a decimal string.
items[].statusintegeryes
items[].latencyMsintegeryes
items[].estimatedbooleanyes
items[].receivedAtstring (date-time)yesUTC, ISO 8601.
nextCursorstring or nullyes