Carbon Aware API

Spin up instances in low CO² regions or change your website to match you users location.

start.ts
import { CarbonAwareAPI } from "@fikastudio/carbonaware";

const client = new CarbonAwareAPI(
  process.env.CARBONAWARE_ACCESS_TOKEN,
  process.env.CARBONAWARE_SECRET_TOKEN
);

// All regions ranked
const { regions } = await apiclient.byRank({ limit: 3 });

// All providers
const { providers } = await apiclient.providers();

// One cloud provider, e.g. vultr
const { provider } = await apiclient.provider('vultr');

// Cloud provider regions
const { provider } = await apiclient.byProvider('vultr');