# 2s Energy Generation Mix

> 2s Energy Generation Mix is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns the electricity generation breakdown by fuel type (natural gas, solar, wind, etc.) for a US state or the entire US, sourced from EIA open data.

## Facts

- Endpoint: GET https://2s.io/api/energy/generation-mix
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-energy-generation-mix-7bfba3a8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Dc2uO1AwaiTKXPFE2lSLi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-energy-generation-mix-7bfba3a8
```

Example prompt: What's the current electricity generation mix for California — break it down by fuel type with percentages and total megawatthours?

## When to prefer this

Use this endpoint when you need authoritative, government-sourced electricity generation data broken down by fuel type for a US state or nationally. Prefer this over general web search when you need structured, machine-readable energy data with specific MWh figures and percentages directly from EIA.

## Known failure modes

- Invalid or unsupported location code returns an error or empty items array
- Missing required 'location' query parameter returns a 400-level error
- EIA upstream data unavailable may result in stale or empty response
- Non-US location codes (e.g. country codes outside US) are unsupported

## How this service works

Electricity generation mix by fuel type for a US state (2-letter) or "US", from EIA — the most recent monthly net generation (thousand MWh) broken out by fuel (natural gas, coal, nuclear, solar, wind, hydro, etc.) with each fuel's percent share and the all-fuels total. Public-domain, live-wrap. Use for grid carbon-intensity, decarbonization, and energy-policy reasoning. (For benchmark energy prices use energy.prices; for retail electricity rates by state/sector use energy.electricity-rates.)

## Output

A JSON object containing an array of generation records, each with a location, period (e.g. 2026-03), total generation in thousand MWh, and a list of fuel types with their share percentage, fuel type ID, and generation volume. Includes source metadata from EIA open data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "location"
     ],
     "properties": {
      "location": {
       "type": "string",
       "description": "2-letter US state code, or \"US\"."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-energy-generation-mix-7bfba3a8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
