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
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
org | path | string | yes | for example "org_01h455vb4pex5vsknk084sn02q" |
limit | query | integer | no | 1 to 100; default 50 |
cursor | query | string | no | for example "req_01h455vb4pex5vsknk084sn02q" |
key | query | string | no | for example "gwk_01h455vb4pex5vsknk084sn02q" |
budget | query | string | no | for example "bud_01h455vb4pex5vsknk084sn02q" |
x-obhut-management-assignment | header | string | no | Select 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
| Field | Type | Required | Notes |
|---|---|---|---|
items | array of object | yes | |
items[].requestId | string | yes | for example "req_01h455vb4pex5vsknk084sn02q" |
items[].orgId | string | yes | for example "org_01h455vb4pex5vsknk084sn02q" |
items[].key | string | yes | for example "gwk_01h455vb4pex5vsknk084sn02q" |
items[].keyName | string | yes | |
items[].budget | string or null | yes | |
items[].alias | string | yes | |
items[].model | string | yes | for example "cm_01h455vb4pex5vsknk084sn02q" |
items[].provider | string | yes | |
items[].providerModel | string | yes | |
items[].location | string | yes | |
items[].jurisdiction | string | yes | |
items[].inputTokens | integer | yes | |
items[].outputTokens | integer | yes | |
items[].currency | string | yes | |
items[].costNanos | string | yes | Nano-units (10^-9) of the currency as a decimal string. |
items[].chargedNanoEur | string | yes | Nano-euros (10^-9 EUR) as a decimal string. For example "50000000000" |
items[].eurNanosPerUnit | string | yes | Nano-units (10^-9) of the currency as a decimal string. |
items[].status | integer | yes | |
items[].latencyMs | integer | yes | |
items[].estimated | boolean | yes | |
items[].receivedAt | string (date-time) | yes | UTC, ISO 8601. |
nextCursor | string or null | yes |