GET /accounts/:owner_id— point-in-time wallet snapshot + tier stateGET /accounts/:owner_id/usage— cost and scan counts over a time range
X-API-Key header. You can only read your own account — requests for a different owner ID return 403.
Account snapshot
Response
Account identifier.
Account email.
One of
free, pro, enterprise.Account creation timestamp (RFC3339, UTC).
When the account last moved to its current paid tier.
null for Free accounts. Used as the billing-cycle anchor for the monthly recharge commitment.Set when a Pro / Enterprise account misses its monthly commitment. While non-null, the paid tier stays active; after the deadline passes without a qualifying deposit, the account is downgraded to Free.
Remaining sandbox free credits in microdollars. Starts at 100000000 (200).
Paid balance in microdollars. Topped up by deposits.
Response
sandbox_free_micros + balance_micros. Same for guardrails. The wallet drains sandbox free first, then paid; guardrails free first, then paid.
Usage over a time range
Query parameters
Window start (RFC3339). Defaults to 30 days ago.
Window end (RFC3339). Defaults to now.
Backward-compatible alias for
start. Ignored if start is set.Response
Account identifier.
Effective window start (RFC3339 UTC).
Total sandbox compute cost for the window, in microdollars.
Convenience string:
total_cost_micros / 1000000 formatted to 2 decimal places.Number of distinct sandboxes metered in the window.
Total sandbox-seconds consumed.
Sum of
sandbox_free_micros + balance_micros at the time of the query.Total guardrails scan cost in the window. Present only when the guardrails store is available.
USD-formatted equivalent.
Sum of
guardrails_free_micros + balance_micros.Per-scanner scan counts:
pii_ml_scans, injection_ml_scans, toxicity_ml_scans, code_security_scans, language_ml_scans, invisible_text_scans.Response
Example — monthly spend
Managing API keys
Every key-management action is scoped to your own owner ID.POST /accounts/:owner_id/api-keys— create a new key. Optional JSON body with anamefield. Returns the raw key string exactly once — store it.GET /accounts/:owner_id/api-keys— list your keys (key ID, name, created-at, revoked state — never the raw key).DELETE /accounts/:owner_id/api-keys/:key_id— revoke a key. Future requests using that key return401.
Patterns
Low-balance alerting. Poll the account snapshot endpoint once an hour and fire an alert whensandbox_free_micros + balance_micros drops below your threshold. For Pro accounts, sub-$10 is a reasonable “top up soon” signal.
Month-close reconciliation. Call the usage endpoint with start / end aligned to your accounting period. total_cost_usd and guardrails_cost_usd are pre-formatted for reports.
Per-scanner cost attribution. Multiply each entry in guardrails_breakdown by the per-scan rate from Billing & Pricing to get scanner-level spend — useful when deciding whether to disable an expensive scanner in low-risk environments.