Skip to main content
The Weave API manages the Weave Router with the same wv_ key you use for the rest of the Weave API. Send it in the X-API-Key header. The organization always comes from the key. {user} is either the engineer’s router user ID or their email address. Emails match case-insensitively. If one email belongs to more than one router user in your organization, the API answers 409 and you use the router user ID instead. A key that only manages spend can hold read and budgets without write. Create keys under Settings → API keys.

Export usage

GET /router/usage returns one row per UTC day for each combination of the dimensions you group by: user, api_key, served_model and requested_model. A dimension you did not group by is null. The range is at most 92 days, end inclusive.
Pass each response’s next_cursor back as cursor until it is null, keeping the other filters and groupings unchanged. Pages are not a snapshot; late-arriving usage may cause rows to repeat or be missed while paging. For reconciliation, re-fetch settled date ranges and replace each day’s aggregates rather than appending them. With reporting anonymization on, user and api_key groupings and the emails and api_key_ids filters are not available. If you omit group_by, usage is grouped by served and requested model only. Two cost columns come back, and they answer different questions:
  • cost_usd_micros is the billed cost: what the router charged, 0 for turns an engineer’s own subscription covered. This is the number that reconciles against your Weave invoice and, for bring-your-own-key traffic, your provider invoices.
  • api_rate_cost_usd_micros prices every turn at catalog API rates, subscription-covered turns included. It measures consumption, not spend.
Money is in USD micros: $1.00 is 1,000,000. The export does not include savings. For the comparison against your comparison model, read GET /metrics?metric=router_cost&group_by=router_cost_type, which returns an actual and a comparison row for each period. See how savings are calculated.

Raise an engineer’s limit from Slack

A grant adds headroom on top of an engineer’s monthly limit for the current UTC month only. It expires at the month boundary, leaves the engineer’s base limit alone, and never lifts the organization-wide cap. A grant has no effect while the engineer is uncapped. A typical approval flow:
  1. Subscribe a webhook to router_spend_alert. It fires router_spend_limit.approaching and router_spend_limit.reached with the engineer’s user_email and a stable alert id.
  2. Your Slack bot asks the engineer’s manager to approve more headroom.
  3. On approval, the bot checks that the alert’s month is still the current UTC month. After rollover, request a new approval instead of submitting the old grant. Use the alert id as the Idempotency-Key so a retried request cannot grant twice:
A new grant returns 201. Repeating a key returns the original grant with 200 and adds nothing. The response’s user.remaining_usd_micros is the engineer’s headroom for the rest of the month.

Audit limit changes

GET /router/spend-limits/history lists every change, newest first: org limit changes, engineer limits set or cleared, and grants. Each entry has the old and new values, the reason and approver when given, and the actor’s stable ID: actor_api_key_id for API writes or actor_account_id for changes made in the app. The current key name, when available, is a display label in actor_api_key_name. The key ID remains in history after revocation. Filter by user, since and until, and resend those same filters when paging with cursor.
The ra_ analytics keys and the router’s /v1/analytics/* routes are deprecated. Existing keys keep working for now, but new ones can no longer be issued. Use GET /router/usage for usage, or see the analytics export if you still read raw routing decisions.
Last modified on November 26, 2026