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.
| Step | Menu | What you do |
|---|---|---|
| 1 | Model connections (BYOK) | Register the provider keys your company bought |
| 2 | AI guardrails › Guardrails | Bundle limits, allowed models, and sensitive-info rules |
| 3 | AI guardrails › Policies | Attach those rules to people and teams |
| 4 | API keys | Issue the keys people actually use, and wire them into tools |
| 5 | (each person in their terminal, or in the Claude organization settings) | Turn on recording for subscription tools like Claude Code and Cowork |
| 6 | AI dashboard · Activity monitoring | See 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.
- Pick a provider from the list — Configured on top, Add provider below
- Enter a name and the API key
- Before registering, use Try the key to pick a model and make a real call
- 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.
| Card | What it sets |
|---|---|
| Budget Policies | Spend limits and key expiry |
| Model & Provider Access | Only the models you allow, out of your connected providers |
| Sensitive Info Detection | Rules 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.
| Field | What it is |
|---|---|
| Max keys | How many keys someone under this policy can create. Empty means unlimited |
| Budget amount and period | Weekly or monthly, down to the reset day or date |
| Guardrail | Pick 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 # revokeHere 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.
There are two ways to fill it. By default, the person using the tool does the two things below themselves. If your company is on a Claude Team or Enterprise plan, an admin can also turn it on for the whole organization.
① 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 onmonitor 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.
| Command | What it turns off |
|---|---|
axhub axrouter monitor --off | This machine only. The enrollment stays |
axhub axrouter revoke | Releases the enrollment and stops collection |
axhub axrouter revoke-consent --execute | Withdraws the consent itself |
Turning it on for the whole organization (Claude Team · Enterprise)
If your company is on a Claude Team or Enterprise plan, an admin can enter a few values in the Claude organization settings once and receive records for every member. Members don't have to do anything in a terminal. This is also the only way to receive Cowork records, since Cowork has no settings file a person can edit.
Only the workspace owner can do this.
① Issue a token — open Connect Claude organization at the top of Activity monitoring and click Issue token. Give it a name and tick the confirmation that your organization is responsible for telling members.
The token is shown once, right after issuing. Enter it in the two places below before closing the window. If you miss it, issue a new one.
② Enter it for Cowork — in the Claude admin settings, under Data and privacy → Monitoring, fill in three values and save.
| Field | Value |
|---|---|
| OTLP endpoint | https://axrouter.ai/v1/agent/otlp |
| OTLP protocol | http/json |
| OTLP headers | Authorization=Bearer <your token> |
Fields not listed here, such as resource attributes, can stay empty.
③ Enter it for Claude Code — in the Claude admin settings, under Claude Code → Managed settings, paste the whole block below.
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_LOGS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/json",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://axrouter.ai/v1/agent/otlp",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <your token>",
"OTEL_LOG_USER_PROMPTS": "1",
"OTEL_LOG_ASSISTANT_RESPONSES": "1",
"OTEL_LOG_TOOL_DETAILS": "1"
}
}The two settings don't read each other. With only the Cowork setting, Claude Code records don't arrive, and the reverse is also true. Enter both to receive both. The same values are available to copy under How to enter them in the console.
④ Tell your members — your organization has to tell members that collection is on, because members aren't asked for consent one by one. Pass along three things.
- Records arrive from sessions started after the setting is saved. The desktop app needs one restart
- Claude Code in a terminal shows an approval prompt once on first run. It applies after they accept
- They need to sign in to Claude with their company account. Records are filed under a person only when that email matches their AXHub sign-up email
⑤ Check that it works — once a member starts a session, the token card in Connect Claude organization shows a last received time and records appear in the Code Agent tab.
If the token card shows accounts that couldn't be saved because the email differs, nobody has joined AXHub with that email. Invite them as a member and sessions started afterwards are recorded. Earlier records are not recovered.
A member who doesn't want to be recorded can stop their own collection with axhub axrouter revoke-consent --execute. To stop collection for the whole organization, choose Revoke in the token card's menu. Revoking can't be undone, so to resume you issue a new token and enter it in the Claude organization settings.
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 subscription tools turned on in step 5, including Cowork) 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
| Symptom | Cause |
|---|---|
| Authentication error | The key got truncated, or they're using a revoked one. Check the status in the list |
| Model not found | That model isn't in the guardrail's allowed models |
| Calls suddenly blocked | The key's budget is used up. The budget column shows what's left |
| The Claude organization is connected but nothing arrives | The session was opened before the setting was saved, or the person is signed in to Claude with a non-company account. Check the unmatched accounts on the token card too |
| Cowork arrives but Claude Code doesn't | The two settings are separate. Check that you also filled in Claude Code → Managed settings |