Developers

Everything in the Carbon-Eye dashboard is available to your own code and to AI assistants, with the same analyses, limits and caveats. Results are screening estimates of above-ground carbon, licensed CC BY 4.0.

Dry grassland and bush with several bare baobab trees under a blue sky with clouds
Baobabs across a dry valley in KilifiPhoto: Николай Максимович, CC BY 3.0, via Wikimedia Commons (resized)

1. Get an API key

Sign in, open the account menu and choose API keys (or go to /dashboard/api-keys). The key is shown once; keep it secret. It acts as you: it sees your analyses and saved areas, and you can revoke it at any time.

2. Call the REST API

Base URL https://carbon-eye-api-zbhgijzpsa-uc.a.run.app. Send the key as a bearer token.

curl -H "Authorization: Bearer ce_YOUR_KEY" \
  "https://carbon-eye-api-zbhgijzpsa-uc.a.run.app/runs?limit=5"

curl -X POST -H "Authorization: Bearer ce_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"counties": ["Nyeri"], "preset": "Balanced"}' \
  "https://carbon-eye-api-zbhgijzpsa-uc.a.run.app/runs"
MethodPathWhat it returns
GET/runs?limit=20Your analyses, newest first
POST/runsStart an analysis: counties, or a GeoJSON Polygon with "mode": "draw"
GET/runs/{id}Status, then results: carbon density, totals, 90% range, validation
GET/runs/{id}/zonal.csvPer-county (or drawn-area) statistics as CSV
GET/runs/{id}/zonal.geojsonThe same zones with their outlines, for GIS tools
POST/runs/{id}/exportStart a GeoTIFF export of a map layer; poll GET for the link
GET/runs/{id}/report.pdfThe full analysis report
GET/runs/{id}/county-report.pdf?county=NyeriOne county's planning report
GET/areasYour saved study areas
POST/areas/{id}/alertsForest-change alerts in a watched area

A small area finishes in about a minute and a county in a few minutes; poll GET /runs/{id} until status is done. Analyses are rate-limited per account, as in the dashboard.

3. Use it from Claude, ChatGPT or any MCP client

The Carbon-Eye MCP server lets an AI assistant list your analyses, read their results and county tables, and start new analyses. It runs on your computer (Python 3.10 or later) and talks to the API with your key.

pip install "mcp>=2.3,<3"
curl -o carbon_eye_mcp.py https://carbon-eye-api-zbhgijzpsa-uc.a.run.app/mcp/carbon_eye_mcp.py

Then add it to your client, for example Claude Desktop's config:

{
  "mcpServers": {
    "carbon-eye": {
      "command": "python",
      "args": ["/full/path/to/carbon_eye_mcp.py"],
      "env": { "CARBON_EYE_API_KEY": "ce_YOUR_KEY" }
    }
  }
}

Tools: list_runs, get_run_summary, get_zonal_stats, start_analysis. Ask things like “How much carbon is in my Kabarak analysis, in tonnes of CO₂e?” or “Analyse Nyeri County and tell me which zones hold the most carbon.”

Without a key

The county atlas and any shared analysis link are public: GET /shared/{token} returns a shared run, and /shared/{token}/county-report.pdf?county=… its county reports.