Gramm Forecast API

Production API documentation for supported U.S. power markets. Use the docs to confirm auth, formats, supported runs, and delivery fit before cutover.

What to check before integration

Review the same forecast surface used in production, then pair it with the public benchmark on /accuracy and the review materials on /enterprise. Gramm supports day-ahead, 48-hour, 7-day, and 15-day forecast workflows.

Base URL

https://api.gramm.ai/oasis

All queries go through a single endpoint, exactly like CAISO OASIS. The queryname parameter selects the report type.

Authentication

All queries except TAC_AREAS require a Bearer token:

Authorization: Bearer grmm_your_api_key

Create an account to get an API key. Keys are prefixed with grmm_ and shown once on creation.

Supported Grids (TAC Areas)

Use any of these codes as tac_area_name. Omit the parameter to query all grids.

CISO
California ISO (CAISO)
California
active
ISNE
ISO New England
New England
active
MISO
Midcontinent ISO
Central US
active
NYIS
New York ISO (NYISO)
New York
active
PJM
PJM Interconnection
Mid-Atlantic / Midwest
active
SWPP
Southwest Power Pool
Central US
active
ERCO
ERCOT
Texas
active
NYIS-TOTAL
NYISO (system total)
New York
active

Query Parameters

ParameterTypeRequiredDescription
querynamestringYesSLD_FCST, SLD_ACTUAL, SLD_FCST_ACCURACY, TAC_AREAS
market_run_idstringSLD_FCST onlyDAM, 2DA, 7DA, 15DA (day-ahead, 2-day, 7-day, 15-day)
tac_area_namestringNoTAC area code (e.g., CISO, PJM). Omit for all grids.
startdatetimedatetimeSLD_FCST, SLD_ACTUALYYYYMMDDThh:mm-0000 (OASIS format)
enddatetimedatetimeSLD_FCST, SLD_ACTUALYYYYMMDDThh:mm-0000 (max 31-day range)
resultformatintNo5 = XML, 6 = CSV (default), 7 = JSON
versionintNoAPI version (default: 1)

Try the API

Build a request interactively. Select parameters below to generate the URL and code snippets. TAC_AREAS queries work without an API key.

API Builder

Select parameters to generate the request URL and code across active forecast runs.

GEThttps://api.gramm.ai/oasis?queryname=SLD_FCST&tac_area_name=CISO&resultformat=7&market_run_id=DAM
curl "https://api.gramm.ai/oasis?queryname=SLD_FCST&tac_area_name=CISO&resultformat=7&market_run_id=DAM" \
  -H "Authorization: Bearer grmm_your_api_key"

Report Types (queryname)

GET/oasis?queryname=SLD_FCST

System load demand forecast. Returns hourly MW values for the requested time range and market run. Identical to CAISO OASIS SLD_FCST query, extended across longer forecast horizons.

Example

curl "https://api.gramm.ai/oasis?queryname=SLD_FCST&\
  market_run_id=DAM&tac_area_name=CISO&\
  startdatetime=20260101T00:00-0000&\
  enddatetime=20260102T00:00-0000&resultformat=6" \
  -H "Authorization: Bearer grmm_your_api_key"

CSV Response (14 columns, OASIS-compatible)

INTERVALSTARTTIME_GMT,INTERVALENDTIME_GMT,LOAD_TYPE,OPR_DT,OPR_HR,OPR_INTERVAL,MARKET_RUN_ID,TAC_AREA_NAME,LABEL,XML_DATA_ITEM,POS,MW,EXECUTION_TYPE,GROUP
2026-01-01T08:00:00+00:00,2026-01-01T09:00:00+00:00,SYS,2026-01-01,1,1,DAM,CISO,Demand Forecast Day Ahead,SYS_FCST_DA_MW,0,18542.3,,
2026-01-01T09:00:00+00:00,2026-01-01T10:00:00+00:00,SYS,2026-01-01,2,1,DAM,CISO,Demand Forecast Day Ahead,SYS_FCST_DA_MW,0,17891.7,,
GET/oasis?queryname=SLD_ACTUAL

Historical actual load from EIA data. Same response format as SLD_FCST. The market_run_id is automatically set to ACTUAL.

GET/oasis?queryname=SLD_FCST_ACCURACY

Forecast accuracy metrics (gramm extension, not in CAISO OASIS). Returns rolling 30-day MAPE, RMSE, MAE, and bias for a TAC area and market run.

JSON Response (resultformat=7)

{
  "tac_area_name": "CISO",
  "market_run_id": "DAM",
  "model": "gramm-v1",
  "window_days": 30,
  "mape": 4.11,
  "rmse_mw": 312.5,
  "mae_mw": 245.8,
  "bias_mw": -15.2,
  "n_hours": 720
}
GET/oasis?queryname=TAC_AREAS

List all supported TAC areas with grid ID, ISO, timezone, and status. No authentication required.

Response Formats

resultformatFormatContent-TypeNotes
5XMLapplication/xmlOASISReport structure (CAISO-compatible)
6CSVtext/csvDefault. 14-column OASIS CSV
7JSONapplication/jsongramm extension (not in CAISO OASIS)

Rate Limits

Rate limits follow CAISO OASIS conventions. Exceeding limits returns HTTP 429 with a Retry-After header.

PlanRequests / HourRequests / DayAPI KeysMax Query Range
Trial1001,000231 days
Standard1,00010,0001031 days
Pro10,000100,0005031 days
Enterprise100,0001,000,00010031 days

Error Responses

Errors use machine-readable string codes. XML format for OASIS queries, JSON for resultformat=7. Every error includes a request_id for support debugging.

XML Error Response

<?xml version="1.0" encoding="UTF-8"?>
<OASISReport>
  <MessagePayload>
    <RTO>
      <ERROR>
        <ERR_CODE>rate_limited</ERR_CODE>
        <ERR_DESC>Rate limit exceeded for Trial plan. Retry after 1823 seconds.</ERR_DESC>
        <REQUEST_ID>req_m3k8f2_a9c4xp</REQUEST_ID>
        <DOCUMENTATION_URL>https://gramm.ai/api-docs#rate-limits</DOCUMENTATION_URL>
      </ERROR>
    </RTO>
  </MessagePayload>
</OASISReport>

JSON Error Response (resultformat=7)

{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded for Trial plan. Retry after 1823 seconds.",
    "documentation_url": "https://gramm.ai/api-docs#rate-limits",
    "request_id": "req_m3k8f2_a9c4xp",
    "details": {
      "plan": "trial",
      "limit_hourly": 100,
      "remaining_hourly": 0,
      "limit_daily": 1000,
      "remaining_daily": 450,
      "retry_after_seconds": 1823
    }
  }
}
HTTPCodeMeaning
401unauthorizedMissing or invalid API key
401invalid_keyAPI key revoked or not found
429rate_limitedRate limit exceeded (includes Retry-After header)
400invalid_queryUnsupported queryname
400missing_parameterRequired parameter not provided
404no_dataNo forecast data available for this grid

Migrating from CAISO OASIS

If you have existing scripts that query CAISO OASIS, migration is a one-line change:

# Before (CAISO)
BASE_URL = "https://oasis.caiso.com/oasisapi/SingleZip"

# After (gramm — covers 8 US ISOs, not just CAISO)
BASE_URL = "https://api.gramm.ai/oasis"

# Add authentication header
headers = {"Authorization": "Bearer grmm_your_api_key"}

# Everything else stays the same:
# ?queryname=SLD_FCST&market_run_id=DAM&tac_area_name=CISO&...

gramm extends CAISO OASIS with resultformat=7 (JSON) and queryname=SLD_FCST_ACCURACY for model accuracy metrics. All standard OASIS parameters and CSV/XML formats are identical.

Health Check

GET/v1/health

No authentication required. Returns API status, model name, version, and active grid count.

Support

Contact: api@gramm.ai Interactive docs: api.gramm.ai/docs (FastAPI Swagger UI)