Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Subscription spend connectors

Spend visibility for closed clients without intercepting their traffic.

What a connector does

A connector adds visibility, not routing. It imports vendor usage metadata such as time, user, model, tokens, native units, and reported cost. It never imports prompts, responses, source code, or attachments.

Imported usage stays separate from gateway spend. It does not add gateway requests, consume token caps, change routing, or enter API-billing rollups. Each vendor's units remain separate.

Observations stay in your deployment's Postgres table anyray_spend_connector_events, not an Anyray-hosted store. Content fields are removed before storage and GDPR export. Rows are kept for at most 90 days, or the shorter ANYRAY_SPEND_RETENTION_DAYS value, even after credentials are removed. The owner-only get /admin/gdpr/users/:user/export and delete /admin/gdpr/users/:user endpoints include or erase exact matches on record.attribution.user / userId. Tenant SSO users cannot view or delete these deployment-wide rows.

The gateway polls automatically. Only one replica polls at a time, and retries do not duplicate rows. Sync now requests an immediate poll but does not interrupt one already running.

The console's Imported usage · last 30 days section reports each source in its native units. Cursor separates model list value from paid extra; GitHub's credit list value is labeled as a public rate rather than invoice spend. Imported Cursor Team/Opus events never appear as gateway traces or optimizer savings because the corresponding model requests did not traverse Anyray.

Configure a source

Open Settings → Providers and scroll to Subscription spend connectors. Connectors apply to the whole deployment. In fleet mode, only the deployment owner can manage them; tenant SSO users cannot. In a single-tenant deployment, config:read can view totals and security_admin or owner can change credentials.

Credentials are encrypted using the deployment admin token and are never returned by the API. After rotating the admin token, re-enter connector credentials.

SourceCredential and permissionImported unitsNative traffic
Cursor Team/EnterpriseA team administrator creates an admin:* key under Cursor dashboard API Keys. Cursor's Team pricing page advertises Admin API usage stats, but its API overview marks the Admin API Enterprise-only. Test the key against /teams/filtered-usage-events before enabling the connector.Per-event users, models, tokens, request units, and Cursor-reported cost.Cursor-hosted native model traffic remains on Cursor.
Devin EnterpriseUse a service-user bearer token with the read-only ViewAccountConsumption permission.Closed-day ACUs and Devin's per-product ACU breakdown.Native Devin sessions remain on Devin.
GitHub Copilot Business/EnterpriseEnable usage metrics. Use an organization or enterprise token with Copilot metrics: read; classic tokens need GitHub's documented billing/enterprise read scope.Per-user/day activity, interactions, generations, acceptances, AI credits, public list value, and CLI tokens when present. List value is not an invoice total.Native chat, inline completions, and other Copilot surfaces remain on GitHub.

See the vendors' current permission and schema references before issuing a credential:

Use a dedicated least-privilege credential and rotate it from the same console form. Removing a credential stops future polling; it does not rewrite historical observations. Older connector settings keep their prior enabled state. A paused source shows Configured · paused. Re-enter its credential to enable it, or remove it.

Do not promise this connector to a Cursor Team customer until its real admin:* key successfully calls /teams/filtered-usage-events. A 403 means Cursor is enforcing the Enterprise plan gate documented in its API overview. The connector adds metadata visibility only; it cannot optimize native Cursor inference.

Outbound network policy

Connectors are disabled by default. Enabling one authorizes the gateway to make outbound HTTPS requests to that vendor's official API. Allow only the hosts for sources you configure:

SourceRequired outbound HTTPS host
Cursorapi.cursor.com
Devinapi.devin.ai
GitHub Copilotapi.github.com and GitHub-issued report downloads pinned to copilot-reports.github.com

This traffic goes to the selected vendor, not Anyray. Requests contain the credential and report window; responses contain usage metadata. Connectors never read local prompts, responses, source code, or attachments.

Route the work when optimization is required

Visibility alone cannot optimize a request that never reaches the gateway. Use a supported carrier for that workload:

  • Cursor's supported OpenAI custom endpoint for eligible BYOK chat requests when the organization intentionally provides an upstream API key.
  • Cursor Team native Claude/Opus with normal anyray-connect --tools cursor setup for supported local Shell/MCP context optimization. The native model request remains Cursor-hosted.
  • The Anyray language-model provider for VS Code chat; on Copilot Business/Enterprise, native Copilot and inline completions remain visible through the GitHub connector. Individual has no official automatic native-usage connector.
  • The pinned Claude or Codex ACP agent that anyray-connect registers in JetBrains and Devin.
  • Claude Code or Codex for their respective first-party subscription seats.

These use supported app settings. Anyray never installs a CA, changes DNS or proxy settings, or uses a private vendor endpoint.