Reference
API Reference
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.
The base URL, the authorization header and the response envelope are the same for every endpoint below.
Base URL
https://api.levelfour.aiAll endpoints require a Bearer token in the
Authorization header: Authorization: Bearer l4_live_your_key_here. See Authentication.Endpoints
| Category | Covers |
|---|---|
| Auth | Confirm which organization, plan and role a key resolves to |
| Providers | Per-provider data for recommendations, costs, and savings |
| Costs | Spend summaries, breakdowns, trends, usage, allocation and forecasts |
| Google Cloud | Google Cloud inventory, utilization, budgets, access and data availability |
| Tags | Provider cost allocation tags read from the bill, and virtual tags LevelFour assigns from ordered rules |
| Cost Views | Saved cost views: a named set of filters you can read back and reuse |
| Recommendations | List savings recommendations, choose resources, give rejection feedback and request execution |
| Savings Grants | Scoped, time-limited access that lets LevelFour apply a saving for you |
| Repo Binding | Choose the repositories an infrastructure-as-code saving opens its pull request in |
| Audit | Realized savings from completed recommendations |
| Commitments | Reserved Instances and Savings Plans: inventory, utilization, coverage, renewals and purchase plans |
| Anomalies | Cost anomalies, their detail, and your notification preference |
| Accounts | Connected cloud accounts, enabled modules, and work-tool connections |
| Integrations | Read a connected work tool and file tasks in it, such as a Jira issue from a saving |
| Webhooks | Subscribe to event notifications |
Response format
Every response arrives in the same envelope.
{
"success": true,
"data": { ... },
"timestamp": "2025-10-15T10:00:00Z"
}An error sets success to false and replaces data with error.
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": null
},
"timestamp": "2025-10-15T10:00:00Z"
}Next
- API Quickstart installs an SDK, points it at a key, and makes the first call
- Authentication is the key formats, what each scope reaches, and where an SDK looks for a key
- Error Handling is the full list of error codes and the class each one raises in every SDK
- Pagination is what list endpoints add inside
data, and how to walk it - Resources is the same surface as method calls in the Python, TypeScript and Go SDKs