Energy API design