<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: CarbonLayer</title>
    <description>The latest articles on DEV Community by CarbonLayer (@carbonlayer).</description>
    <link>https://dev.to/carbonlayer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4061493%2F3cca31a4-b4c7-464f-a343-1b238cad9843.png</url>
      <title>DEV Community: CarbonLayer</title>
      <link>https://dev.to/carbonlayer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/carbonlayer"/>
    <language>en</language>
    <item>
      <title>Carbon-Aware Inference in 5 Minutes: A CarbonLayer Quickstart</title>
      <dc:creator>CarbonLayer</dc:creator>
      <pubDate>Tue, 04 Aug 2026 01:21:47 +0000</pubDate>
      <link>https://dev.to/carbonlayer/carbon-aware-inference-in-5-minutes-a-carbonlayer-quickstart-2o46</link>
      <guid>https://dev.to/carbonlayer/carbon-aware-inference-in-5-minutes-a-carbonlayer-quickstart-2o46</guid>
      <description>&lt;p&gt;&lt;em&gt;If you read the last post on how CarbonLayer routes inference for lower carbon and water cost, here's the part that matters more: actually calling it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Get an API key&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sign up, then generate a key from the dashboard's API Keys section. Keys are scoped per account — list, create, and revoke them anytime, nothing shared across teams unless you explicitly invite someone in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Call the inference endpoint&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;curl -X POST &lt;a href="https://carbonlayer.polsia.io/api/inference" rel="noopener noreferrer"&gt;https://carbonlayer.polsia.io/api/inference&lt;/a&gt; \&lt;br&gt;
  -H "Authorization: Bearer YOUR_API_KEY" \&lt;br&gt;
  -H "Content-Type: application/json" \&lt;br&gt;
  -d '{&lt;br&gt;
    "prompt": "Your prompt here",&lt;br&gt;
    "model": "your-model-id"&lt;br&gt;
  }'&lt;br&gt;
Or with fetch:&lt;/p&gt;

&lt;p&gt;const res = await fetch("&lt;a href="https://carbonlayer.polsia.io/api/inference" rel="noopener noreferrer"&gt;https://carbonlayer.polsia.io/api/inference&lt;/a&gt;", {&lt;br&gt;
  method: "POST",&lt;br&gt;
  headers: {&lt;br&gt;
    "Authorization": "Bearer YOUR_API_KEY",&lt;br&gt;
    "Content-Type": "application/json"&lt;br&gt;
  },&lt;br&gt;
  body: JSON.stringify({&lt;br&gt;
    prompt: "Your prompt here",&lt;br&gt;
    model: "your-model-id"&lt;br&gt;
  })&lt;br&gt;
});&lt;br&gt;
const data = await res.json();&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Read the savings back&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every response carries the routing decision alongside the model output — which edge site served it, and what it saved versus a fixed-location baseline: savedCO2g, savedWaterMl, waterIntensityMlPerKwh.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Check cumulative impact&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GET /api/usage — your own key's usage and savings over time&lt;br&gt;
GET /api/network and GET /api/savings — aggregate numbers across the whole network&lt;br&gt;
GET /api/grid-intensity — the live grid data feeding routing decisions, cached on a 5-minute window.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. See it in the dashboard&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Same numbers, visualized — no separate setup, it's live the moment your key starts making calls.&lt;/p&gt;

&lt;p&gt;That's the whole loop: one API call, real routing, real numbers back. No separate SDK to install, no sustainability report to wait on.&lt;/p&gt;

&lt;p&gt;Full reference at CarbonLayer's /docs.&lt;/p&gt;

</description>
      <category>api</category>
      <category>ai</category>
      <category>sustainability</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>CarbonLayer</title>
      <dc:creator>CarbonLayer</dc:creator>
      <pubDate>Tue, 04 Aug 2026 01:06:43 +0000</pubDate>
      <link>https://dev.to/carbonlayer/carbonlayer-g57</link>
      <guid>https://dev.to/carbonlayer/carbonlayer-g57</guid>
      <description>&lt;p&gt;How CarbonLayer Routes AI Inference to Cut Carbon — and Water — Per Request&lt;/p&gt;

&lt;p&gt;Most "sustainable AI" claims are marketing copy with no math behind them. Here's the actual mechanism CarbonLayer uses to cut carbon and water cost per inference call, and how we measure it.&lt;/p&gt;

&lt;p&gt;The problem&lt;/p&gt;

&lt;p&gt;Every inference call runs somewhere — a specific data center, on a specific grid, at a specific moment. Grid carbon intensity swings hard by time of day and location (a request served from a coal-heavy grid at peak demand can cost 5-10x the CO₂ of the same request served from a renewable-heavy grid off-peak). Most inference routing ignores this entirely and optimizes purely for latency or cost.&lt;/p&gt;

&lt;p&gt;What we do instead&lt;/p&gt;

&lt;p&gt;CarbonLayer routes inference across 7 edge sites, factoring live grid intensity into the routing decision alongside latency and cost. We pull grid carbon data through a live adapter, cached on a 5-minute window (/api/grid-intensity) so routing decisions reflect near-real-time conditions, not stale averages.&lt;/p&gt;

&lt;p&gt;The math, per request&lt;/p&gt;

&lt;p&gt;Every inference call returns:&lt;/p&gt;

&lt;p&gt;savedCO2g — grams of CO₂ avoided vs. a fixed-location baseline&lt;br&gt;
savedWaterMl — millilitres of water avoided (data center cooling draws real water, and it scales with the same grid/thermal conditions as carbon)&lt;br&gt;
waterIntensityMlPerKwh — the water-per-kWh figure for the site actually serving the request&lt;br&gt;
This isn't an estimate applied after the fact — it's calculated per call, using the actual site the request landed on and the actual grid intensity at that moment.&lt;/p&gt;

&lt;p&gt;Why water, not just carbon&lt;/p&gt;

&lt;p&gt;Carbon gets all the attention. Water doesn't, and it should — data center cooling is a real, measurable draw that scales with compute the same way carbon does. We treat it as a first-class number, not a footnote.&lt;/p&gt;

&lt;p&gt;Where you can see it&lt;/p&gt;

&lt;p&gt;/api/usage — per-API-key usage and savings, so you can see the impact of your own calls&lt;br&gt;
/api/network and /api/savings — aggregate carbon + water numbers across the network&lt;br&gt;
Dashboard — the same numbers, visualized&lt;/p&gt;

&lt;p&gt;Why this matters beyond one company's inference bill&lt;/p&gt;

&lt;p&gt;Right now, most data center operators report carbon and water at the facility or annual level — self-reported, aggregated, impossible to verify against actual workload. When savings numbers are calculated per-request, tied to the real site and real grid conditions at that moment, that's a verifiable trail instead of a sustainability report nobody can check. Enough companies routing on real per-call data starts to create pressure that annual PR reports never do — a market signal for which sites and which grids actually perform, not just claim to.&lt;/p&gt;

&lt;p&gt;That's the direction we're building toward: this started as inference routing, but the same mechanism — measure the real resource cost of a workload, route to where it's genuinely cheaper, make the number visible per call — extends past inference. Training runs carry the same carbon/water math, just at different scale. And industries with specific compute and compliance profiles (healthcare, fintech, public sector) need this accountability baked in, not bolted on after the fact.&lt;/p&gt;

&lt;p&gt;The inference tracker is the first proof point. The bigger bet is that verifiable, per-workload resource accounting becomes infrastructure every AI workload runs on — not a badge you slap on afterward.&lt;/p&gt;

&lt;p&gt;Check out CarbonLayer, &lt;br&gt;
Cut AI Carbon by Up to 80%&lt;br&gt;
Sustainable AI Infrastructure&lt;br&gt;
Track carbon and water per inference. Free tier, no credit card. Sign up in minutes.&lt;br&gt;
Route AI workloads to renewable windows automatically. &lt;br&gt;
Free for up to 50K inferences/mo.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://carbonlayer.polsia.app" rel="noopener noreferrer"&gt;https://carbonlayer.polsia.app&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sustainability</category>
      <category>ai</category>
      <category>machinelearning</category>
      <category>api</category>
    </item>
  </channel>
</rss>
