AI agent
Get knowledge usage
Authorization
AuthorizationstringrequiredAn API token, sent as Bearer <token>.
Needs the settings:read ability
Response 200
OKdataobjectrequiredShow child attributesHide child attributes
linesobject[] | nullrequiredThe month's usage per source and kind, the largest first.
Show child attributesHide child attributes
browser_msintegerrequiredBrowser time spent reading pages for this line, in milliseconds.
Format: int64
estimated_tokensintegerrequiredHow many of the input tokens were estimated rather than reported by the provider.
Format: int64
input_tokensintegerrequiredHow many tokens were embedded for this line.
Format: int64
kindstringrequiredWhat was used: embedding (turning text into vectors) or crawl (reading pages).
requestsintegerrequiredHow many calls were made for this line.
Format: int64
source_idstring | nullrequiredId of the knowledge source, starting with ks_. Null for the workspace's own articles and conversations.
source_namestringrequiredName of the knowledge source the usage belongs to.
source_typestringrequiredThe kind of that source, such as website or notion.
objectstringrequiredThe kind of record this is, the same for every record of its kind, such as article.
period_startstringrequiredThe first day of the month the usage is for, in UTC, written YYYY-MM-DD, such as 2026-11-01.
Response error
ErrorcodestringrequiredStable code for programs to tell errors apart, such as validation_failed or internal_error.
errorsobjectEach rejected field mapped to its messages. Only present when the input was invalid.
messagestringrequiredWhat went wrong, in words safe to show a person.