> ## Documentation Index
> Fetch the complete documentation index at: https://bilanc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Coding Tools

> Connect Cursor, Claude Code, Codex, Augment, and GitHub Copilot to track AI adoption.

These connections power Bilanc's AI adoption metrics — how much your engineers use AI assistants, and the impact on their output. Connect whichever tools your teams have licensed.

All of these live under **Admin → Connections → AI Copilots** in the [Bilanc dashboard](https://app.bilanc.co), except where noted.

***

## Cursor

Cursor usage comes from the **Cursor Admin API**.

**Who needs to do it:** a **Cursor team admin**.

### Steps

1. Go to your [Cursor dashboard](https://cursor.com/dashboard) → **Settings** → **Cursor Admin API Keys**.
2. Click **Create New API Key**, give it a name (e.g. "Bilanc"), and copy the key — you won't be able to see it again.
3. In Bilanc, click **Connect** on the **Cursor** card and paste the key.

***

## Claude Code

How you connect Claude Code depends on how you license it. There are three paths — pick the one that matches your setup.

### Option A — Claude Code Enterprise (recommended if you have it)

If your Claude Code seats are managed through **claude.ai** (Enterprise/Team plan), we recommend setting up **telemetry**. Claude Code emits OpenTelemetry metrics, and you point them at Bilanc with a managed setting that applies to everyone in your org.

**Who needs to do it:** a **claude.ai organization admin**.

1. In Bilanc, create an **Organization API key**:
   * Click your profile icon in the bottom-left of the dashboard.
   * Go to **Account Settings → Organization API keys**.
   * Generate a new key and copy it.
2. Open [Claude Code admin settings](https://claude.ai/admin-settings/claude-code), go to **Managed settings (settings.json)**, and paste the following — replacing `<your-organization-api-key>` with the key from step 1:

   ```json theme={null}
   {
     "env": {
       "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
       "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <your-organization-api-key>",
       "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "https://otel.bilanc.co/v1/metrics",
       "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": "http/protobuf",
       "OTEL_METRICS_EXPORTER": "otlp",
       "OTEL_METRIC_EXPORT_INTERVAL": "60000"
     }
   }
   ```

Managed settings apply to every engineer in your org automatically — there's nothing for individuals to install.

<Warning>
  Keep the organization API key private. Bilanc uses it to authenticate the telemetry coming from your Claude organization.
</Warning>

### Option B — Claude Code via the Anthropic API

If you use Claude Code with **API usage** (billed through the Anthropic API rather than claude.ai seats), connect via [platform.anthropic.com](https://platform.anthropic.com) so Bilanc can read usage and cost.

**Who needs to do it:** an **Anthropic organization admin/owner** (Admin API keys can only be created by org admins).

1. In [platform.anthropic.com](https://platform.anthropic.com), go to **Settings → Admin keys** and create an **Admin API key**.
2. In Bilanc, click **Connect** on the **Claude Code** card and paste the key.

### Option C — Claude Code via Amazon Bedrock (S3)

If your engineers use Claude Code through **Amazon Bedrock**, connect by dropping daily usage files into an **S3 bucket** that Bilanc reads. This suits setups where you don't run OpenTelemetry on each developer's machine and instead derive usage from Bedrock invocation and CloudTrail logs.

You own the bucket and grant Bilanc **list/read-only** access to it via an IAM user. No prompt or response content is required — only aggregated token usage and cost.

**Who needs to do it:** an **AWS admin** who can create an IAM user and manage the S3 bucket.

1. Create (or choose) an **S3 bucket** in your AWS account, and decide on a path prefix where the usage files will live (e.g. `claude-code/usage/`).
2. Create an **IAM user** with programmatic access and a read-only policy scoped to that bucket and prefix (`s3:ListBucket` and `s3:GetObject`). Generate an **access key** for it.
3. Upload one **CSV file per day** to the bucket under your prefix, named `YYYY-MM-DD.csv` (e.g. `2026-06-16.csv`). Each file has one row per user, per model, with these columns:

   ```
   UsageDate,Cost,Name,Email,Model,Invocations,InputTokens,OutputTokens,CacheRead,CacheWrite,TotalTokens
   2026-06-16,0.80,Jane Doe,jane.doe@example.com,Claude Haiku,80,502744,23519,781996,77532,1385791
   2026-06-16,118.45,Jane Doe,jane.doe@example.com,Claude Opus 4.8,989,313891,921388,133801409,4459198,139495886
   2026-06-16,3.65,Jane Doe,jane.doe@example.com,Claude Sonnet 4.6,55,134531,83168,2438068,338265,2994032
   ```

   Each day should be a new file. Bilanc expects the next day's file to appear shortly after midnight UTC. You can backfill historic data by uploading files for past dates.
4. In Bilanc, click **Connect** on the **Claude Code (Bedrock)** card and provide:
   * **AWS Access Key Id** — access key ID for the IAM user.
   * **AWS Secret Access Key** — secret access key for the IAM user.
   * **Bucket Name** — the S3 bucket you created.
   * **Bucket Path Prefix** — the prefix where the daily files are uploaded.

<Note>
  Producing the daily files is your responsibility — Bilanc reads the aggregated CSVs, not raw Bedrock logs. Most teams generate them by enabling [Bedrock model invocation logging](https://docs.aws.amazon.com/bedrock/latest/userguide/model-invocation-logging.html) to S3 (which captures per-invocation token counts, model ID, and the calling identity, with no prompt/response content) and rolling those records up per user, per model, per day. AWS's [Guidance for Claude Code with Amazon Bedrock](https://github.com/aws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock/blob/main/assets/docs/MONITORING.md) is a good reference for this.
</Note>

<Warning>
  Keep the IAM access key private. Scope its policy to read-only access on just this bucket and prefix, so the credentials can't be used for anything else.
</Warning>

***

## Codex

Codex usage comes from your **ChatGPT Enterprise/Business** workspace.

**Who needs to do it:** a **ChatGPT workspace owner**, who can generate an API key with access to workspace usage.

### Steps

1. Generate an API key from your ChatGPT Enterprise/Business workspace admin settings.
2. In Bilanc, click **Connect** on the **Codex** card and paste the key.

***

## Augment

**Who needs to do it:** an **Augment admin**.

### Steps

1. Generate an API key from your Augment admin settings.
2. In Bilanc, click **Connect** on the **Augment Code** card and paste the key.

***

## GitHub Copilot

GitHub Copilot metrics come from GitHub's Copilot usage API. The right path depends on whether Copilot is licensed at the **organization** level or through a **GitHub Enterprise** account.

### If Copilot is licensed at the organization level

Connect through your normal **GitHub** version control connection — no separate Copilot card needed.

**Who needs to do it:** a GitHub **organization owner** (or a custom role with **View Organization Copilot Metrics**).

1. Go to [github.com/settings/organizations](https://github.com/settings/organizations), select your organization, and open **Settings → Copilot → Policies**.
2. Under **Features**, set **Copilot usage metrics** to **Enabled**.
3. Connect GitHub from **Admin → Connections → Version Control** using an account that is an org owner (see [Version Control → GitHub](/connect/version-control#github)).

### If you have GitHub Enterprise

Use the **GitHub Copilot Enterprise** card at the top of the **AI Copilots** section.

**Who needs to do it:** a GitHub **enterprise owner** — only owners can view enterprise settings and connect Copilot.

1. Make sure the **Copilot usage metrics** policy is set to **Enabled everywhere** for the enterprise. Manage this at `github.com/enterprises/<slug>/ai-controls/copilot`.
2. Find your enterprise slug — it's the part of the URL after `/enterprises/`. Your enterprises are listed at [github.com/settings/enterprises](https://github.com/settings/enterprises), e.g. `github.com/enterprises/<slug>/settings/`.
3. On the **GitHub Copilot Enterprise** card in Bilanc, click **Connect**, enter the **enterprise slug**, and authorize. When prompted, select the **enterprise** (not an individual org).
