# Lighting Electricity Cost API — DRAFT NOT DEPLOYED

No hosted endpoint exists for this demo. **Executed locally** means the browser applies the same calculation model without sending HTTP.

## Proposed request

POST /api/tools/v1/lighting-cost with Content-Type: application/json. The route is proposed only; transport, authentication, CORS and limits are not yet defined.

{
  "currency": "USD",
  "electricityRatePerKwh": 0.2,
  "baseline": {
    "groups": [
      {
        "name": "LED strip",
        "power": {
          "kind": "strip",
          "lengthM": 5,
          "powerPerMeterW": 14.4,
          "driverEfficiencyPercent": 90
        },
        "hoursPerDay": 8,
        "daysPerYear": 365,
        "standbyInputPowerW": 0
      }
    ]
  }
}

Use metres, watts, hours per day and days per year. A 365-day year uses 8,760 total hours. Standby covers all remaining hours. Fixture input and measured wall-side power already include driver losses; strip driverEfficiencyPercent: null explicitly excludes them and produces a warning. Do not double-count driver losses.

The proposed success envelope contains apiVersion, requestId, operation, inputs, result, warnings and links.share. A share URL may be null when it exceeds the existing URL bound.

For any future HTTP caller, check HTTP status and Content-Type before parsing JSON. Do not present an error or older result as a successful new calculation. Existing live LEDYI tool limits do not apply to this draft.
