Skip to main content
GET
Read a subject's rolling AI spend
This endpoint is served by the in-VM managed proxy at http://172.16.0.1:9090, not the public api.rigbox.dev gateway. It is IP-attested and scoped to the calling workspace’s owner — you can only read your own subjects.
See the Managed AI Proxy guide for how subjects are attributed and enforced.

Query Parameters

subject
string
required

The end-user id (the value sent as X-Rigbox-Subject / OpenAI user).

Example:

"tenant-42"

window
string
default:86400

Rolling window: 30s/15m/5h/7d or a bare number of seconds. Defaults to 86400 (24h).

Example:

"24h"

Response

The subject's usage over the window.

A subject's aggregated AI usage over a rolling window.

subject
string
Example:

"tenant-42"

window_seconds
integer
Example:

86400

credits
number
Example:

0.00072

credits_micro
integer<int64>
Example:

720

input_tokens
integer
Example:

8

output_tokens
integer
Example:

10

requests
integer
Example:

1