Track per-engineer AI usage with AI Runtime Control
Use AI Runtime Control (ARC) to track how much each engineer uses Claude Code by issuing a virtual key per person and reading the usage ARC records for each one.
In this tutorial, you'll set up AI Runtime Control (ARC) to track how much your engineers use Claude Code, broken down per person. We'll use three engineers as a stand-in for a larger team. You'll configure a provider, issue a virtual key to each engineer, route their traffic through ARC, and then view the usage ARC records for each key.
By the end, you'll understand how ARC attributes usage to individual virtual keys, which is the foundation for tracking AI usage across a whole organization.
Before you begin
This tutorial assumes you've already gotten access to ARC and have completed the steps to get started using it. You'll also need the following:
- The superuser role. Other account roles can't access ARC.
- Credentials for an Anthropic account that your engineers' Claude Code traffic will route through.
We'll use Anthropic as the provider and Claude Opus 4.8 as the model throughout this tutorial.
Step 1: Configure Anthropic as a provider
First, add Anthropic as a provider so ARC can route requests to it. You'll provide your Anthropic credentials and choose which models to make available.
- Log in to the Fastly control panel.
- Go to Tools > AI Runtime Control.
- Click the Providers tab.
- Click Add, then select Anthropic.
- Fill out the provider form as follows:
- In the API key field, enter your Anthropic API key.
- Under Model permissions, select Limit model access and add Claude Opus 4.8.
- Click Save.
You now have a provider that ARC can route Claude Code traffic to.
Step 2: Create a virtual key for each engineer
Next, create one virtual key per engineer. Each engineer uses their own key, which is what lets ARC attribute usage to each person individually. Repeat these steps for each key.
Click the Virtual keys tab.
Click Add key.
In the Key name field, enter a name that identifies the engineer (for example, engineer-1).
In the Model permissions area, select Limit model access and then select Claude Opus 4.8.
In the Expiration area, select Never expires.
(Optional) Click the AI Firewall switch to the On position to enable security inspection for your AI request traffic.
NOTE: Security inspection is provided by AI Firewall, a separately purchased add-on to ARC.
(Optional) If you've enabled AI Firewall, select Block or Log to control what happens when a request matches a known injection pattern. In block mode, ARC rejects the request before it reaches your provider. In log mode, ARC records the detection and forwards the request.
Click Add virtual key. A key value and its creation notification appears.
Click Copy key or the clipboard to copy the virtual key and give it to the engineer it belongs to.
IMPORTANT: This is the only time the key will be visible. Record the key and keep it secure. For your security it will not appear in the control panel.
When you've created a key for each engineer, you'll have three virtual keys, each mapped to Anthropic's Claude Opus 4.8 through your Anthropic provider.
Step 3: Route each engineer's Claude Code traffic through ARC
Each engineer now configures Claude Code to send its requests to ARC instead of to Anthropic directly. Because ARC accepts Anthropic's API shape, this is the only change Claude Code needs.
Have each engineer edit their .claude/settings.json file to include the following:
12345678{ "$schema": "https://json.schemastore.org/claude-code-settings.json", "env": { "ANTHROPIC_BASE_URL": "your-arc-endpoint", "ANTHROPIC_API_KEY": "your-virtual-key", "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1" }}Set the values as follows:
ANTHROPIC_BASE_URL: the ARC endpoint.ANTHROPIC_API_KEY: the engineer's virtual key, in place of a raw Anthropic key.CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY: set to1. Because traffic routes through a gateway, Claude Code queries the gateway's models at startup and adds them to its model picker, labeled "From gateway".
Optionally, to launch Claude Code with a specific model every time, have them add a top-level model key set to that model's name or alias as recognized by ARC (for example, claude-opus-4-8 for Claude Opus 4.8).
Once each engineer has done this, their Claude Code requests flow through ARC, and ARC records each request against that engineer's virtual key.
Step 4: View per-engineer usage
Now that traffic is flowing, you can see how much each engineer is using Claude Code.
To see one engineer's usage, open their key's details page:
- Click the Virtual keys tab.
- Click the name of the engineer's virtual key.
- Review the Requests and Tokens metrics for the date range you select.
To see usage across the whole team, open the summary view:
- Click the Summary tab.
- View the summary for an at-a-glance breakdown of request and token volume, with tables that summarize usage for each virtual key.
For request-level detail, open the logging view:
- Click the Logging tab.
- Search for an engineer's virtual key, or set the virtual key filter.
- Review the individual requests recorded for that key, including the model, input and output token counts, and timestamp.
Because each engineer uses their own virtual key, the usage you see is attributed to that engineer.
What's next
You've set up per-engineer usage tracking for a small team and have seen how ARC attributes usage to each virtual key. From here, you can:
- apply the same pattern to your full engineering team by creating a virtual key for each additional engineer.
- apply the same pattern to a specific product feature that uses AI.
- set up budget and rate limits for each virtual key you create.
- set up failover providers for those same virtual keys.
