# Connect Cursor

Costfluent reads your Cursor spend from the team's usage events, through Cursor's Admin API, with an
API key a team admin creates for it. One connection is one Cursor team, and the requests every
member and service account of it made.

## How Costfluent connects

Costfluent stores the key encrypted and uses it for three reads only: the team the key belongs to,
the team's member list, and the team's usage events, one UTC day at a time. The team becomes the
connection's identity, and the key is only ever used for that team.

Cursor's usage events name a member by email address. Costfluent uses the member list to turn each
address into the member's Cursor ID while it reads, and keeps the ID only: no member's email address
or name is stored, logged or shown.

:::caution
Cursor documents the Admin API with the `admin:*` scope, which can also change the team's members
and settings. Where your dashboard offers a key that can only read (`read:*`), create that one;
either way, create it for Costfluent alone, so you can revoke it without touching anything else.
:::

## Prerequisites

1. The Owner or Integration owner organization role in Costfluent.
2. A Cursor team whose plan includes the Admin API. Cursor lists its Admin API for Enterprise teams
   ([Cursor APIs](https://cursor.com/docs/api), read 2026-11-10).
3. A team admin of that team, who creates the key.

## Connect

### Create the key in Cursor

<Stepper>

1. In the Cursor dashboard, open **API Keys**.
2. Create a key with a name that says what it is for, such as `Costfluent`.
3. Copy the key: Cursor shows it only once.

</Stepper>

### Connect in Costfluent

<Stepper>

1. Open **Settings**, then **Integrations**, select **Cursor**, and open the **Connect** tab.
2. Select "Add Admin key", keep the suggested **Display name** or enter your own, and paste the
   key into **Admin API key**.
3. Select "Test connection" to see each check, or "Connect" to save.

</Stepper>

Costfluent reads the key's team and a page of its usage events before storing anything, so a
connection that saves can read your spend. A key of a team your organization has already connected
is refused.

## Data and freshness

Connecting imports as far back as your plan's backfill reaches, and at most six months
([Manage connections](/connect/manage-connections#how-it-behaves)), as long as Cursor reports
usage events that far back. Cost arrives by UTC day, in US dollars: the sum of what Cursor charged
for each event.

:::note
Seat fees are not in Cursor's Admin API, so Costfluent does not collect them. Send them to a custom
provider instead ([Track AI spend from any source](/guides/ai-spend-from-any-source)). Requests your
plan includes appear with their tokens at zero cost.
:::

## Reporting dimensions

- **Service** is `Cursor`, in the AI and Machine Learning category.
- **SKU** is the model as Cursor names it, such as `claude-4.5-sonnet-thinking`. Where Costfluent
  recognises the model, tag `ai:model` names it as its maker does and `ai:model_provider` names the
  maker.
- The charge description names the model and Cursor's kind of charge, `Usage-based` or
  `Included in Business`.
- Tag `ai:user` is the member's Cursor ID, such as `user_abc123`. A member Cursor no longer lists
  carries no `ai:user`.
- **Resource** is the service account behind requests a service account made, and **Resource
  type** is `Service account`; those requests carry no `ai:user`.
- **Usage unit** is `Tokens`: the input, output, cache write and cache read tokens of the requests,
  added up. Cursor charges per request, not per token type, so the rows carry no `ai:token_type`,
  and the cost per million tokens is a blended rate across them.
- The billing account is the team ID, and the billing period is the calendar month.

## Update or disconnect

### After connecting

The **Manage** tab lists the connection by its display name. Open the gear icon beside it to see
whether the usage events are still readable, which workspaces the connection feeds, and which
months have been imported. **Run checks** runs the checks again on request.

### Rotating or removing access

To rotate the key, create a new key in the same team, select **Update credentials** on the
connection page, and paste it; then revoke the old key in the Cursor dashboard. A key of another
team is refused, because the connection's history belongs to its team: connect that team as a new
connection instead.

To retire the connection, remove it in Costfluent and revoke its key in the Cursor dashboard.
Removing it erases the cost it imported
([Remove a connection](/connect/manage-connections#remove-a-connection)).

## Troubleshooting

- **Cursor refused this key.** The key was revoked, or it is not a team API key. A team admin
  creates one on the **API Keys** page of the Cursor dashboard.
- **Cursor refused the usage events for this key.** The team's plan may not include the Admin API,
  or the key belongs to another team. Use a key of the team whose spend you want to see.
- **The supplied Cursor team ID does not match the validated key.** Shown when updating
  credentials. Connect that team as a new connection.
