Skip to main content
If you build a platform on Wally Cloud, give each of your users, customers or apps its own Cloud key. Every request settles against the key that made it, so the usage export can be split by key and you can bill or cap each one yourself.

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 OpenAI user 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 carry api_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:
A request takes about a minute to appear in the export. Then:
Save that id with the key’s owner. It does not change for the life of the key.

3. Export usage

It returns the account’s settled requests, newest first, one page per call.
string
required
Start of the window, inclusive. An ISO 8601 time with a UTC offset, such as 2026-11-01T00:00:00Z.
string
required
End of the window, exclusive. At most 31 days after since. Export longer periods in parts.
string
Only requests made with this key.
string
Only this model id.
integer
Only this HTTP status.
string
Only the rows for this x-request-id. It can match more than one row.
integer
default:"100"
Rows per page, 1 to 200.
string
The previous page’s next_cursor. Send it with the same window and filters; changing either returns 400.
The response:
Rows also carry 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_micros is what was charged, in millionths of a dollar. 15 is $0.000015.
  • totals covers every page of the export, not just this one, and respects your filters. Query with api_key_id to get one key’s total in a single call.
  • cached_tokens is part of prompt_tokens, billed at the cached rate. noncached_prompt_tokens is 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_of is about a minute behind real time. A request newer than that shows up in the next export.

Per-key totals for a month

The defaults cover October 2026, which is 31 days, the most one window allows. Set 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.