1. One key per user
Create keys on the console’s Cloud keys page. Name each key after the user or customer it belongs to (up to 120 characters), since the name is what you will see in the console later. The plaintext shows once, so store it in your secret manager next to your own user id. Keep the keys on your servers. Any live key on the account can read the account’s usage export below, so a key handed to an end user would let them see every key’s token counts and spend. It never exposes prompts, completions or key material. The OpenAIuser field is accepted but not recorded, so it cannot be used to split usage. Use a
key per user instead.
2. Find each key’s id
Export rows carryapi_key_id, a UUID, not the key name. To learn a key’s id, send one request
with it and look that request up by the x-request-id the response carried:
3. Export usage
Start of the window, inclusive. An ISO 8601 time with a UTC offset, such as
2026-11-01T00:00:00Z.End of the window, exclusive. At most 31 days after
since. Export longer periods in parts.The previous page’s
next_cursor. Send it with the same window and filters; changing either
returns 400.provider, error_code, ts_end, recorded_at, max_tokens_requested,
max_tokens_granted and tpot_ms, trimmed above. A few things to know when you reconcile:
cost_microsis what was charged, in millionths of a dollar.15is $0.000015.totalscovers every page of the export, not just this one, and respects your filters. Query withapi_key_idto get one key’s total in a single call.cached_tokensis part ofprompt_tokens, billed at the cached rate.noncached_prompt_tokensis the rest, billed at the input rate.- Only settled requests appear. A request still running, or one refused before it reached a model, has no row.
as_ofis about a minute behind real time. A request newer than that shows up in the next export.
Per-key totals for a month
SINCE and
UNTIL for another period.
From the CLI
wally account usage --requests reads the same export for the signed-in account. Add --json to
get api_key_id on every row:
Coming next
Showing key ids on the Cloud keys page, a--key filter in the CLI, and per-key spend limits are
not available yet. Email support@runanywhere.ai if your platform
needs one of them.