Skip to main content
Use these endpoints with a Serverless API key:
  • GET /v1/usage/me returns usage attributed to the user who owns the key.
  • GET /v1/usage/team returns the Serverless account’s per-member usage for an owner or admin key.
Both endpoints report estimated cost in cents. Estimates use current model pricing and are not an invoice or credit-ledger statement.

Individual usage

The response contains time buckets, per-model token totals, request counts, and estimated cost for the key owner’s user and Serverless account. Usage remains associated with that user and account when a key is replaced; it is not scoped to one key ID.

Response

Team usage

An account owner or admin can query usage for every member of a Serverless account with one request:
The response includes each member’s identity, role, token and request totals, estimated cost, and time buckets, followed by account-wide totals:
Viewer keys cannot access the team endpoint. Removed members with usage in the selected window are included by default; pass include_removed=false to omit them. This endpoint is for Serverless accounts. Enterprise Pass teams do not yet have an API-accessible team billing role, so their team-wide usage is not exposed by this endpoint.

API keys

You do not need to collect or enumerate each member’s API keys to calculate team usage. /v1/usage/team aggregates usage by the stored member and Serverless account identity, including usage recorded before a member replaces a key. The usage endpoints do not expose a team key inventory or any raw key secrets. The signed-in dashboard API, GET /v1/serverless/keys, returns non-secret metadata for the caller’s own active keys only; it requires a dashboard session, not a wfr_… inference key. There is currently no inference-key-authenticated endpoint that lists every member’s keys. See API Keys for key management and rotation details.

Monthly invoices

For accounts billed by monthly invoice, account owners and admins can view issued invoice history by opening Billing in the Wafer dashboard and continuing to the Stripe Customer Portal. There is currently no public API for listing or downloading invoices. The estimated costs returned by /v1/usage/me and /v1/usage/team use current model pricing and are not the amount due on an invoice or a credit-ledger statement.

Common parameters

  • period (optional): 1d, 7d, or 30d
  • start_at and end_at (optional): explicit ISO timestamps instead of period
Use either period or start_at plus end_at.

Individual-only parameters

  • endpoint (optional): restrict usage to one endpoint. When omitted, /me aggregates across endpoints visible to the key owner.
  • pass_account_id (optional): restrict usage to one pass account UUID; it must match the authenticating key.

Team-only parameters

  • endpoint (optional): restrict usage to one endpoint. /team defaults to pass.wafer.ai.
  • include_removed (optional): include former members with historical usage; defaults to true.

Individual response fields

  • days: token usage buckets over the requested period
  • models: per-model token totals, cache-read tokens, request counts, and estimated cost
  • total_input_tokens, total_output_tokens, total_cache_read_tokens: token totals across all returned models
  • total_requests: total requests attributed to the user in the window
  • total_estimated_cost_cents: estimated cost in cents for the returned usage

Team response fields

  • members: per-member identity, role, removal status, time buckets, token and request totals, and estimated cost
  • total_input_tokens, total_output_tokens: token totals across returned members
  • total_requests: total requests across returned members
  • total_estimated_cost_cents: estimated cost across returned members

Errors

  • 401: missing or invalid API key
  • 400: invalid pass_account_id or invalid time window
  • 403: the key is not allowed to read team usage
  • 404: the key does not belong to a Serverless account
  • 429: rate limit exceeded