K

Manage AXRouter

Route the company's AI usage through one place — connect models, set limits, hand out keys, and check usage.

This page covers the five menus in the AXRouter group of the admin console.
When everyone buys their own AI key, the company can't see what it spends or what's being sent. AXRouter funnels those calls through a single path.

AXRouter is enabled separately. If it isn't on, these menus either don't appear or open to a "not enabled" notice.

The order

Each step creates the choices the next one needs. Work through them in this order.

StepMenuWhat you do
1Model connections (BYOK)Register the provider keys your company bought
2AI guardrails › GuardrailsBundle limits, allowed models, and sensitive-info rules
3AI guardrails › PoliciesAttach those rules to people and teams
4API keysIssue the keys people actually use, and wire them into tools
5(each person, in their terminal)Turn on recording for personal-subscription tools like Claude Code
6AI dashboard · Activity monitoringSee how much was spent and what was exchanged

1. Connecting models (BYOK)

Under Model connections (BYOK), register the provider keys your company already bought. AXRouter then calls upstream on your behalf. Keys are stored encrypted.

  1. Pick a provider from the list — Configured on top, Add provider below
  2. Enter a name and the API key
  3. Before registering, use Try the key to pick a model and make a real call
  4. Click Register

One key per provider. Adding a new key to a provider that already has one replaces it.

2. Creating guardrails

Build these on the Guardrails tab of the AI guardrails screen. A guardrail is a bundle of rules that attaches to a key, split across three cards.

CardWhat it sets
Budget PoliciesSpend limits and key expiry
Model & Provider AccessOnly the models you allow, out of your connected providers
Sensitive Info DetectionRules that catch sensitive data in what's exchanged

Limits are turned on per period. Turn on several and they all apply at once — a daily cap alongside a monthly one, say. With none on, calls run with no cost limit. Expiry is set as "days after issue".

Allowed models left empty means everything is allowed. Pick specific ones and everything else is blocked.

Sensitive info detection lets you choose what to catch, and Pattern test lets you paste a sentence to see whether it actually trips.

3. Creating policies and attaching them to people

A guardrail on its own is just a set of rules. Policies are what make them reach people.

On the Policies tab, click Create policy. At first you only give it a name; you fill in the rest from its detail page.

FieldWhat it is
Max keysHow many keys someone under this policy can create. Empty means unlimited
Budget amount and periodWeekly or monthly, down to the reset day or date
GuardrailPick one of the guardrails you built

There are two ways to attach one.

  • From the policy — add people under Individually assigned members on the policy detail page
  • From the person — pick it on the AI guardrail policy tab of a member or team. Attaching to a team covers everyone in it

If guardrails and policies blur together — a guardrail is what to restrict, a policy is who it applies to. Building only guardrails changes nothing.

4. Issuing keys and wiring them into tools

The API keys screen lists every key issued in the company, with key, owner, guardrail, spend, budget, expiry, and status. An owner of Workspace means it's a shared company key.

Issue company key creates a shared key with a name and a guardrail. People issue their own personal keys from their own screen.

The key value is shown once, right after issue. Copy it there and then. Miss it and you have to issue a new one.

Wiring it in

Change just the base URL and API key in whatever tool you use, and calls start going through this path. Paste the whole ax- value as the key.

Tools that speak the Anthropic protocol, like Claude Code, use the address as-is.

ANTHROPIC_BASE_URL=https://axrouter.ai
ANTHROPIC_AUTH_TOKEN=<your key>

OpenAI-compatible tools append /v1.

base_url = https://axrouter.ai/v1
api_key  = <your key>

Keeping the key in an environment variable is safer than writing it into code. The same instructions live in the console under How to put a key into an AI tool, so you can just point people at that screen.

After issuing, the list also lets you change the guardrail and revoke.

Issuing from a terminal

Personal keys can also be handled with the axhub command-line tool (CLI).

axhub axrouter keys issue --name "my key" --purpose "local development"
axhub axrouter keys list                        # my keys
axhub axrouter keys revoke <key_id> --execute   # revoke

Here too, the key value is printed once, at issue time. If you belong to more than one company, add --tenant <company slug>.

5. Turning on Code Agent recording

Personal-subscription tools like Claude Code don't use our keys. They run on a subscription the person bought, unrelated to step 4 — which means the Code Agent tab in monitoring stays empty unless something is done.

To fill it, the person using the tool has to do two things themselves. An admin can't do it for them.

① Give consent — on the console's AI activity records page (/{company slug}/ai-usage). It isn't in the menu; you reach it by URL, so it helps if an admin sends the link around.

② Turn on collection — then, in a terminal:

axhub axrouter status                          # availability per company and my consent state
axhub axrouter monitor --tenant <company slug> # turn collection on

monitor edits ~/.claude/settings.json. Restart Claude Code for it to take effect. And one machine collects for one company only — turning it on for another company stops collection for the first.

There are two ways to turn it off, and they mean different things.

CommandWhat it turns off
axhub axrouter monitor --offThis machine only. The enrollment stays
axhub axrouter revokeReleases the enrollment and stops collection
axhub axrouter revoke-consent --executeWithdraws the consent itself

6. Checking usage

The AI dashboard shows what the whole company spent, by period.

  • Switch between cost and tokens
  • Break it down by model, by key, by member, or by group
  • Team and person rankings sit alongside, so heavy usage is obvious at a glance

Activity monitoring shows what was actually exchanged. It has two tabs — Code Agent (the personal-subscription tools turned on in step 5) and API Keys (the keys issued in step 4). The top of the screen shows the body retention period and whether API key request logging is on, and Settings changes both. Exports happen here too.

When someone says they're stuck

SymptomCause
Authentication errorThe key got truncated, or they're using a revoked one. Check the status in the list
Model not foundThat model isn't in the guardrail's allowed models
Calls suddenly blockedThe key's budget is used up. The budget column shows what's left