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.

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"| Method | Path | What it returns |
|---|---|---|
| GET | /runs?limit=20 | Your analyses, newest first |
| POST | /runs | Start 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.csv | Per-county (or drawn-area) statistics as CSV |
| GET | /runs/{id}/zonal.geojson | The same zones with their outlines, for GIS tools |
| POST | /runs/{id}/export | Start a GeoTIFF export of a map layer; poll GET for the link |
| GET | /runs/{id}/report.pdf | The full analysis report |
| GET | /runs/{id}/county-report.pdf?county=Nyeri | One county's planning report |
| GET | /areas | Your saved study areas |
| POST | /areas/{id}/alerts | Forest-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.pyThen 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.