API Reference

API Reference

Base URL

https://api.levelfour.ai

All endpoints require a Bearer token in the Authorization header:

Authorization: Bearer l4_live_your_key_here

Endpoints

Browse the API by category:

  • Recommendations — List, approve, and execute cost optimization recommendations
  • Audit — Track realized savings from completed recommendations
  • Costs — View current cloud cost breakdowns
  • Providers — Per-provider data for recommendations, costs, and savings
  • API Keys — Manage programmatic access tokens
  • Webhooks — Subscribe to event notifications

Response Format

All responses follow a standard envelope:

{
  "success": true,
  "data": { ... },
  "timestamp": "2025-10-15T10:00:00Z"
}

Errors return:

{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found",
    "details": null
  },
  "timestamp": "2025-10-15T10:00:00Z"
}

See Error Handling for the full list of error codes.