# LevelFour > LevelFour is a cloud cost optimization platform. It finds savings in your > cloud bill, and applies the ones you accept. These docs cover setting up and > using LevelFour, the REST API, the official SDKs, the `l4` CLI, and the remote > MCP server. ## How to read these docs Every page below is available as Markdown, at the URL listed against it. Append `.md` to any documentation URL, or send `Accept: text/markdown` to the page itself. The home page is served at `/index.md`, since `/.md` is not a path. Other entry points: - MCP server: `https://mcp.levelfour.ai/mcp`, read and write tools over your spend and savings - REST API: `https://api.levelfour.ai`, authenticated with `Authorization: Bearer l4_live_` - OpenAPI: `https://api.levelfour.ai/openapi.json` - SDKs: `pip install levelfour`, `npm install levelfour`, `go get github.com/LevelFourAI/levelfour-go` ## Product Docs: Get Started - [LevelFour Documentation](https://docs.levelfour.ai/index.md): Set up LevelFour, connect the providers you pay for, and turn the savings it finds into changes you approve. - [Quickstart](https://docs.levelfour.ai/quickstart.md): Sign in, connect your first provider, and see your costs and first savings recommendations. ## Product Docs: Provider Connectors - [All connectors](https://docs.levelfour.ai/connectors.md): Every provider you can connect to LevelFour, grouped by category. - [Connect AWS](https://docs.levelfour.ai/connectors/aws.md): Pick the AWS path that matches your account layout, then add detailed cost data and Automated Savings when you want them. - [Single account](https://docs.levelfour.ai/connectors/aws/single-account.md): Connect one AWS account to LevelFour in a click from the dashboard, or with a CloudFormation Launch Stack link. Covers the two IAM roles the stack creates and how to revoke them. - [Multi-account](https://docs.levelfour.ai/connectors/aws/multi-account.md): Onboard every AWS account in your organization at once, from the dashboard or by deploying one CloudFormation StackSet in the management account. - [Detailed cost data](https://docs.levelfour.ai/connectors/aws/detailed-cost-data.md): Turn on a Cost and Usage Report 2.0 data export so LevelFour can analyze granular, resource-level AWS cost data. - [Automated Savings](https://docs.levelfour.ai/connectors/aws/automated-savings.md): Add the empty LevelFourSavingsExec role that Automated Savings needs, in an account onboarded before the role existed: AWS Console, Terraform, or an AWS Organization. - [Connect projects](https://docs.levelfour.ai/connectors/gcp.md): Grant LevelFour read-only access to your Google Cloud projects with one command in your own Cloud Shell, then connect Cloud Billing export so every recommendation is priced against your real bill. - [Billing export](https://docs.levelfour.ai/connectors/gcp/billing-export.md): Turn on the Detailed usage cost export in Cloud Billing so LevelFour can analyze resource-level Google Cloud cost data. - [Committed use discounts](https://docs.levelfour.ai/connectors/gcp/committed-use-discounts.md): Turn on the Committed Use Discounts export in Cloud Billing and grant LevelFour read access, so your commitment terms, dates, and status appear alongside coverage. - [DigitalOcean](https://docs.levelfour.ai/connectors/digitalocean.md): Connect a read-only DigitalOcean personal access token to LevelFour. - [Cloudflare](https://docs.levelfour.ai/connectors/cloudflare.md): Connect a Cloudflare API token scoped to Billing Read to LevelFour. - [Azure](https://docs.levelfour.ai/connectors/azure.md): Azure is not part of the self-service onboarding flow yet. To connect a Microsoft Azure tenant today, talk to your LevelFour contact. - [Kubernetes](https://docs.levelfour.ai/connectors/kubernetes.md): How to get a Kubernetes cluster connected to LevelFour while self-service onboarding is still in development. - [OpenAI](https://docs.levelfour.ai/connectors/openai.md): See what you spend on OpenAI and who uses it. Connect the API bill, ChatGPT Enterprise, and the usage Codex and your own apps report. - [Anthropic](https://docs.levelfour.ai/connectors/anthropic.md): See what you spend on Claude, who uses it and how, whatever plan you are on. Connect the Claude API, Claude Enterprise, and the usage of Claude Code and Cowork. - [DeepSeek](https://docs.levelfour.ai/connectors/deepseek.md): See what you spend on DeepSeek and who uses it. Upload the monthly usage export as your bill, and connect the usage Claude Code, Codex and your apps report. - [Cursor](https://docs.levelfour.ai/connectors/cursor.md): Connect a Cursor Enterprise team key to LevelFour. - [Baseten](https://docs.levelfour.ai/connectors/baseten.md): Connect a Baseten team API key to LevelFour. - [Modal](https://docs.levelfour.ai/connectors/modal.md): Connect a Modal workspace token to LevelFour. - [Hugging Face](https://docs.levelfour.ai/connectors/huggingface.md): Connect a Hugging Face organization access token to LevelFour. - [Anyscale](https://docs.levelfour.ai/connectors/anyscale.md): Connect an Anyscale service account key and your contracted credit rate to LevelFour. - [GitHub billing](https://docs.levelfour.ai/connectors/github-billing.md): Install the LevelFour Billing GitHub App. - [GitLab billing](https://docs.levelfour.ai/connectors/gitlab-billing.md): Connect a GitLab personal access token and your contracted rates to LevelFour. - [Slack billing](https://docs.levelfour.ai/connectors/slack-billing.md): Enter your Slack contract amount. - [CircleCI](https://docs.levelfour.ai/connectors/circleci.md): Connect a CircleCI personal API token and your contracted credit price to LevelFour. - [Temporal Cloud](https://docs.levelfour.ai/connectors/temporal.md): Connect a Temporal Cloud service account API key to LevelFour. - [Twilio](https://docs.levelfour.ai/connectors/twilio.md): Connect a Twilio API key to LevelFour. - [Datadog](https://docs.levelfour.ai/connectors/datadog.md): Connect a Datadog application key scoped to usage and billing reads to LevelFour. - [Snowflake](https://docs.levelfour.ai/connectors/snowflake.md): Run a LevelFour-generated script in Snowflake. - [Databricks](https://docs.levelfour.ai/connectors/databricks.md): Run a LevelFour-generated script in Databricks. - [ClickHouse Cloud](https://docs.levelfour.ai/connectors/clickhouse.md): Connect a ClickHouse Cloud organization API key scoped to billing to LevelFour. - [MongoDB Atlas](https://docs.levelfour.ai/connectors/mongodb.md): Connect a MongoDB Atlas service account scoped to billing to LevelFour. - [Redis Cloud](https://docs.levelfour.ai/connectors/redis.md): Connect a Redis Cloud account key and user key to LevelFour. - [Grafana Cloud](https://docs.levelfour.ai/connectors/grafana.md): Connect a Grafana Cloud access policy token to LevelFour. - [New Relic](https://docs.levelfour.ai/connectors/newrelic.md): Connect a New Relic user key and your contracted rates to LevelFour. - [Elastic Cloud](https://docs.levelfour.ai/connectors/elastic.md): Connect an Elastic Cloud API key scoped to billing to LevelFour. - [Custom FOCUS import](https://docs.levelfour.ai/connectors/custom-focus.md): Upload a FOCUS-formatted cost file for a provider LevelFour does not connect to directly. - [Add a recurring cost](https://docs.levelfour.ai/connectors/custom-recurring.md): Enter a flat monthly amount for a provider LevelFour does not connect to directly, with no file to prepare. ## Product Docs: App Integrations - [All integrations](https://docs.levelfour.ai/integrations.md): Connect the tools your team already works in, so LevelFour can comment on pull requests, post alerts, and open tickets. - [GitHub](https://docs.levelfour.ai/integrations/github.md): Install LevelFour as a GitHub App on your organization. One install covers both the PR bot and the savings pull requests LevelFour opens. - [GitLab](https://docs.levelfour.ai/integrations/gitlab.md): Authorize LevelFour on GitLab over OAuth so it can comment cost impact on merge requests and open merge requests with savings changes. - [Pull request bot](https://docs.levelfour.ai/integrations/pull-request-bot.md): What the LevelFour bot posts on GitHub pull requests and GitLab merge requests that change Terraform or CloudFormation, and the commands you can reply to it with. - [Slack](https://docs.levelfour.ai/integrations/slack.md): Add the LevelFour agent to your Slack workspace to ask about your Cloud, SaaS and AI spend, and to get your cost alerts there. - [Jira](https://docs.levelfour.ai/integrations/jira.md): Authorize LevelFour on Jira over OAuth so you can file an issue from a savings recommendation. ## Product Docs: Using LevelFour - [Boards](https://docs.levelfour.ai/boards.md): The home screen of the dashboard, where each board is a grid of cost, allocation, savings and anomaly cards you can rearrange and filter. - [Costs and Usage](https://docs.levelfour.ai/cost-and-usage.md): One page per connected provider, with spend so far this month, spend over time, and a breakdown you can group by service, account, tag or virtual tag. - [Savings Recommendations](https://docs.levelfour.ai/savings-recommendations.md): Review the savings LevelFour finds on your connected accounts, decide on each one, and choose which resources it covers before it runs. - [Implementation methods](https://docs.levelfour.ai/savings-recommendations/implementation-methods.md): The four ways an approved saving reaches your cloud, and what each one needs before it can run. - [Approvals and rollout](https://docs.levelfour.ai/savings-recommendations/approvals-and-rollout.md): Who can approve a saving, how a member asks an admin to, what runs after approval, and how to follow and retry a run. - [Commitments](https://docs.levelfour.ai/commitments.md): Your AWS Reserved Instances and Savings Plans in one place, with how much of each you use and what expires next. - [Renewing a commitment](https://docs.levelfour.ai/commitments/renewals.md): Price the replacement for an expiring Reserved Instance or Savings Plan, choose its terms and how it is delivered, and approve the purchase. - [Virtual tags](https://docs.levelfour.ai/virtual-tags.md): Create and edit virtual tags in the dashboard, preview what a tag claims before you save it, and see which cost it leaves unallocated. - [Savings Audit](https://docs.levelfour.ai/savings-audit.md): Every saving LevelFour has put in place, what each one saves a month, and who asked for and approved it. - [Billing](https://docs.levelfour.ai/billing.md): How LevelFour bills through AWS Marketplace, what the Billing page shows, and where to download your statements. - [FinOps Agent](https://docs.levelfour.ai/finops-agent.md): Ask questions about your cloud spend, savings and commitments in plain language, in the dashboard, and approve a saving from the conversation. - [Cost alerts](https://docs.levelfour.ai/cost-alerts.md): Rules that watch your spend or your commitments and tell the right people, in the dashboard and in Slack, when a line is crossed. - [Notifications](https://docs.levelfour.ai/notifications.md): What LevelFour notifies you about, in the dashboard, in Slack and by email, and how to choose which notifications you get. ## Product Docs: Guides - [Guides](https://docs.levelfour.ai/guides.md): How to connect LevelFour to your CI, your own tools and your chat, plus configuring the PR bot and the comment box on a recommendation. - [Formatting comments](https://docs.levelfour.ai/guides/formatting-comments.md): Every Markdown syntax the LevelFour comment box understands, plus mentions, attachments, and the GitHub syntax it does not support. - [Filtering and sorting](https://docs.levelfour.ai/guides/filtering-and-sorting.md): Filter, sort, group and pipe LevelFour cost and recommendation data from the terminal, with the same parameters in the SDKs. - [Virtual tags](https://docs.levelfour.ai/guides/virtual-tags.md): Assign one tag key to every AWS and GCP cost line from ordered rules, to fix inconsistent tags, map accounts and services to owners, and split shared costs. - [GitHub Actions](https://docs.levelfour.ai/guides/github-actions.md): Workflows that comment a cost summary on a pull request, run a scheduled cost check with the Python or TypeScript SDK, and upload a daily report as a build artifact. - [PR bot configuration](https://docs.levelfour.ai/guides/pr-bot-configuration.md): How the optional .levelfour/config.yml file tunes the PR bot per repository, where it lives, every field with its default, and what it does not control. - [CI/CD Integration](https://docs.levelfour.ai/guides/ci-cd.md): Gate a pull request on cloud cost with l4 estimate and l4 diff, using ready-made workflows for GitHub Actions and GitLab CI. - [Integrate the SDK into your CLI](https://docs.levelfour.ai/guides/integrate-sdk-into-your-cli.md): Embed the LevelFour SDK as a library inside an existing internal CLI to add cost-optimization subcommands. - [Integrate l4 into your CLI](https://docs.levelfour.ai/guides/integrate-l4-into-your-cli.md): Shell out to the l4 binary from scripts, Makefiles and CI runners. Machine-readable output through --json and --jq, and stable exit codes to branch on. - [Backstage Plugin](https://docs.levelfour.ai/guides/backstage-plugin.md): Build a Backstage plugin that shows LevelFour cost data in your developer portal. - [Slack Integration](https://docs.levelfour.ai/guides/slack-integration.md): Build a receiver that verifies the signature on every LevelFour webhook event and posts it into a Slack channel, in Python or TypeScript. - [Google Chat Integration](https://docs.levelfour.ai/guides/google-chat-integration.md): Build a webhook receiver that verifies LevelFour signatures and posts each event into a Google Chat space, in Python or TypeScript. - [Scheduled Execution](https://docs.levelfour.ai/guides/scheduled-execution.md): Run a LevelFour check unattended with cron or a GitHub Actions workflow, and when to take webhooks instead of a schedule. ## Product Docs: Privacy & Security - [Security and privacy](https://docs.levelfour.ai/account/security.md): How LevelFour connects to your accounts, protects your data and uses AI, and how to request a security review or report a vulnerability. - [Members and roles](https://docs.levelfour.ai/account/members-and-roles.md): The three roles in a LevelFour organization, what each one can do, and how an admin changes a role or removes someone. - [Enterprise SSO (SAML)](https://docs.levelfour.ai/account/sso.md): Sign your team in with your own identity provider over SAML 2.0: the values you exchange with LevelFour, the attributes your IdP must send, and how to set it up in Google Workspace. - [API keys](https://docs.levelfour.ai/account/api-keys.md): Create, rotate and revoke the API keys your code, the l4 CLI and CI jobs use, from Settings in the dashboard. ## Developers: Get Started - [API Quickstart](https://docs.levelfour.ai/api-quickstart.md): Install a LevelFour SDK for Python, TypeScript or Go, point it at an API key, and make your first call. - [Authentication](https://docs.levelfour.ai/authentication.md): What an API key reaches, which scope it needs, where to put it so the SDKs find it, and how to tell it is live. ## Developers: SDKs - [SDK Overview](https://docs.levelfour.ai/sdks.md): Python, TypeScript and Go side by side: packages and minimum versions, the constructor options under each language's names, and where each client hangs the shared resources. - [Python SDK](https://docs.levelfour.ai/sdks/python.md): The Python client for the LevelFour API: the sync and async constructors, the options they take, and how to override them for one call. - [TypeScript SDK](https://docs.levelfour.ai/sdks/typescript.md): Installing and constructing the TypeScript client, and the behavior that is specific to it. Constructor and per-request options, raw responses, pagination, errors and webhook verification. - [Go SDK](https://docs.levelfour.ai/sdks/go.md): Every namespace on the Go client, the options NewClient takes, the iterator its paginated methods return, and the typed errors errors.As matches. ## Developers: CLI - [CLI Overview](https://docs.levelfour.ai/cli.md): The l4 command line tool. Install it, sign in, and run your first commands, then the command groups, the global flags every command takes, and the exit codes to script against. - [Installation](https://docs.levelfour.ai/cli/installation.md): Get l4 onto a laptop or a CI image with Homebrew, go install or a prebuilt archive, and confirm the install worked. - [Authentication](https://docs.levelfour.ai/cli/authentication.md): How l4 resolves a credential on every command, and why browser login is not enough for the write commands. - [Output formats](https://docs.levelfour.ai/cli/output-formats.md): Every command takes the same output flags, from the default table to JSON, an in-process jq filter, a Go template, CSV from the export commands, or nothing but an exit code. - [l4 costs](https://docs.levelfour.ai/cli/commands/costs.md): View cloud cost summaries, breakdowns, daily and monthly aggregations, and the filter dimensions you can drill into. - [Overview](https://docs.levelfour.ai/cli/commands/recommendations.md): List, filter, view, and act on savings recommendations from the terminal. - [l4 rec accept](https://docs.levelfour.ai/cli/commands/recommendations/accept.md): Accept a savings recommendation from the terminal. Records the decision, the approver and the timestamp, and changes nothing in your cloud account. - [l4 rec reject](https://docs.levelfour.ai/cli/commands/recommendations/reject.md): Reject a savings recommendation from the terminal, with an optional reason and free-text explanation. - [l4 rec execute](https://docs.levelfour.ai/cli/commands/recommendations/execute.md): Request execution of an accepted savings recommendation from the terminal. Records the implementation method; the rollout itself runs server-side. - [Overview](https://docs.levelfour.ai/cli/commands/commitments.md): Read your Reserved Instance, Savings Plan and Committed Use Discount position from the terminal: coverage, utilization, what expires, and what to buy next. - [l4 commitments coverage](https://docs.levelfour.ai/cli/commands/commitments/coverage.md): How much of the eligible bill a commitment covers, weighted by the dollars behind each figure, with the on-demand remainder beside it. - [l4 commitments expiring](https://docs.levelfour.ai/cli/commands/commitments/expiring.md): List the commitments whose term ends inside a window, and fail a pipeline when one is too close to lapsing. - [l4 commitments renewal](https://docs.levelfour.ai/cli/commands/commitments/renewal.md): Size the repurchase for a commitment that is about to end, and get the instant to buy after rather than a date. - [Overview](https://docs.levelfour.ai/cli/commands/tags.md): Read provider and virtual tag keys, check tag coverage, and manage virtual tags from YAML files in the terminal. - [l4 tags list](https://docs.levelfour.ai/cli/commands/tags/list.md): List provider and virtual tag keys with their value count, resource count, spend and share of spend. - [l4 tags show](https://docs.levelfour.ai/cli/commands/tags/show.md): Print one tag key. For a virtual key, its collapsed keys and configs in evaluation order, spend per value, unallocated spend, dependent keys and the latest reprocessing job. - [l4 tags coverage](https://docs.levelfour.ai/cli/commands/tags/coverage.md): Report the share of spend and of resources that carry a tag, from provider tags alone and with virtual tags added. - [l4 tags resources](https://docs.levelfour.ai/cli/commands/tags/resources.md): List the resources that carry a tag key, with the value each one holds, how it got that value, and its spend. - [l4 tags costs](https://docs.levelfour.ai/cli/commands/tags/costs.md): Spend per value of a provider or virtual tag key, with each value's share, its split across service categories, and the spend that carries no value. - [l4 tags preview](https://docs.levelfour.ai/cli/commands/tags/preview.md): Dry-run a virtual tag file against your recent costs. Shows the spend each value would take and the spend left unallocated, and stores nothing. - [l4 tags apply](https://docs.levelfour.ai/cli/commands/tags/apply.md): Create or replace a virtual tag key from a YAML file. Prints the difference against the saved key first, then reprocesses the key's costs from its backfill month. - [l4 tags delete](https://docs.levelfour.ai/cli/commands/tags/delete.md): Delete a virtual tag key and every value it assigned. Provider tags stay untouched, and a key another key reads cannot be deleted. - [Overview](https://docs.levelfour.ai/cli/commands/alerts.md): List, read, create, change, pause, resume and delete cost alerts from the terminal, with rules kept as JSON files. - [l4 alerts create](https://docs.levelfour.ai/cli/commands/alerts/create.md): Create a cost alert from a JSON rule file, or from a rule piped in on stdin. - [l4 alerts update](https://docs.levelfour.ai/cli/commands/alerts/update.md): Change a cost alert's name, rule, source, recipients or Slack channels from a JSON file of only the fields to change. - [l4 alerts delete](https://docs.levelfour.ai/cli/commands/alerts/delete.md): Delete a cost alert and the history of everything it said. Pause it instead to keep that history. - [l4 mcp](https://docs.levelfour.ai/cli/commands/mcp.md): Wire the agent clients on this machine to the LevelFour MCP server: install it, check it, remove it, or serve it locally. - [l4 mcp install](https://docs.levelfour.ai/cli/commands/mcp/install.md): Add the LevelFour MCP server to the agent clients on this machine, without hand-editing JSON. - [l4 mcp uninstall](https://docs.levelfour.ai/cli/commands/mcp/uninstall.md): Remove the LevelFour MCP server from your agent clients, and delete the dated backups that may still hold an old key. - [l4 mcp serve](https://docs.levelfour.ai/cli/commands/mcp/serve.md): Serve the hosted LevelFour MCP server over stdin and stdout, for clients that only start local processes. - [l4 mcp status](https://docs.levelfour.ai/cli/commands/mcp/status.md): Show which agent clients on this machine carry a LevelFour entry, what each one points at, and which credential l4 resolves. - [l4 integrations](https://docs.levelfour.ai/cli/commands/integrations.md): List the cloud providers connected to your LevelFour organization. - [l4 status](https://docs.levelfour.ai/cli/commands/status.md): Show LevelFour API health and the evaluation status of your account. - [l4 estimate](https://docs.levelfour.ai/cli/commands/estimate.md): Estimate the monthly cost of Terraform and CloudFormation before resources are created. - [l4 diff](https://docs.levelfour.ai/cli/commands/diff.md): Show how a Terraform or CloudFormation change moves monthly cloud cost, measured against a git ref or a saved snapshot. - [l4 export](https://docs.levelfour.ai/cli/commands/export.md): Bulk-export costs and recommendations to CSV or JSON for spreadsheets, BI tools, or archival. - [l4 api](https://docs.levelfour.ai/cli/commands/api.md): Send an authenticated request to any LevelFour API endpoint, including the ones no dedicated subcommand wraps yet. - [l4 config](https://docs.levelfour.ai/cli/commands/config.md): Read and write the CLI's persistent defaults, and see which layer (flag, environment variable, file, built-in) is supplying each value. - [l4 telemetry](https://docs.levelfour.ai/cli/commands/telemetry.md): Opt in or out of crash telemetry, what a crash report carries, what is scrubbed from it, and why some builds send nothing even after you opt in. - [Recipes](https://docs.levelfour.ai/cli/recipes.md): Shell pipelines for the LevelFour CLI: paging through every recommendation, aggregating with jq, and archiving a month of costs as CSV. ## Developers: MCP - [MCP Overview](https://docs.levelfour.ai/mcp.md): A remote MCP server over your cloud spend, savings backlog, and realized savings. Most tools read; the rest record a decision. Connect by signing in, no key to copy. - [Connecting a client](https://docs.levelfour.ai/mcp/authentication.md): Connect Claude Code, Claude, Cursor, VS Code, Windsurf or any MCP client, by signing in or with an API key. - [Approving a connection](https://docs.levelfour.ai/mcp/approving-a-connection.md): What the LevelFour approval screen asks, why some applications carry an unreviewed notice, and when to refuse. - [Tools](https://docs.levelfour.ai/mcp/tools.md): Every LevelFour MCP tool, with its parameters, types, enums, and defaults. 39 read and 21 write. - [Reading a result](https://docs.levelfour.ai/mcp/results.md): What the tools return, the pagination envelope every list shares, how truncation is reported, and what an error looks like. - [Prompts and resources](https://docs.levelfour.ai/mcp/prompts-and-resources.md): The prompts and resources the server ships alongside its tools, so a model stops guessing at method and at values. - [Ask it this](https://docs.levelfour.ai/mcp/ask-it-this.md): Prompts that work as written against the LevelFour MCP server, the tools each one lands on, and the questions the server cannot answer. ## Developers: Reference - [API Reference](https://docs.levelfour.ai/api-reference.md): Where the LevelFour REST API lives, the Bearer token every request carries, the envelope every response comes back in, and the endpoint reference by category. - [Auth](https://docs.levelfour.ai/api-reference/auth.md): Confirm which organization, plan and role a key resolves to. - [Get Whoami](https://docs.levelfour.ai/api-reference/auth/get-auth-whoami.md) - [Providers](https://docs.levelfour.ai/api-reference/providers.md): Per-provider data for recommendations, costs, and savings. - [Get provider service breakdown](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-costs-breakdown.md): Returns service breakdown in different formats: table (paginated), chart (aggregated), csv (export), raw (all records) - [Get provider cost dimensions](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-costs-dimensions.md): The groupings, filters and cost metrics the provider's cost breakdown answers, each under the name the provider gives it. The dashboard builds the Cost Breakdown's menus from this. - [Get provider spending filter options](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-costs-filter-options.md): Returns available values for every filter dimension. Dimensions cross-constrain each other (AWS Cost Explorer behavior); each dimension excludes its own selections when computing its option list. - [Get provider invoice months](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-costs-invoices.md): Returns spend per invoice month split by cost type (regular, tax, adjustment, rounding). Google Cloud only; other providers return no months. - [Get provider spending summary](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-costs-summary.md): Returns spending summary for a specific cloud provider - [Get provider spending timeline](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-costs-timeline.md): Returns spending timeline for a specific provider - [Get provider potential savings breakdown](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-potential-savings-breakdown.md): Returns paginated potential savings breakdown for a specific provider - [Get provider potential savings summary](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-potential-savings-summary.md): Returns potential savings summary for a specific provider - [Get Savings Audit breakdown by provider](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-recommendations-audit-breakdown.md): Returns saved recommendations for a provider as paginated JSON (format=table) or a CSV download of the full filtered set (format=csv) - [Get provider-specific Savings Audit summary](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-recommendations-audit-summary.md): Returns saved summary totals for a specific provider (for BigNumbers) - [Get provider recommendation filter options](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-recommendations-filter-options.md): Returns distinct environments, accounts, and tags for recommendation filtering - [Get provider recommendations overview](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-recommendations-overview.md): Returns overview metrics (total spend, available/pending savings, saved ITD) for a provider - [Get provider-specific recommendations summary](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-recommendations-summary.md): Returns top 7 recommendations for a specific cloud provider - [Get provider top savers](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-recommendations-top-savers.md): Returns the top users by realized (captured) savings for a provider, ranked descending (max 3) - [Get provider-specific recommendations breakdown](https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-recommendations.md): Returns paginated breakdown of recommendations for a specific provider - [List connected cloud providers](https://docs.levelfour.ai/api-reference/providers/get-providers.md) - [Costs](https://docs.levelfour.ai/api-reference/costs.md): Spend summaries, breakdowns, trends, usage, allocation and forecasts. - [Tag allocation coverage](https://docs.levelfour.ai/api-reference/costs/get-costs-allocation.md): Returns showback coverage for a tag key: total, tagged, untagged, coverage percentage, and a per-value breakdown. - [Get cost breakdown](https://docs.levelfour.ai/api-reference/costs/get-costs-breakdown.md): Returns cost breakdown in different formats: table (paginated), chart (aggregated), csv (export), raw (all records) - [Google Cloud cost by a hierarchy of labels](https://docs.levelfour.ai/api-reference/costs/get-costs-by-labels.md): Returns Google Cloud spend grouped by up to three label keys at once, for example cluster, namespace and workload. A resource label wins over the same key set on its project. - [List distinct tag keys](https://docs.levelfour.ai/api-reference/costs/get-costs-by-tag-keys.md): Returns the distinct provider tag keys present in the tenant's per-tag cost data and every virtual tag key, so the dashboard can offer both as choices. A provider key that a virtual key of the same name replaces is left out. - [Cost grouped by tag value](https://docs.levelfour.ai/api-reference/costs/get-costs-by-tag.md): Returns spend grouped by tag_value for a given tag_key (e.g., team, tribe, squad, cost-center). Includes a per-team category breakdown. - [Get daily spending breakdown](https://docs.levelfour.ai/api-reference/costs/get-costs-daily-breakdown.md): Returns daily spending aggregated per day for the given date range - [Get spend forecast](https://docs.levelfour.ai/api-reference/costs/get-costs-forecast.md): Returns forecasted spend value, confidence bounds, and a 60-point sparkline (past 30 days actual + next 30 days forecast). - [Get monthly spending](https://docs.levelfour.ai/api-reference/costs/get-costs-monthly-spending.md): Returns monthly spending aggregated per month - [Get spending summary](https://docs.levelfour.ai/api-reference/costs/get-costs-summary.md): Returns spending summary: overall costs, forecast, savings, and provider breakdown - [Top growing services](https://docs.levelfour.ai/api-reference/costs/get-costs-top-growing.md): Returns services ranked by largest percent growth between current and previous period. - [Usage and unit economics by usage type](https://docs.levelfour.ai/api-reference/costs/get-costs-usage.md): Returns spend, billable quantity, unit, and derived cost per unit grouped by usage type. - [Google Cloud](https://docs.levelfour.ai/api-reference/google-cloud.md): Google Cloud inventory, utilization, budgets, access and data availability. - [What the LevelFour service account can read in Google Cloud](https://docs.levelfour.ai/api-reference/google-cloud/get-providers-gcp-access.md): probe rows come from IAM testIamPermissions; script_report rows are what a connect script applied. - [Cloud Billing budgets with spend from the billing export](https://docs.levelfour.ai/api-reference/google-cloud/get-providers-gcp-budgets.md) - [Which Google Cloud datasets hold data for this tenant](https://docs.levelfour.ai/api-reference/google-cloud/get-providers-gcp-data-availability.md): The Google Cloud board shows a card only when the dataset behind it is true. - [Count Google Cloud resources by type, region or project](https://docs.levelfour.ai/api-reference/google-cloud/get-providers-gcp-inventory-breakdown.md) - [Label coverage of Google Cloud resources](https://docs.levelfour.ai/api-reference/google-cloud/get-providers-gcp-inventory-label-hygiene.md): System labels (goog-*) never count as labeled. - [Resources that bill while doing nothing](https://docs.levelfour.ai/api-reference/google-cloud/get-providers-gcp-inventory-waste-signals.md): Stopped VMs whose disks still bill, unattached disks, reserved addresses nobody uses and snapshots older than 90 days. - [Which projects and metrics Cloud Monitoring answered for](https://docs.levelfour.ai/api-reference/google-cloud/get-providers-gcp-utilization-coverage.md) - [Daily utilization of one resource](https://docs.levelfour.ai/api-reference/google-cloud/get-providers-gcp-utilization-series.md) - [Utilization bands for VMs, Cloud SQL and GKE](https://docs.levelfour.ai/api-reference/google-cloud/get-providers-gcp-utilization-summary.md) - [Anthropic](https://docs.levelfour.ai/api-reference/anthropic.md): Claude Code and Cowork usage, activity and cost from a connected Anthropic organization. - [Claude Code activity per day](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-activity-daily.md): Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. A series per key of the measures the board charts (session, active_time, prompt, permission_mode, api_error, lines, git_output). Every day of the range has a value, zero on a day nothing was reported. - [The Claude Code installs of the people who used Claude](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-activity-fleet.md): The people counted are the ones who reported usage in the range. A profile is kept per person, not per install: someone with two installs, such as a terminal and an editor extension on different versions, is shown as the one that reported last. Versions, terminals, operating systems, managed settings, Claude organizations and team tags, each as a count of people. Someone whose install did not report a value is left out of that list. Names nobody. - [The people behind the largest activity figures](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-activity-people.md): Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. Each list names at most three people, the largest figure first, and nobody whose figure is zero. behind_on_version and without_managed_settings count everyone they apply to among the people who reported usage in the range, and name three. The answer names people, so it is sent with Cache-Control: no-store. - [What Claude Code was used for, by kind of activity](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-activity.md): Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. sections has one entry per kind of activity over the range, with its largest rows. response_times estimates, per model, how long a request took and how long its first token took: the times are kept in buckets, so each figure can be off by the width of one. people says how many people each kind of activity reached, and names nobody. - [Claude Enterprise at list price, against what it cost after discount](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-costs-list-price.md): What each Claude product would have cost at Anthropic's list price, beside what it cost after discount, over the range. The amount after discount is the same whether Anthropic or a marketplace invoices it. Anthropic reports a list price for Claude Enterprise alone, so an organization on another plan is answered with zeros. - [Which Anthropic datasets hold data](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-data-availability.md): True for each dataset that has something to show, so the board hides the cards that do not. costs is billed spend, sku and resource are billed spend with a token type or a named key or person, usage_value is Claude Code and Cowork usage rolled into the cost tables, and usage is that usage as it was reported, which is what the usage routes read. people and cowork say more about the reported usage: whether two or more people reported any, and whether Cowork did. list_price is Claude Enterprise spend that carries a list price. activity has one flag per kind of activity Claude Code reported, and fleet, managed_settings, organizations and teams say what its installs reported about themselves. The activity flags and those four look at no range: each is true while anything of it is stored, whatever its day. - [People who started using Claude, came back to it or kept using it](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-usage-adoption.md): Everyone who reported usage in the range is one of three: new when they were first seen inside it, continuing when they also reported usage in the range of the same length just before, and returning otherwise. At most five are named: up to three of the new and up to two of the returning, each kind taking the places the other leaves empty. The answer names people, so it is sent with Cache-Control: no-store. - [Claude Code and Cowork usage by person, by model or by product](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-usage-breakdown.md): Usage is what Claude Code and Cowork reported about themselves, valued at API list price. It is not what the organization is billed, and it includes the current day. Rows are ordered by usage value, largest first. share is a row's part of the whole range, whatever search narrows the rows to. Grouped by person the answer names people, so it is sent with Cache-Control: no-store. - [How Claude Code and Cowork usage is spread across people](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-usage-distribution.md): Usage is what Claude Code and Cowork reported about themselves, valued at API list price. It is not what the organization is billed, and it includes the current day. Each person is counted in the band their usage value over the range falls in, and every band is answered, including one with nobody in it. top_decile and rest set the tenth of the people who used the most beside everyone else. - [People for whom Claude has reported nothing lately](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-usage-inactive.md): Measured from today in UTC, with no range: how many people had nothing reported for them in the last 14 days and in the last 30, and the ten away the longest. Someone is last seen on the latest day any of their usage or activity was reported, and someone last seen more than 400 days ago is not counted. The answer names people, so it is sent with Cache-Control: no-store. - [Claude Code and Cowork usage, in total and per day](https://docs.levelfour.ai/api-reference/anthropic/get-providers-anthropic-usage.md): Usage is what Claude Code and Cowork reported about themselves, valued at API list price. It is not what the organization is billed, and it includes the current day. totals covers the range, with each person counted once. daily has one entry per day of the range, at zero on a day nobody used Claude. - [Tags](https://docs.levelfour.ai/api-reference/tags.md): Provider cost allocation tags read from the bill, and virtual tags LevelFour assigns from ordered rules. - [Delete a config](https://docs.levelfour.ai/api-reference/tags/delete-tags-virtual-by-id-configs-by-id.md) - [Delete a virtual tag](https://docs.levelfour.ai/api-reference/tags/delete-tags-virtual-by-id.md) - [Tagged share of spend and resources](https://docs.levelfour.ai/api-reference/tags/get-tags-coverage.md) - [Values a condition can match](https://docs.levelfour.ai/api-reference/tags/get-tags-dimensions-by-id-values.md) - [Filter catalog for tag rules](https://docs.levelfour.ai/api-reference/tags/get-tags-dimensions.md) - [Reprocessing job progress](https://docs.levelfour.ai/api-reference/tags/get-tags-jobs-by-id.md) - [Resources carrying a key](https://docs.levelfour.ai/api-reference/tags/get-tags-keys-by-id-resources.md) - [One tag key](https://docs.levelfour.ai/api-reference/tags/get-tags-keys-by-id.md) - [List provider and virtual tag keys](https://docs.levelfour.ai/api-reference/tags/get-tags-keys.md) - [Resources a condition can pin](https://docs.levelfour.ai/api-reference/tags/get-tags-resources.md) - [Rename a virtual tag value](https://docs.levelfour.ai/api-reference/tags/patch-tags-virtual-by-id-values-by-id.md) - [Update virtual tag settings](https://docs.levelfour.ai/api-reference/tags/patch-tags-virtual-by-id.md) - [Append a config](https://docs.levelfour.ai/api-reference/tags/post-tags-virtual-by-id-configs.md) - [Dry run a virtual tag definition](https://docs.levelfour.ai/api-reference/tags/post-tags-virtual-preview.md) - [Create a virtual tag](https://docs.levelfour.ai/api-reference/tags/post-tags-virtual.md) - [Replace a virtual tag's collapsed keys](https://docs.levelfour.ai/api-reference/tags/put-tags-virtual-by-id-collapsed-keys.md) - [Replace a config](https://docs.levelfour.ai/api-reference/tags/put-tags-virtual-by-id-configs-by-id.md) - [Reorder configs](https://docs.levelfour.ai/api-reference/tags/put-tags-virtual-by-id-configs-order.md) - [Replace a virtual tag](https://docs.levelfour.ai/api-reference/tags/put-tags-virtual-by-id.md) - [Cost Views](https://docs.levelfour.ai/api-reference/cost-views.md): Saved cost views: a named set of filters you can read back and reuse. - [Delete a cost view](https://docs.levelfour.ai/api-reference/cost-views/delete-cost-views-by-id.md) - [Read one cost view](https://docs.levelfour.ai/api-reference/cost-views/get-cost-views-by-id.md) - [List cost views](https://docs.levelfour.ai/api-reference/cost-views/get-cost-views.md) - [Create a cost view](https://docs.levelfour.ai/api-reference/cost-views/post-cost-views.md) - [Replace a cost view](https://docs.levelfour.ai/api-reference/cost-views/put-cost-views-by-id.md) - [Recommendations](https://docs.levelfour.ai/api-reference/recommendations.md): List savings recommendations, choose resources, give rejection feedback and request execution. - [Get recommendation activity timeline](https://docs.levelfour.ai/api-reference/recommendations/get-recommendations-by-id-activity.md): Return ordered audit events (views + decisions) for one recommendation - [Get Automated Savings permission state](https://docs.levelfour.ai/api-reference/recommendations/get-recommendations-by-id-automated-savings.md): Returns the Automated Savings managed-policy connection state and the Launch Stack URL - [Get recommendation detail](https://docs.levelfour.ai/api-reference/recommendations/get-recommendations-by-id-details.md): Returns complete details for a specific recommendation - [Get aggregate recommendations overview](https://docs.levelfour.ai/api-reference/recommendations/get-recommendations-overview.md): Returns recommendations overview metrics across all providers (for dashboard) - [List executions awaiting an admin's approval](https://docs.levelfour.ai/api-reference/recommendations/get-recommendations-pending-approvals.md): Recommendations a member has submitted for execution that need an admin's release. - [Get potential savings summary by provider](https://docs.levelfour.ai/api-reference/recommendations/get-recommendations-potential-savings-summary.md): Returns potential savings summary grouped by provider - [Get processing recommendations](https://docs.levelfour.ai/api-reference/recommendations/get-recommendations-processing.md): Returns all recommendations currently in processing status - [Get recommendations summary by provider](https://docs.levelfour.ai/api-reference/recommendations/get-recommendations-summary.md): Returns provider-level aggregation for the carousel view (AWS, GCP, Azure, K8s) - [Get recommendations breakdown with pagination](https://docs.levelfour.ai/api-reference/recommendations/get-recommendations.md): Returns paginated list of all recommendations with actions - [Accept or reject savings](https://docs.levelfour.ai/api-reference/recommendations/post-recommendations-by-id-decision.md): Records user decision to accept or reject a savings recommendation - [Request execution approval (maker)](https://docs.levelfour.ai/api-reference/recommendations/post-recommendations-by-id-execution-request.md): A member requests execution; the recommendation moves to pending_approval and awaits an admin. - [Add rejection feedback](https://docs.levelfour.ai/api-reference/recommendations/post-recommendations-by-id-rejection-feedback.md): Backfill reason/explanation on an already-rejected recommendation - [Set the resources a saving applies to](https://docs.levelfour.ai/api-reference/recommendations/post-recommendations-by-id-resource-selection.md): Curates which resources in the recommendation the saving is limited to (the checked resources) - [Savings Grants](https://docs.levelfour.ai/api-reference/savings-grants.md): Scoped, time-limited access that lets LevelFour apply a saving for you. - [Poll a savings grant status](https://docs.levelfour.ai/api-reference/savings-grants/get-recommendations-grants-by-id.md) - [Create a per-batch scoped, time-boxed savings grant](https://docs.levelfour.ai/api-reference/savings-grants/post-recommendations-grants.md) - [Repo Binding](https://docs.levelfour.ai/api-reference/repo-binding.md): Choose the repositories an infrastructure-as-code saving opens its pull request in. - [Unbind a repository from a recommendation](https://docs.levelfour.ai/api-reference/repo-binding/delete-repo-binding-recommendations-by-id-targets.md) - [List repositories accessible by an installation](https://docs.levelfour.ai/api-reference/repo-binding/get-repo-binding-installations-by-id-repos.md) - [List GitHub App installations for the tenant](https://docs.levelfour.ai/api-reference/repo-binding/get-repo-binding-installations.md) - [List repositories bound to a recommendation](https://docs.levelfour.ai/api-reference/repo-binding/get-repo-binding-recommendations-by-id-targets.md) - [Bind repositories to a recommendation](https://docs.levelfour.ai/api-reference/repo-binding/post-repo-binding-recommendations-by-id-targets.md) - [Audit](https://docs.levelfour.ai/api-reference/audit.md): Realized savings from completed recommendations. - [Get saved recommendations breakdown with pagination](https://docs.levelfour.ai/api-reference/audit/get-recommendations-audit-breakdown.md): Returns paginated list of all implemented savings with filtering - [Get realized savings audit detail](https://docs.levelfour.ai/api-reference/audit/get-recommendations-audit-realized-by-id.md): Returns the parent realized_savings_audit row plus all per-usage_type line items. Powers the Savings Audit drill-down side panel. - [Get Savings Audit summary](https://docs.levelfour.ai/api-reference/audit/get-recommendations-audit-summary.md): Returns enhanced BigNumbers data for the Savings Audit page - [Commitments](https://docs.levelfour.ai/api-reference/commitments.md): Reserved Instances and Savings Plans: inventory, utilization, coverage, renewals and purchase plans. - [Per-service commitment breakdown](https://docs.levelfour.ai/api-reference/commitments/get-commitments-by-service.md): Returns a service x instrument matrix of RI and SP utilization, coverage, unused, and uncovered values. One row per service that has at least one commitment. - [Marketplace and contract commitments](https://docs.levelfour.ai/api-reference/commitments/get-commitments-contracts.md): Commitment relationships that behave like a commitment on the bill but appear in no provider commitment view, with the contracted floor separated from the metered leg that bills on top. - [Get coverage filter options](https://docs.levelfour.ai/api-reference/commitments/get-commitments-coverage-filter-options.md) - [How much of the eligible bill a commitment covers](https://docs.levelfour.ai/api-reference/commitments/get-commitments-coverage-rates.md): Coverage per service and the covered spend per consuming account, with the on-demand remainder beside it so the percentage names its own denominator. Weighted by the dollars behind each figure, never averaged across commitments, where a hundred dollar reservation would move the number as far as a fifty thousand dollar one. A provider whose sweep has not run reports measured false rather than zero coverage, because holding none and not having looked are opposite answers. months adds that many calendar months ending at the current month, AWS only, for the organization, each payer and each account where the workloads run: instance hours at public on-demand prices covered and uncovered, and the commitment dollars each account consumed, took from other accounts, gave to them and left idle. On Google Cloud, projects lists each project's committed use discounts month to date, and cost_export_cud_status says whether the billing export has been swept. - [Get coverage rows](https://docs.levelfour.ai/api-reference/commitments/get-commitments-coverage.md): Deprecated, use /coverage-rates. This reads one row per commitment held, so usage no commitment covers has no row and cannot appear, which is the larger half of coverage. on_demand_cost_monthly, saved_vs_od_monthly and filtered_savings_monthly are not measured here and are sent as zero, and filtered_coverage_pct averages percentages across commitments rather than weighting them by spend. - [Get commitment detail](https://docs.levelfour.ai/api-reference/commitments/get-commitments-detail-by-id.md) - [Effective savings rate, globally and per account](https://docs.levelfour.ai/api-reference/commitments/get-commitments-esr.md): What the same usage would have cost at public on-demand rates against what it actually cost, for the organization and for each account that consumed the benefit. The rate is split into the part a negotiated agreement earns and the part commitments earn, because the public on-demand price sits above both and an account owning no commitment at all would otherwise report a healthy rate. esr_pct is the rate after idle commitment, and is null until the month is complete. months adds that many calendar months ending at period, for the organization, each payer and each account. - [Where the purchase renewing this commitment stands](https://docs.levelfour.ai/api-reference/commitments/get-commitments-execution-by-id.md): The latest purchase run of this commitment's renewal, with the steps, logs and trigger of the recommendation that renews it. not_started until somebody releases the renewal. queued once released and waiting for the term to end, or once the provider queued the purchase. in_progress while a run holds it. active once the provider reports the new commitment active, or once the renewal was completed by hand. payment_failed when the provider could not charge for it. failed when a run was refused before sending or the provider refused the purchase. indeterminate when nobody knows yet whether the purchase went through: it is reconciled, never retried. A commitment the organization does not hold is a 404. - [One row per commitment](https://docs.levelfour.ai/api-reference/commitments/get-commitments-inventory.md): Every reservation or plan the tenant holds, one row each, with the state the cloud reports rather than one derived from the end date. A plan that starts next month is queued and one whose payment failed is neither running nor expired, and no date says either. Attributes only some services carry arrive as null rather than zero. - [What AWS sells for a reservation or Savings Plan target](https://docs.levelfour.ai/api-reference/commitments/get-commitments-offerings.md): The catalogue one field at a time. choices lists, for every field of the target, the values sold given every field before it, in the order each narrows the next: service, region, engine, deployment, offering_class, tenancy and resource for a reservation, plan_type, instance_family and region for a plan. A field the service does not use has no choices and must be left out. complete says the target is whole; offers then lists every offering sold for it, priced per unit (a reservation, or a dollar an hour of a plan) beside the public on-demand rate where the price list has one. EC2 is read one instance type at a time, so its offers wait for resource. Regions are where the organization's accounts live, hold commitments, run anything or opted in; classes are those it runs and those the catalogue sells. Every page AWS returns is kept a day, fetched_at says when it was read. AWS is read through the role of the optional buying_account_id, the account the purchase would be bought in, then its payer's, then every other connected account's, payers first, passing over a role AWS refuses to assume. 422 for a value the service does not sell; 502 when every connected account refused the offerings lookup. - [Get commitments overview](https://docs.levelfour.ai/api-reference/commitments/get-commitments-overview.md): ESR strip and aggregate RI/SP metrics for the requested provider (AWS real, GCP/Azure return zeros). - [Commitment portfolio ledger](https://docs.levelfour.ai/api-reference/commitments/get-commitments-portfolio.md): One row per commitment across every connected account, resolving the account that holds it against the accounts that consume it, with the expiry instant, the utilization trend, and what a renewal protects kept separate from what right-sizing would save. - [Where a Savings Plan purchase stands](https://docs.levelfour.ai/api-reference/commitments/get-commitments-purchase-by-id.md): One BUY- purchase: what it buys, the tranche it belongs to, and its latest purchase run with the steps, logs and trigger of its row. execution.status reads as it does for a renewal, plus returned when AWS refunded the plan after it was bought, and cancelled when a plan queued inside AWS was deleted while queued. execution.starts_at is when AWS starts such a plan: only runs sent before LevelFour stopped queueing inside AWS carry either. bought_outside names the plan of the same type and term bought outside LevelFour that stopped the latest run. execution.status reads scheduled while a released purchase waits on LevelFour's side until execution.send_at, and cancelled_before_purchase once it was cancelled before it was sent. execution.can_buy_now and execution.can_cancel say whether the caller may buy it now or cancel it at this moment, by the rules those two routes apply. Reads stored state only and never calls AWS. 404 for an id that is no purchase of this organization. - [Savings Plans and Reserved Instances to buy, sized on the daily bill](https://docs.levelfour.ai/api-reference/commitments/get-commitments-purchase-plan.md): The uncovered base, as /uncovered returns it, beside one proposal per payer and plan type at 12 months No Upfront. Each proposal offers three profiles sized on the daily CUR floor, net of the commitment already bought or agreed, capped by AWS's own recommendation, and replayed over the last 60 complete days. Free to every organization; reads cached rates and offerings and never calls AWS. raised is null until a proposal can be raised as a purchase. schedule lists every tranche of each purchase schedule with a month still to come: its day, its size, where it stands and why it last shrank or was skipped. reservations lists the new Reserved Instances LevelFour would buy for on-demand usage no Savings Plan covers, each sized on the 10th percentile day, quoted on the cached offering at the guardrails' term, and flagged quota_blocked when the RDS reserved instance quota cannot hold it. - [What one Savings Plan commitment would have done](https://docs.levelfour.ai/api-reference/commitments/get-commitments-purchase-simulation.md): Replays a commitment in dollars an hour over the payer's recent daily bill: the eligible on-demand spend it would have covered, the commitment it would have left unused, its utilization, coverage and monthly savings, day by day, beside the sized profiles and AWS's own figure. A day averages its hours, so every figure is an upper bound on the hourly truth. Free to every organization; never calls AWS. A Database plan is sold for 12 months No Upfront only. payer_account_id may be omitted when the organization has one payer. Missing data answers 200 with unavailable_reason. - [Get commitment recommendations](https://docs.levelfour.ai/api-reference/commitments/get-commitments-recommendations.md) - [The renewal purchase already raised for this commitment](https://docs.levelfour.ai/api-reference/commitments/get-commitments-renewal-by-id.md) - [Every term this commitment could be replaced with](https://docs.levelfour.ai/api-reference/commitments/get-commitments-renewal-options-by-id.md): The contract priced again as it stands, beside every other term its shape is sold on today, each priced at up to about forty quantities spanning what was sized and what is held, and recommended on exactly one row, above the quantity held only on a family basis, or on none when decision is let_expire: the commitment was used too little to pay for itself, so every row is priced at the quantity held for comparison and nothing is advised. With quantity, each offering is priced at exactly that quantity instead, one row each; a reservation is sold in whole units, so a fractional quantity is a 422. Without a stored series every quantity is still priced, and idle_units, spill_units and spill_cost come back null. sizing_basis says where the recommended quantity came from: the commitment's own fee line, which can only argue for buying less; family, that line plus the on-demand usage of its family and engine held on nine days in ten, the one basis that can argue for more; or unmeasured, where the quantity held stands; measured appears only on options an earlier sweep priced. upfront is the total paid at purchase for the row's quantity; recurring_hourly is the rate per unit. demand is the daily series the sizing read, with its projection across the longest term. A size-flexible RDS, ElastiCache or MemoryDB reservation can be renewed as a larger class of its family: classes lists every class it was priced in, smallest first, with what one reservation covers in the class held and the term and payment options each is sold on. The rows are one class, the one recommended unless resource names another; resource on a row is the class bought, every quantity and demand are counted in it, held_units_equivalent is a row's quantity in the class held, and the contract is always priced in the class held. A class it was not priced in is a 422. quota says how many reservations the account may hold against what it would hold once the expiring ones are renewed; quota_blocked marks a renewal it could not hold in any class. size_mix is what the family runs by instance size and deployment. - [Renewal plan for one commitment](https://docs.levelfour.ai/api-reference/commitments/get-commitments-renewal-plan-by-id.md): What to repurchase and when. units_recommended is the quantity the renewal options recommend, the same number the drawer shows: 0 with decision let_expire when the commitment was used too little to pay for itself, the quantity held when nothing measured it. units_consumed is the average the sized series measured, null when unmeasured. States the instant to buy after rather than a date, because a replacement bills from the moment it is bought, and lists the pending changes to the same instance family that must land first so their capacity is not reserved for another term. superseded_by names the commitment that already renewed this one, and no_recent_usage says nothing of its family and engine ran last week; either one means no renewal is raised. - [What replacing this commitment costs today](https://docs.levelfour.ai/api-reference/commitments/get-commitments-renewal-quote-by-id.md): Priced from the current offering rather than from the expiring term, whose price is as old as the term. error_message carries a lookup that failed, so an unpriced renewal reads as unpriced rather than as zero. - [Uncovered on-demand base, split for sizing](https://docs.levelfour.ai/api-reference/commitments/get-commitments-uncovered.md): On-demand spend a Savings Plan could cover and no commitment does, per payer, plan type, service and platform, read off the daily CUR over the last 30 complete days. Carries the daily floor of each slice, in commitment dollars an hour, and names each row's grain and source. A payer with no CUR gets Cost Explorer's hourly figures as visibility, with no suggested size. - [Utilization for one instrument, optionally for one service](https://docs.levelfour.ai/api-reference/commitments/get-commitments-utilization.md): One entry per service for reservations, or per plan type for plans, each measured on its own and never rolled up: EC2 and RDS contract in vCPU while Redshift, ElastiCache, OpenSearch, Elasticsearch and MemoryDB contract in nodes, so an average across them describes neither. Each entry's headline divides the used hours by the purchased hours over the window rather than averaging its dimensions. - [List commitments](https://docs.levelfour.ai/api-reference/commitments/get-commitments.md) - [Re-size a purchase nobody has decided yet](https://docs.levelfour.ai/api-reference/commitments/patch-commitments-purchase-by-id.md): A body naming kind re-sizes a purchase raised as a NewPurchase: its size, term, payment option and offering, looked up again in AWS. Its target and buying account stay as raised (409 for another). A body without kind points a purchase raised from its proposal at another profile or commitment_hourly, sized on today's proposal; naming neither re-sizes the pick it was raised on. Each body fits only its own kind of purchase (409 otherwise). Keeps the id. 404 for an id that is no purchase, 409 once anybody has accepted, rejected or requested it, and 409 for any refusal a raise meets. Answers rebound true. A draft is re-sized by the person who raised it alone (404 for anybody else), which renews its expiry, and 409 purchase_draft_expired once it has expired. - [Buy a released purchase now instead of after its hold](https://docs.levelfour.ai/api-reference/commitments/post-commitments-purchase-by-id-buy-now.md): A new purchase released to Automated Savings waits up to 24 hours before LevelFour sends it to AWS, so it can still be cancelled. This ends the wait: the executor sends it on its next run, within about five minutes. Organization admins only. Answers where the purchase stands; calling it again changes nothing. 409 purchase_not_held for a purchase that is not released to Automated Savings, tranche_keeps_its_day for a tranche of a purchase schedule, purchase_cancelled once it was cancelled, and purchase_already_sent once it was sent. 404 for an id that is no purchase. - [Cancel a purchase before it is sent to AWS](https://docs.levelfour.ai/api-reference/commitments/post-commitments-purchase-by-id-cancel.md): Stops a purchase that has not been sent to AWS: it is rejected, reads cancelled_before_purchase, and stays that way, so it cannot be accepted or released again; raise a new purchase to buy it. An organization admin or the member who raised or requested it may cancel. Calling it again changes nothing. 409 purchase_already_sent once a purchase was sent and may have been bought, purchase_closed for one already bought or rejected, and purchase_bought_by_hand for one released to be bought by hand, which may already be bought. 404 for an id that is no purchase. - [What a new reservation or Savings Plan would cost and save](https://docs.levelfour.ai/api-reference/commitments/post-commitments-purchase-simulation.md): Quotes one purchase the organization does not hold yet, a NewPurchase with an optional lookback_days of 30 or 60. basis is usage when the buying account's payer already runs the target: a reservation is replayed over its family's daily on-demand hours in units of the class bought and priced at the on-demand rate measured on the bill; a plan is replayed at the organization's own rates, as GET /purchase-simulation does, on any term and payment AWS sells it on. Otherwise basis is full_use: every hour used, against the price list's on-demand rate where it has one, and at face (no saving) where it has none, which is always the case for a plan. upfront, recurring_monthly, commitment_monthly and term_total are the offering's list price; over_automation_cap says Automated Savings would refuse the term total. A reservation quoted on usage also answers unused_units and left_on_demand_units, what it leaves unused and on demand an hour in reservations of the class bought. The offering is the one named, or the cheapest sold on those terms. A plan quoted without an offering_id is priced on its commitment, term and payment option without reading the catalogue, and its offering_id is null. 422 when AWS sells nothing on those terms, and for a Database plan other than 12 months No Upfront; 502 when every connected account refused the offerings lookup. Buys nothing. - [Raise a Reserved Instance or Savings Plan purchase](https://docs.levelfour.ai/api-reference/commitments/post-commitments-purchase.md): Raises a purchase as a savings recommendation, BUY- followed by a number. Nothing is bought until an organization admin releases it, so a member may raise one, and so may a read-write API key. A body naming kind is a NewPurchase: a reservation (service, region, class, quantity) or a Savings Plan of any type (commitment_hourly, and for an EC2 Instance plan its instance_family and region), on a 12 or 36 month term and any payment option. offering_id is required: it is looked up again in AWS and refused with 409 once AWS no longer sells it. buying_account_id must be an AWS account of the organization (422 otherwise). monthly_savings is the quote's net savings when it was replayed over measured usage, and 0 when it assumes every hour is used. Calling it again for the same target returns the undecided purchase when it names the same pick. Any other pick is answered 409 undecided_purchase_exists with that purchase's recommendation_id, state, raised_by and raised_at, and confirm_additional true raises a second one beside it. draft true raises a purchase before anybody asks for a decision on it, so an access grant can be minted for its id. A draft is its raiser's alone: it is left out of every savings list and total, it is never the purchase already raised for its target, and it becomes an ordinary purchase the moment it is accepted or an execution request is filed for it. It expires at draft_expires_at, which is renewed when it is re-sized and moved to its access grant's end when that is later, and an expired draft is refused with 409 purchase_draft_expired wherever it is acted on. Raising a draft again for the same target and buying account returns the caller's own draft, re-sized to the new pick with rebound true, so it keeps its id and its grant. Another person's draft is never returned and never refuses a raise, so accepting a draft or filing its execution request asks again what a raise asks: 409 schedule_exists, same_purchase_exists or undecided_purchase_exists, the last two unless the draft was raised again with confirm_additional true. A draft takes a signed-in caller and a body naming kind (422 otherwise). A body without kind raises one payer's /purchase-plan proposal for a 12 month No Upfront plan, as before. profile picks a sized profile (balanced when neither is named), or commitment_hourly names a size of the caller's own, rounded down to $0.001 and refused above AWS's cap. Calling it again returns the purchase nobody has decided yet for that payer and plan type when it is bound to the same pick, and refuses any other pick with 409: PATCH /purchase/{recommendation_id} changes it. Also 409 when the proposal carries no size, when AWS's own recommendation was not fetched in the last 7 days, or when the size is under $0.001 an hour. payer_account_id may be omitted when the organization has one payer (422 otherwise; 404 for a payer that bills nothing). monthly_savings is the lower of the daily replay and AWS's estimate scaled to this size, both at the organization's own rates. attempt_id names one attempt at a purchase: sending the same attempt_id again, after a second click, a reload or a retry, returns the purchase that attempt raised with created false, and a different request under an attempt_id already used is refused with 422. A new attempt identical to a purchase awaiting approval, accepted, released, or sent to AWS in the last 24 hours is answered 409 same_purchase_exists with that purchase's recommendation_id, state, raised_by and raised_at; send it again with confirm_additional true to raise a second one. Any other difference, a quantity or a commitment for one, raises as usual. Either way, when the buying account is connected the row carries both implementation tags and an access policy that can only buy this one purchase, so Automated Savings can buy it; otherwise it is delivered by hand (Manual Setup) with no access policy. It bills only once AWS reports it active. - [Raise the purchase that replaces this commitment](https://docs.levelfour.ai/api-reference/commitments/post-commitments-renewal-by-id.md): Returns the recommendation that buys the new term, and the offering and quantity it is bound to. Calling it again never raises a rival: with no choice it returns the first one, and with a different choice it points a renewal nobody has decided on at that choice (rebound). rebindable says whether what it buys can still change: once anybody accepts, rejects or requests it, only the choice it was decided on is accepted. A renewal rejected before anybody released it is closed, and raising again creates a new one while the rejected one stays as history. Nothing is bought here: the recommendation carries the offering, the quantity and the instant after which buying is safe, and the apply path acts on it. A commitment already renewed, or whose family and engine ran nothing last week, is refused with 409. A read-write API key may raise a renewal; releasing it needs an organization admin. - [Anomalies](https://docs.levelfour.ai/api-reference/anomalies.md): Cost anomalies, their detail, and your notification preference. - [Get anomaly detail](https://docs.levelfour.ai/api-reference/anomalies/get-anomalies-by-id.md) - [Who hears about detected spikes](https://docs.levelfour.ai/api-reference/anomalies/get-anomalies-notifications-preference.md) - [Get anomalies summary](https://docs.levelfour.ai/api-reference/anomalies/get-anomalies-summary.md) - [List anomalies](https://docs.levelfour.ai/api-reference/anomalies/get-anomalies.md) - [Set who hears about detected spikes](https://docs.levelfour.ai/api-reference/anomalies/put-anomalies-notifications-preference.md) - [Cost Alerts](https://docs.levelfour.ai/api-reference/cost-alerts.md): Budget, spend change and commitment alerts: create, change, pause and delete them, and read what they said. - [Delete a cost alert](https://docs.levelfour.ai/api-reference/cost-alerts/delete-cost-alerts-by-id.md) - [What this alert has said, newest first](https://docs.levelfour.ai/api-reference/cost-alerts/get-cost-alerts-by-id-events.md) - [Read one cost alert](https://docs.levelfour.ai/api-reference/cost-alerts/get-cost-alerts-by-id.md) - [List what an alert can watch](https://docs.levelfour.ai/api-reference/cost-alerts/get-cost-alerts-sources.md): Declared before `/{alert_id}`, or FastAPI matches 'sources' as an id and 404s it. - [Alert rules this account's own history would support](https://docs.levelfour.ai/api-reference/cost-alerts/get-cost-alerts-suggestions-by-id.md) - [List cost alerts](https://docs.levelfour.ai/api-reference/cost-alerts/get-cost-alerts.md) - [Update or pause a cost alert](https://docs.levelfour.ai/api-reference/cost-alerts/patch-cost-alerts-by-id.md) - [Create a cost alert](https://docs.levelfour.ai/api-reference/cost-alerts/post-cost-alerts.md) - [Accounts](https://docs.levelfour.ai/api-reference/accounts.md): Connected cloud accounts, enabled modules, and work-tool connections. - [Disconnect a GitLab connection and remove its webhook](https://docs.levelfour.ai/api-reference/accounts/delete-accounts-gitlab-connections-by-id.md) - [Disconnect a Jira connection for the current tenant](https://docs.levelfour.ai/api-reference/accounts/delete-accounts-jira-connections-by-id.md) - [Disconnect a Slack workspace](https://docs.levelfour.ai/api-reference/accounts/delete-accounts-slack-connections-by-id.md) - [List per-account LevelFour capability status for the current tenant](https://docs.levelfour.ai/api-reference/accounts/get-accounts-connections.md) - [List GitHub App installations for the current tenant](https://docs.levelfour.ai/api-reference/accounts/get-accounts-github-installations.md) - [List active GitLab connections for the current tenant](https://docs.levelfour.ai/api-reference/accounts/get-accounts-gitlab-connections.md) - [Poll connect-accounts integration status](https://docs.levelfour.ai/api-reference/accounts/get-accounts-integrations-by-id.md) - [List active Jira connections for the current tenant](https://docs.levelfour.ai/api-reference/accounts/get-accounts-jira-connections.md) - [List customer modules for the current tenant](https://docs.levelfour.ai/api-reference/accounts/get-accounts-modules.md) - [The Slack channel cost alerts post to](https://docs.levelfour.ai/api-reference/accounts/get-accounts-slack-alerts-channel.md) - [List the Slack channels cost alerts can post to](https://docs.levelfour.ai/api-reference/accounts/get-accounts-slack-channels.md) - [List active Slack workspace connections for the current tenant](https://docs.levelfour.ai/api-reference/accounts/get-accounts-slack-connections.md) - [List connected cloud accounts for the current tenant](https://docs.levelfour.ai/api-reference/accounts/get-accounts.md) - [Finalize a GitHub App install via the Setup URL callback](https://docs.levelfour.ai/api-reference/accounts/post-accounts-integrations-by-id-github-complete.md) - [Finalize a GitLab connection via the OAuth callback](https://docs.levelfour.ai/api-reference/accounts/post-accounts-integrations-by-id-gitlab-complete.md) - [Finalize a Jira connection via the OAuth callback](https://docs.levelfour.ai/api-reference/accounts/post-accounts-integrations-by-id-jira-complete.md) - [Finalize a Slack workspace connection via the OAuth callback](https://docs.levelfour.ai/api-reference/accounts/post-accounts-integrations-by-id-slack-complete.md) - [Start a connect-accounts integration session](https://docs.levelfour.ai/api-reference/accounts/post-accounts-integrations.md) - [Choose the Slack channel cost alerts post to, or stop posting them](https://docs.levelfour.ai/api-reference/accounts/put-accounts-slack-alerts-channel.md) - [Integrations](https://docs.levelfour.ai/api-reference/integrations.md): Read a connected work tool and file tasks in it, such as a Jira issue from a saving. - [Whether the current tenant has the tool connected](https://docs.levelfour.ai/api-reference/integrations/get-integrations-by-id-connection.md) - [List the Jira projects a task can be filed under, for a site](https://docs.levelfour.ai/api-reference/integrations/get-integrations-by-id-destinations.md) - [List the Jira sites the connected account can reach](https://docs.levelfour.ai/api-reference/integrations/get-integrations-by-id-sites.md) - [Live status of a task created for a savings recommendation](https://docs.levelfour.ai/api-reference/integrations/get-integrations-by-id-tasks-by-id-status.md) - [Create a task in the tool for a savings recommendation](https://docs.levelfour.ai/api-reference/integrations/post-integrations-by-id-tasks.md) - [Webhooks](https://docs.levelfour.ai/api-reference/webhooks.md): Subscribe to event notifications. - [Delete a webhook endpoint](https://docs.levelfour.ai/api-reference/webhooks/delete-webhooks-endpoints-by-id.md) - [List webhook endpoints](https://docs.levelfour.ai/api-reference/webhooks/get-webhooks-endpoints.md) - [Register a webhook endpoint](https://docs.levelfour.ai/api-reference/webhooks/post-webhooks-endpoints.md) - [Resources](https://docs.levelfour.ai/resources.md): Where to find each LevelFour API method: one page per resource, with its parameters and the call in each SDK that carries it. - [Providers](https://docs.levelfour.ai/resources/providers.md): Provider-scoped reads for recommendations, savings, and costs on AWS, GCP, Azure, and Kubernetes. A provider you have not connected returns 404. - [Costs](https://docs.levelfour.ai/resources/costs.md): Read cloud spend from the SDKs: summaries, daily and monthly series, breakdowns you can filter and export, growth, forecasts, unit costs, tag allocation and invoice months. - [Recommendations](https://docs.levelfour.ai/resources/recommendations.md): Every recommendations method in the Python, TypeScript and Go SDKs, with its parameters, the row shape it returns, and a worked example. - [Savings](https://docs.levelfour.ai/resources/savings.md): What your accepted recommendations actually saved: the aggregate, the row-by-row audit trail, and the parameters that narrow it. - [Commitments](https://docs.levelfour.ai/resources/commitments.md): Read your Reserved Instances and Savings Plans over the API: what you hold, how well you use it, how much of the bill it covers, your effective savings rate, and what renewing each one costs. - [Cost Alerts](https://docs.levelfour.ai/resources/cost-alerts.md): List, create, change, pause and delete the cost alerts that watch an account, a saved cost view or your commitments, and read what each one has said. - [Accounts](https://docs.levelfour.ai/resources/accounts.md): Read the cloud accounts connected to LevelFour, what each one can do, the modules your organization has, and the work tools it is connected to, and disconnect a work tool. - [Google Cloud](https://docs.levelfour.ai/resources/google-cloud.md): Reads only Google Cloud answers: which data has arrived, resources by type, region and project, idle resources, label coverage, utilization, budgets, and what LevelFour's service account can read. - [Webhooks](https://docs.levelfour.ai/webhooks.md): What LevelFour posts to your endpoint when a recommendation or an optimization changes state, and how to verify the signature before you act on it. - [Error Handling](https://docs.levelfour.ai/error-handling.md): Which HTTP status raises which class in each SDK, what an error carries, and which failures the SDKs retry before you see them. - [Pagination](https://docs.levelfour.ai/pagination.md): The pagination envelope every list response carries, and how to walk it: auto-iterate, one page at a time, collect everything, or by hand.