5 min per provider

Connecting Providers

StackSpend uses read-only credentials to fetch cost data from your cloud and AI providers. Nothing is modified in your accounts.

Before you start

  • You need to be an admin or owner of your StackSpend organisation.
  • You need admin or billing access to the provider account you're connecting.
  • All credentials are encrypted at rest using AES-256-GCM. StackSpend uses read-only access only.

Adding a provider

Navigate to Settings → Providers in your dashboard and click Add Provider. Select the provider type from the list below and follow the steps.

Uses the Cost Explorer API with a read-only IAM role. Supports multi-account setups via AWS Organizations.

  1. 1In your AWS account, create a new IAM role with the CostExplorerReadOnlyAccess policy.
  2. 2Set the trust policy to allow StackSpend's AWS account to assume the role.
  3. 3Copy the Role ARN and paste it into the StackSpend provider connection form.
  4. 4Click Test Connection to verify access, then Save.

Uses BigQuery billing export. StackSpend auto-detects your billing export tables.

  1. 1Enable Cloud Billing API in your GCP project.
  2. 2Create a service account with Billing Account Viewer (at the billing account level), BigQuery Job User (at the project level), and BigQuery Data Viewer (at the dataset level).
  3. 3Download the service account JSON key.
  4. 4Upload the key in the StackSpend provider connection form and click Test Connection.

Uses the Cost Management Query API with service principal authentication.

  1. 1Register an app in Azure Active Directory.
  2. 2Grant the app Cost Management Reader role on the subscription or management group.
  3. 3Copy the Tenant ID, Client ID, and Client Secret.
  4. 4Enter these in the StackSpend provider connection form and click Test Connection.

Reads usage data from the OpenAI API using a read-only API key.

  1. 1Go to the OpenAI dashboard and create a new API key (or use an existing one).
  2. 2The key only needs read access to usage and billing data.
  3. 3Paste the API key into the StackSpend provider connection form.
  4. 4Click Test Connection to verify, then Save.

Reads usage data from the Anthropic API.

  1. 1Go to the Anthropic console and generate an API key.
  2. 2Paste the API key into the StackSpend provider connection form.
  3. 3Click Test Connection to verify, then Save.

Uses the Cursor Admin API. Requires an Enterprise plan and team admin access.

  1. 1In your Cursor team settings, navigate to the Admin API section.
  2. 2Generate an API key.
  3. 3Paste the API key into the StackSpend provider connection form.
  4. 4Click Test Connection to verify, then Save.

Uses the GitHub Billing API. Requires an organisation account with owner or admin access.

  1. 1Create a Personal Access Token (classic) with read:org, read:user, and manage_billing:enterprise scopes.
  2. 2For Copilot billing, also add manage_billing:copilot scope.
  3. 3Enter your organisation name and the token in the StackSpend provider connection form.
  4. 4Click Test Connection to verify, then Save.

Hugging Face

Detailed guide

Uses the Hugging Face billing API. Requires an organisation with owner or admin access.

  1. 1Create a Fine-grained token with User permission "Read access to your billing usage..." and Org "Read access to organizations settings", or use a Read token.
  2. 2Enter your organisation slug and the token in the StackSpend provider connection form.
  3. 3Click Test Connection to verify, then Save.

Grok (xAI)

Detailed guide

Uses the xAI Management API for billing. Requires a Management API key (not the inference API key) and Team ID.

  1. 1Go to xAI Console → Settings → Management Keys and create a Management API key.
  2. 2Find your Team ID in the console URL (e.g. console.x.ai/team/default).
  3. 3Enter the Management API key and Team ID in the StackSpend provider connection form.
  4. 4Click Test Connection to verify, then Save.

Uses the Twilio Usage Records API with Account SID and Auth Token.

  1. 1Log in to the Twilio Console and find your Account SID and Auth Token.
  2. 2Enter both values in the StackSpend provider connection form.
  3. 3Click Test Connection to verify, then Save.

After connecting

Once a provider is connected, StackSpend begins syncing historical cost data. The first sync typically takes a few minutes depending on the size of your billing history.

After the initial sync, costs are updated automatically on a daily schedule. You can also trigger a manual sync from the provider settings page.

Know where your cloud and AI spend stands — every day, starting today.

Sign up
Connecting Providers — User Guides — StackSpend