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/oasisAll 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_keyCreate 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.
CISOISNEMISONYISPJMSWPPERCONYIS-TOTALQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
queryname | string | Yes | SLD_FCST, SLD_ACTUAL, SLD_FCST_ACCURACY, TAC_AREAS |
market_run_id | string | SLD_FCST only | DAM, 2DA, 7DA, 15DA (day-ahead, 2-day, 7-day, 15-day) |
tac_area_name | string | No | TAC area code (e.g., CISO, PJM). Omit for all grids. |
startdatetime | datetime | SLD_FCST, SLD_ACTUAL | YYYYMMDDThh:mm-0000 (OASIS format) |
enddatetime | datetime | SLD_FCST, SLD_ACTUAL | YYYYMMDDThh:mm-0000 (max 31-day range) |
resultformat | int | No | 5 = XML, 6 = CSV (default), 7 = JSON |
version | int | No | API 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.
https://api.gramm.ai/oasis?queryname=SLD_FCST&tac_area_name=CISO&resultformat=7&market_run_id=DAMcurl "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)
/oasis?queryname=SLD_FCSTSystem 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,,/oasis?queryname=SLD_ACTUALHistorical actual load from EIA data. Same response format as SLD_FCST. The market_run_id is automatically set to ACTUAL.
/oasis?queryname=SLD_FCST_ACCURACYForecast 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
}/oasis?queryname=TAC_AREASList all supported TAC areas with grid ID, ISO, timezone, and status. No authentication required.
Response Formats
| resultformat | Format | Content-Type | Notes |
|---|---|---|---|
| 5 | XML | application/xml | OASISReport structure (CAISO-compatible) |
| 6 | CSV | text/csv | Default. 14-column OASIS CSV |
| 7 | JSON | application/json | gramm extension (not in CAISO OASIS) |
Rate Limits
Rate limits follow CAISO OASIS conventions. Exceeding limits returns HTTP 429 with a Retry-After header.
| Plan | Requests / Hour | Requests / Day | API Keys | Max Query Range |
|---|---|---|---|---|
| Trial | 100 | 1,000 | 2 | 31 days |
| Standard | 1,000 | 10,000 | 10 | 31 days |
| Pro | 10,000 | 100,000 | 50 | 31 days |
| Enterprise | 100,000 | 1,000,000 | 100 | 31 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
}
}
}| HTTP | Code | Meaning |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key |
| 401 | invalid_key | API key revoked or not found |
| 429 | rate_limited | Rate limit exceeded (includes Retry-After header) |
| 400 | invalid_query | Unsupported queryname |
| 400 | missing_parameter | Required parameter not provided |
| 404 | no_data | No 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
/v1/healthNo 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)