GREEN FLAMES

DEVELOPERS · DATA PARTNERS

GREEN FLAMES Data API

Read energy, emissions and institutional-cooking data from GREEN FLAMES as JSON. Access is sold per product and energy category. Each client gets a private key, a monthly request quota and a per-minute rate limit.

Getting started

  1. Ask us for access (contact below). We agree a plan and the products you need.
  2. You receive an API key that starts with gfp_. Keep it secret: anyone holding it uses your quota.
  3. Send the key in the Authorization header on every request, and start with the index endpoint, which lists exactly what your key can call.
curl -H "Authorization: Bearer gfp_YOUR_KEY" https://greenflamesenergy.com/api/v1

All endpoints use GET, return JSON and allow browser calls from any origin (CORS). You can also send the key as X-API-Key: gfp_…. Keys in the URL are not accepted.

Endpoints

EndpointProductReturns
/api/v1any keyYour plan, products, usage this month and your endpoint list. Not counted against the quota.
/api/v1/summary
range
summaryTotal kWh, renewable share, cost, CO₂ emitted and avoided, peak kW, and kWh by the energy categories in your plan.
/api/v1/energy
range
energy:*kWh and CO₂ for each energy category in your plan.
/api/v1/energy/{category}
range, interval, tz
energy:{category}Time series of kWh, average kW, peak kW, cost and CO₂ for one category: grid, solar, battery, generator, wind, hydro, load, other.
/api/v1/emissions
range, interval, tz
emissionsCO₂ emitted, CO₂ avoided by renewables and net CO₂ per hour or day.
/api/v1/devicesdevicesMeters in your energy categories: name, category, location, rated kW, online status, last report.
/api/v1/realtimerealtimeLatest reading per meter in your energy categories: kW, V, A, power factor, Hz, kWh counter.
/api/v1/cooking
range, tz
cookingInstitutional cooking: sessions, kWh, portions, kWh per portion, per-day and per-program statistics.

Parameters

range24h (default), 7d or 30d; cooking also accepts 90d.
intervalhour or day. Defaults to hour for 24h and day otherwise.
tzYour time zone in minutes east of UTC, used to group hours and days. Nairobi is 180. Default 0 (UTC).

Example

GET /api/v1/energy/solar?range=24h&interval=hour&tz=180

{
  "data": {
    "category": "solar",
    "total_kwh": 31.204,
    "co2_kg": 0,
    "co2_avoided_kg": 13.73,
    "points": [
      { "t": "2026-11-30 07:00", "kwh": 1.92, "avg_kw": 1.92, "peak_kw": 2.6, "meters": 2, "co2_kg": 0, "co2_avoided_kg": 0.845, "cost": 0 }
    ]
  },
  "meta": { "api_version": "v1", "range": "24h", "interval": "hour", "tz": 180, "units": { "kwh": "kWh", "kw": "kW", "co2": "kg", "cost": "KES" }, "assumptions": { … } }
}

Every response carries meta.assumptions: the emission factor, tariff and currency used and how energy is estimated. Energy is the average kW of each meter over each hour; when a meter reports only its cumulative kWh counter, the change in the counter is used. Solar, wind and hydro count as CO₂ avoided; battery is storage and counts as neither.

Limits and billing

Each response includes your limits in headers: X-RateLimit-Limit, X-RateLimit-Remaining (this minute), X-Quota-Limit and X-Quota-Used (this calendar month, UTC). Quotas reset on the 1st of each month. Depending on your plan, calls above the quota are either refused or billed per 1,000.

PlanRequests / monthRequests / minuteTypical products
Free trial1,00010summary, grid and solar energy
Basic10,00030summary, emissions, grid and solar energy
Professional100,000120everything except cooking; extra calls billed
Enterprise1,000,000600all products; extra calls billed

Prices and custom plans are agreed with GREEN FLAMES.

Errors

401Missing, wrong, rotated or revoked key.
403Your plan does not include that product or category, or the key is suspended or expired.
404Unknown endpoint or energy category.
429Rate limit or monthly quota reached. Wait for Retry-After seconds, or upgrade.

Errors are JSON: {"error": "…", "docs": "/api-docs.html"}.

Contact

Loading contact options…