Skip to main content
POST
Report AI agent usage

Authorizations

Authorization
string
header
required

Dashboard JWT token from Clerk

Headers

X-Tenant-Id
string
required

Tenant id the usage is billed against; validated against the organization record.

Body

application/json
agent_id
string
required

Identifier of the AI agent that produced the usage.

model_id
string

Model that served the turn; when omitted a baseline rate is applied.

prompt_tokens
integer

Input tokens for the turn.

Required range: x >= 0
completion_tokens
integer

Output tokens for the turn.

Required range: x >= 0
cache_read_tokens
integer
Required range: x >= 0
cache_creation_tokens
integer
Required range: x >= 0
tokens_used
integer

Legacy blended token count; used only when the split token fields are absent.

Required range: x >= 0
conversation_id
string
org_id
string
channel
string
request_id
string

Response

200 - application/json

Usage recorded and billed against the tenant wallet.

data
object
meta
object