Eco Router
v0.1.1Rank AWS, Google Cloud and Azure regions by grid carbon intensity and latency.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_regions List cloud regions
List the cloud regions Eco Router knows about (all public AWS, Google Cloud and Azure regions), with the electricity grid zone each one draws power from. Use it to look up valid region ids, written as provider/id (e.g. aws/eu-north-1), or to check which grid a region uses. Reads bundled data only: no carbon figures, no network calls, no API key. To compare regions by carbon, use rank_regions instead.
| Parameter | Type | Description |
|---|---|---|
country | string | Only return regions in this country (ISO 3166-1 alpha-2, e.g. "DE") or group (EU, EEA). Default: all. |
provider | string | Only return regions from this cloud provider: "aws", "gcp" (Google Cloud) or "azure". Default: all. |
rank_regions Rank cloud regions by carbon
Rank AWS, Google Cloud and Azure regions for a workload by the carbon intensity of their electricity grid, optionally balanced against estimated latency from an origin. Supports hard limits for allowed countries, maximum latency and maximum carbon intensity. Use it to decide where to run; to decide when to start a flexible batch job, use find_clean_window. Works with no setup from annual grid averages; with ELECTRICITY_MAPS_API_TOKEN it uses live grid data, falling back to annual averages per zone. Scores are relative to the regions evaluated. Read `notes` before relying on close scores.
| Parameter | Type | Description |
|---|---|---|
carbonWeight | number | How much carbon counts versus latency, from 0 (latency only) to 1 (carbon only). Default 0.7. Ignored without origin. |
countries | array | Only consider regions in these countries or groups (EU, EEA), e.g. ["EU"] for EU data residency. Default: all. |
energyKwh | number | Estimated energy the job uses, in kWh. When set, each result estimates the job's kg CO2e. |
limit | integer | How many regions to return, 1 to 20. Default 5. |
maxCarbonIntensity | number | Exclude regions whose grid is above this carbon intensity, in gCO2e/kWh (e.g. 100). |
maxLatencyMs | number | Exclude regions whose estimated round trip from origin is above this, in milliseconds. Requires origin. |
origin | object | Where the users or data are, e.g. { lat: -27.47, lon: 153.03 } for Brisbane. Enables latency estimates, latency weighting and maxLatencyMs. |
providers | array | Only consider these cloud providers: "aws", "gcp" (Google Cloud), "azure". Default: all. |
find_clean_window Find the cleanest time to run a job
For flexible batch jobs, find when in the next hours (up to 72) each candidate region's grid is forecast to be cleanest, and how much that saves compared with starting now. Local times default to this computer's time zone. Needs ELECTRICITY_MAPS_API_TOKEN with forecast access. Limit candidates with regions, providers or countries (at most 15 grid zones per call). Use it when the job can wait; to choose a region, or without a token, use rank_regions. Regions on the same grid zone share one result.
| Parameter | Type | Description |
|---|---|---|
durationHours * | integer | How long the job runs, in whole hours (1 to 72). Must not exceed withinHours. |
countries | array | Only consider regions in these countries or groups (EU, EEA), e.g. ["DE", "FR"]. |
energyKwh | number | Estimated energy the job uses, in kWh. When set, each option estimates kg CO2e, now and at the best time. |
limit | integer | How many grid zones to return, 1 to 20. Default 5. |
providers | array | Only consider these cloud providers: "aws", "gcp" (Google Cloud), "azure". |
regions | array | Candidate regions as provider/id, e.g. ["aws/eu-north-1", "gcp/europe-west9"]. Tip: shortlist with rank_regions first. All given filters must match. |
timezone | string | IANA time zone for local start times, e.g. "Australia/Brisbane". Defaults to the time zone of the computer running Eco Router; set it when the user is elsewhere. |
withinHours | integer | The job must finish within this many hours from now. Default 24, max 72. |