Skip to main content

Connect your AI spend

Integrations bring provider costs and usage into Infracost AI. Start with the billing sources that cover your spend. Then add telemetry for details from coding agents and applications.

The catalog in Integrations > Add integration has three sections: Billing and subscriptions, AI gateways, and Telemetry. Only organization admins and owners can add integrations.

Billing and subscriptions

Choose a source from Billing and subscriptions. Enter a connection name and the credentials the form asks for. You can use Test credential to check access first. Then click Add integration, or Connect AWS Bedrock for Bedrock. For connections that use credentials, Infracost AI checks access and starts the first import automatically. Use Sync now on the integration to refresh it later. CSV uploads and subscription fees work differently.

IntegrationWhat to provideWhat it imports
AnthropicA Claude Console API key with Organization scope, a Claude Enterprise Analytics API key, or a spend CSV downloaded from AnthropicClaude API costs and tokens, plus Claude Code activity where available. For Claude Enterprise, usage costs and tokens by model and product.
AWS BedrockAn existing Infracost Cloud AWS connection, or an IAM role ARN and external IDBedrock spend from AWS Cost Explorer.
Azure AI FoundryThe tenant ID, client ID, and client secret value of a Microsoft Entra app registration with the Cost Management Reader role, and the subscription IDAzure model charges by day and resource. USD billing only.
CursorTeam admin API keyTeam usage and developer activity.
GitHub CopilotThe billing account type, the GitHub account name, and a fine-grained personal access tokenCopilot charges after discounts. These reports do not include token counts.
OpenAI APIOpenAI organization Admin keyAPI costs by project, and completions usage by project and model. ChatGPT subscriptions are not included.

Providers differ in how much history they offer and how long they take to report data. Scheduled syncs build your history in Infracost AI. But a new connection cannot get data the provider no longer makes available.

Anthropic

Choose Connect automatically to import reports from Anthropic, then choose where you use Claude:

  • Claude Console (API): Ask a Console organization admin to create a service account for Infracost AI, and add it to the workspaces you want to track. Do not give the account the Admin role. Create an API key linked to that account and set its scope to Organization. Workspace-scoped keys cannot read the cost reports, and Admin API keys are not accepted.
  • Claude Enterprise: Ask your primary owner to create a key in the claude.ai organization settings with only read:analytics selected. Automatic imports support usage-based Enterprise plans, and the form asks you to confirm that your plan bills for usage. For a seat-based plan, upload a CSV instead.

Choose Upload a CSV and pick a spend report downloaded from Anthropic, up to 2 MB. Enter the report period and what the amounts represent, then click Preview report and Import report. The report's totals cover the whole period, so they appear separately in Explore without a daily breakdown.

Subscription fees

The Anthropic and GitHub Copilot cards also let you add fixed subscription fees from your invoice, such as Claude Pro, Max, Team, or Enterprise fees. You do not need an API key or token for this. Enter the fee for each billing month. Entries do not repeat, so add each month you want to count. Subscription fees are included in Billed costs. If the integration's billing report already includes a subscription charge for a month, your entry for that month is kept but not added to spend. Enter the subscription fee only, without API or usage charges, and do not add the same fee to another integration.

AWS Bedrock

If your organization has an AWS integration in Infracost Cloud and has never had a Bedrock integration, including an archived one, Infracost AI tries to connect Bedrock automatically when someone in your organization opens it. It uses the first AWS management account connection it can access and starts importing. If Bedrock does not appear under Integrations, connect it yourself as described below.

To connect Bedrock yourself, choose Use an existing connection under How would you like to connect?, then pick the AWS connection that covers your Bedrock spend. Infracost AI reads the role details from that connection each time it syncs. It automatically uses any credentials you replace there. You cannot select connections that are unavailable or already connected. An existing connection can also import token usage from the member accounts it can access.

To set up a role manually, choose Enter role details. A role you enter this way imports billing data only.

Create an IAM role in the AWS management account that owns the Cost Explorer data. Open Show setup instructions to get the trust and permissions policies. The external ID in the trust policy must match the value entered in the connection. The role needs ce:GetCostAndUsage and ce:GetDimensionValues. During the private preview phase, send the new role's ARN to support@infracost.io so they can allow Infracost AI to assume it. A role that already works with Infracost Cloud may still need this step.

Enter the role ARN and external ID, use Test credential, then click Connect AWS Bedrock.

AI gateways

Choose LiteLLM or Kong AI Gateway from AI gateways to import usage for traffic through your gateway. Gateways estimate costs using their own prices, so these costs appear in Notional, not Billed. What you were charged comes from your providers' billing. If you also import a provider's bill, compare the two amounts instead of adding them.

IntegrationWhat to provideWhat it imports
LiteLLMProxy URL, and a virtual key with access to the /spend endpoints or the proxy's master keyUsage and costs for each request, as reported by the proxy.
Kong AI GatewayKonnect personal access token, and your Konnect region if it is not usDaily token usage and cost estimates from Konnect Advanced Analytics. The first import includes up to 32 days of history.

For LiteLLM, Infracost AI must be able to reach the proxy URL. For Kong AI Gateway, the token's user needs access to Advanced Analytics, and Advanced Analytics data collection must be turned on for the control planes running AI Gateway. The region must match the Konnect organization.

Manage a connection

Open a connection from Integrations to check its Import status or latest activity. Organization admins and owners can also change its name, replace credentials, run Sync now, or manage connection tokens. Leave credential fields blank to keep the current credentials. For Bedrock, use Change connection or Replace role details in the AWS connection section instead.

For telemetry connections, you can create and revoke connection tokens. Create a replacement and update the clients that use the old token. Check that data arrives before revoking the old token. You cannot revoke a connection's only token.

Remove integration offers two choices:

  • Archive and keep data stops collecting new data and keeps the recorded spend. You can restore an archived integration later.
  • Delete integration and data permanently removes the integration and its recorded spend, which changes past totals in Explore. The dialog asks you to type the connection name to confirm.

Review cost overlaps

Two integrations can report the same requests. For example, a coding agent can report usage that also appears in its provider's billing or analytics API.

Open Integrations > Configure overlaps to review detected overlaps. Infracost AI compares recent usage from the last 14 days. The page shows coverage. Where available, How we checked for overlap explains the measurements used.

If a detected pair actually represents separate activity, an organization admin or owner can click Mark as separate. Use Undo to remove that correction. A percentage describes the measured overlap; it does not mean every request or every dollar is attributable to the second source.

Troubleshooting

Credentials test successfully, but there is no spend

Check Import status on the integration, or run Sync now and check the result. Check that the connected account or billing scope has the expected activity. Then check the date range and cost mode in Explore. Billing data may arrive after the activity it covers.

A sync fails

Check the latest error on the integration. Make sure the credential is still valid and has the required billing permissions. Check that any proxy you set up can be reached. Replace the credential or fix the settings, then run another sync. For a Bedrock integration that uses an Infracost Cloud AWS connection, use Repair in Infracost Cloud when it appears.

An integration is missing from the catalog

Use Request an integration in the catalog to tell us which provider or tool you need.