Model Runs
List runs for a model
Returns a paginated list of runs for the model, ordered by creation time descending. By default only completed runs are returned.
Parameters
idstringrequired
sensitivitystringbase for base runs only, or pass a sensitivity id to filter to that variant. Omit to include every sensitivity.statusstringpending,running,failed). Defaults to completed.beforestringrunDatetime is before this ISO 8601 instant.afterstringrunDatetime is after this ISO 8601 instant.cursorstringnextCursor from a previous page.limitnumberReturns
dataModelRun[]nextCursorstring | nullcursor query parameter on the next request.hasMorebooleanError codes
curl "https://api.v2.pd4castr.com.au/v1/model/d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d/run?sensitivity={sensitivity}&status=completed&before={before}&after={after}&cursor={cursor}&limit={limit}" \
-H "Authorization: Bearer $PD4CASTR_TOKEN"{
"data": [
{
"id": "6ee9f6b4-7d31-4d51-8f8c-bd5f9b1f0d5e",
"status": "completed",
"modelId": "d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d",
"createdAt": "2026-04-12T03:14:15.000Z",
"runDatetime": "2026-04-12T00:00:00.000Z",
"startedAt": "2026-04-12T03:14:25.000Z",
"completedAt": "2026-04-12T03:15:08.000Z",
"erroredAt": null,
"sensitivity": null,
"axisValues": null,
"error": null,
"containerId": "365abb96b5f9400eb1f4b346480a9b25",
"hasAggregationErrors": false
},
{
"id": "5dd8e5a3-6c20-3d40-7e7b-ac4e8a0e9c4d",
"status": "completed",
"modelId": "d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d",
"createdAt": "2026-04-11T03:14:15.000Z",
"runDatetime": "2026-04-11T00:00:00.000Z",
"startedAt": "2026-04-11T03:14:23.000Z",
"completedAt": "2026-04-11T03:15:02.000Z",
"erroredAt": null,
"sensitivity": null,
"axisValues": null,
"error": null,
"containerId": "365abb96b5f9400eb1f4b346480a9b25",
"hasAggregationErrors": false
}
],
"nextCursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTA0LTExVDAzOjE0OjE1WiIsImlkIjoiNWRkIn0",
"hasMore": true
}Get the latest output
Convenience endpoint that returns the completed run's output for the newest run datetime, optionally with comparison runs. By default, restricts to base runs (no sensitivity). axis params select a run variant; without them, the run is the default variant's base run.
Parameters
idstringrequired
axisstringkey:value, split at the first :. Repeat the parameter to name several axes; an axis you omit resolves to its default. Values parse per the axis type declared on the model. Naming one key twice, an unknown key, or an undeclared value is a 400.comparisonModelstringsensitivitystringbase for base runs only, or a sensitivity id to fetch that variant. Defaults to base.Returns
runModelRunWithOutputcomparisonRunsRecord<string, ModelRunWithOutput>comparisonModel query parameters were supplied.Error codes
data.issues names each offending param and the accepted values.curl "https://api.v2.pd4castr.com.au/v1/model/d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d/run/latest/output?axis=ref_year:2015&comparisonModel={comparisonModel}&sensitivity={sensitivity}" \
-H "Authorization: Bearer $PD4CASTR_TOKEN"{
"run": {
"id": "6ee9f6b4-7d31-4d51-8f8c-bd5f9b1f0d5e",
"runDatetime": "2026-04-12T00:00:00.000Z",
"sensitivity": null,
"axisValues": null,
"model": {
"id": "d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d",
"displayName": "Demand Forecast (30min)",
"displayTimezone": "Australia/Sydney",
"revision": 0
},
"colours": {
"price": "#1f77b4"
},
"data": [
{
"forecast_datetime": "2026-04-12T00:30:00.000Z",
"price": 84.12
},
{
"forecast_datetime": "2026-04-12T01:00:00.000Z",
"price": 81.07
},
{
"forecast_datetime": "2026-04-12T01:30:00.000Z",
"price": 79.55
}
]
},
"comparisonRuns": {}
}Get the latest run
Convenience endpoint that returns the completed run for the newest run datetime. By default, restricts to base runs (no sensitivity). axis params select a run variant; without them, the run is the default variant's base run.
Parameters
idstringrequired
axisstringkey:value, split at the first :. Repeat the parameter to name several axes; an axis you omit resolves to its default. Values parse per the axis type declared on the model. Naming one key twice, an unknown key, or an undeclared value is a 400.sensitivitystringbase for base runs only, or a sensitivity id to fetch that variant. Defaults to base.Returns
idstringstatus"pending" | "input_files_prepared" | "running" | "completed" | "failed"modelIdstringcreatedAtstringrunDatetimestringstartedAtstring | nullcompletedAtstring | nullerroredAtstring | nullsensitivitySensitivity | nullaxisValuesRecord<string, unknown> | nullerrorstring | nullcontainerIdstring | nullhasAggregationErrorsbooleanError codes
data.issues names each offending param and the accepted values.curl "https://api.v2.pd4castr.com.au/v1/model/d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d/run/latest?axis=ref_year:2015&sensitivity={sensitivity}" \
-H "Authorization: Bearer $PD4CASTR_TOKEN"{
"id": "6ee9f6b4-7d31-4d51-8f8c-bd5f9b1f0d5e",
"status": "completed",
"modelId": "d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d",
"createdAt": "2026-04-12T03:14:15.000Z",
"runDatetime": "2026-04-12T00:00:00.000Z",
"startedAt": "2026-04-12T03:14:25.000Z",
"completedAt": "2026-04-12T03:15:08.000Z",
"erroredAt": null,
"sensitivity": null,
"axisValues": null,
"error": null,
"containerId": "365abb96b5f9400eb1f4b346480a9b25",
"hasAggregationErrors": false
}Get a run's output
Fetches the forecast output for a completed run, optionally with comparison runs.
Parameters
idstringrequired
runIdstringrequired
comparisonModelstringReturns
runModelRunWithOutputcomparisonRunsRecord<string, ModelRunWithOutput>comparisonModel query parameters were supplied.Error codes
curl "https://api.v2.pd4castr.com.au/v1/model/d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d/run/6ee9f6b4-7d31-4d51-8f8c-bd5f9b1f0d5e/output?comparisonModel={comparisonModel}" \
-H "Authorization: Bearer $PD4CASTR_TOKEN"{
"run": {
"id": "6ee9f6b4-7d31-4d51-8f8c-bd5f9b1f0d5e",
"runDatetime": "2026-04-12T00:00:00.000Z",
"sensitivity": null,
"axisValues": null,
"model": {
"id": "d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d",
"displayName": "Demand Forecast (30min)",
"displayTimezone": "Australia/Sydney",
"revision": 0
},
"colours": {
"price": "#1f77b4"
},
"data": [
{
"forecast_datetime": "2026-04-12T00:30:00.000Z",
"price": 84.12
},
{
"forecast_datetime": "2026-04-12T01:00:00.000Z",
"price": 81.07
},
{
"forecast_datetime": "2026-04-12T01:30:00.000Z",
"price": 79.55
}
]
},
"comparisonRuns": {}
}Get a run
Returns a single run by its unique id.
Parameters
idstringrequired
runIdstringrequired
Returns
idstringstatus"pending" | "input_files_prepared" | "running" | "completed" | "failed"modelIdstringcreatedAtstringrunDatetimestringstartedAtstring | nullcompletedAtstring | nullerroredAtstring | nullsensitivitySensitivity | nullaxisValuesRecord<string, unknown> | nullerrorstring | nullcontainerIdstring | nullhasAggregationErrorsbooleanError codes
curl "https://api.v2.pd4castr.com.au/v1/model/d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d/run/6ee9f6b4-7d31-4d51-8f8c-bd5f9b1f0d5e" \
-H "Authorization: Bearer $PD4CASTR_TOKEN"{
"id": "6ee9f6b4-7d31-4d51-8f8c-bd5f9b1f0d5e",
"status": "completed",
"modelId": "d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d",
"createdAt": "2026-04-12T03:14:15.000Z",
"runDatetime": "2026-04-12T00:00:00.000Z",
"startedAt": "2026-04-12T03:14:25.000Z",
"completedAt": "2026-04-12T03:15:08.000Z",
"erroredAt": null,
"sensitivity": null,
"axisValues": null,
"error": null,
"containerId": "365abb96b5f9400eb1f4b346480a9b25",
"hasAggregationErrors": false
}