List Ledger Entries
/v1/ledgerParameters
limitquery · integercursorquery · stringviewquery · stringUse transactions for posted charges, purchases, and adjustments, excluding temporary holds and hold releases.
Responses
200Ledger page.
dataobject[]RequiredShow nested fields
idstringRequiredworkspace_idstringRequiredrequest_idstring | nullkey_idstring | nullAPI key that incurred the charge, when associated with a request.
key_namestring | nullDisplay name of the API key, including revoked keys.
purchase_idstring | nullCredit purchase associated with this row; null for grants and internal ledger entries.
kindstringRequiredValues: "credit""reserve""charge""refund""adjust""fee"
amountnumberRequiredcurrencystringRequiredbalancenumberRequiredstatestringRequiredValues: "pending""posted""void"
notestring | nullcreated_atstringRequirednext_cursorstring | null401Authentication is missing or invalid.
errorobjectRequiredShow nested fields
codestringRequiredmessagestringRequiredparamstring | nullrequest_idstring | nullmetadataobjectTyped detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.
500Internal server error.
errorobjectRequiredShow nested fields
codestringRequiredmessagestringRequiredparamstring | nullrequest_idstring | nullmetadataobjectTyped detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.