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
  • Savings — Track realized savings and trigger execution
  • Spending — View current cloud spending breakdowns
  • Providers — Per-provider data for recommendations, savings, and spending

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.