Cursor Integration
Connect your Cursor Teams account to track AI coding assistant spending in Grafient.
Overview
Grafient connects to your Cursor Teams or Business account using the Admin API to pull spending and usage data. This integration tracks your team's AI-assisted coding costs.
The Cursor integration requires a Cursor Teams or Business subscription. Individual Cursor accounts do not have API access.
Prerequisites
Before you begin, make sure you have:
- A Cursor Teams or Business subscription.
- Team admin access to create API keys.
- A Grafient account on the Free, Pro, or Ultimate plan.
Permissions and Security
Grafient requires a Cursor Admin API key. This key is used exclusively to read usage data. Grafient will never perform any actions on your Cursor account beyond reading billing metrics.
Your API key is encrypted with AES-256-GCM before storage and is never exposed after the initial connection.
Create a Connection
Step 1: Get Your Cursor Admin API Key
- Log in to cursor.com with your team admin account.
- Navigate to your team's Settings page.
- Find or generate an Admin API Key.
- Copy the key — it starts with
key_.
Step 2: Add the Key to Grafient
- In Grafient, navigate to the Integrations page from the sidebar.
- Click Add Integration.
- Select Cursor as the provider.
- Enter a label (e.g.,
Engineering Team — Cursor). - Paste the Admin API key.
- Click Test Connection — a green checkmark confirms the key is valid.
- Click Add Integration to save.
What Happens Next
Once you add the integration, Grafient will:
- Validate your API key against the Cursor API.
- Backfill historical costs — up to 30 days on Free, or 365 days on Pro/Ultimate.
- Sync daily via an automated job at 6 AM UTC to pull the previous day's data.
Data Collected
| Data Point | Description |
|---|---|
| Daily cost (USD) | Total team spend per day |
| Usage metrics | AI-assisted coding usage at the team level |
Limitations
- Individual Cursor accounts do not have API access — a Teams or Business subscription is required.
- Currently only team-level data is available via the API.
Troubleshooting
"Test Connection" fails
- Verify the key prefix: The key must start with
key_. Regular user keys will not work. - Check your role: Only team admins can create and use Admin API keys.
- Confirm subscription: Verify you have a Teams or Business subscription.
No cost data appears after sync
- Check for recent usage: If there has been no usage in the sync window, there will be no cost data to display.
- Try Force Sync: Click the refresh icon on your integration card to trigger a manual sync.