Model Runs
List runs for a model
get/v1/model/:id/run
Returns a paginated list of runs for the model, ordered by creation time descending. By default only completed runs are returned.
Parameters
idstringrequired
Unique model identifier.
sensitivitystringFilter by sensitivity. Use
base for base runs only, or pass a sensitivity id to filter to that variant. Omit to include every sensitivity.statusstringFilter by run status. Provide once for a single status, or as a comma-separated list (
pending,running,failed). Defaults to completed.beforestringReturn only runs whose
runDatetime is before this ISO 8601 instant.afterstringReturn only runs whose
runDatetime is after this ISO 8601 instant.cursorstringCursor returned as
nextCursor from a previous page.limitnumberMaximum number of runs to return per page. Defaults to 20.
Returns
dataModelRun[]Runs in the current page, ordered by creation time descending.
nextCursorstring | nullCursor for the following page, or null if no further pages exist. Pass it as the
cursor query parameter on the next request.hasMorebooleanWhether more pages are available after this one.
Error codes
401Unauthorized
Missing or invalid bearer token.
GET /v1/model/:id/run
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"Response
{
"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,
"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,
"error": null,
"containerId": "365abb96b5f9400eb1f4b346480a9b25",
"hasAggregationErrors": false
}
],
"nextCursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTA0LTExVDAzOjE0OjE1WiIsImlkIjoiNWRkIn0",
"hasMore": true
}Get the latest output
get/v1/model/:id/run/latest/output
Convenience endpoint that returns the most recent completed run's output, optionally with comparison runs. By default, restricts to base runs (no sensitivity).
Parameters
idstringrequired
Unique model identifier.
comparisonModelstringOne or more model ids to include as comparison output. Repeat the parameter to pass multiple values.
sensitivitystringUse
base for base runs only, or a sensitivity id to fetch that variant. Defaults to base.Returns
runModelRunWithOutputThe primary run and its forecast output rows.
comparisonRunsRecord<string, ModelRunWithOutput>Comparison runs, keyed by model id. Empty when no
comparisonModel query parameters were supplied.Error codes
401Unauthorized
Missing or invalid bearer token.
404Not Found
Model not found or has no matching completed runs.
GET /v1/model/:id/run/latest/output
curl "https://api.v2.pd4castr.com.au/v1/model/d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d/run/latest/output?comparisonModel={comparisonModel}&sensitivity={sensitivity}" \
-H "Authorization: Bearer $PD4CASTR_TOKEN"Response
{
"run": {
"id": "6ee9f6b4-7d31-4d51-8f8c-bd5f9b1f0d5e",
"runDatetime": "2026-04-12T00:00:00.000Z",
"sensitivity": 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
get/v1/model/:id/run/latest
Convenience endpoint that returns the most recent completed run. By default, restricts to base runs (no sensitivity).
Parameters
idstringrequired
Unique model identifier.
sensitivitystringUse
base for base runs only, or a sensitivity id to fetch that variant. Defaults to base.Returns
idstringUnique run identifier.
status"pending" | "input_files_prepared" | "running" | "completed" | "failed"Current status of the run.
modelIdstringUnique identifier of the model the run belongs to.
createdAtstringISO 8601 timestamp at which the run was created.
runDatetimestringISO 8601 reference datetime that the run is forecasting from.
startedAtstring | nullISO 8601 timestamp at which execution started, or null if the run has not started.
completedAtstring | nullISO 8601 timestamp at which execution completed, or null if the run is still in progress or failed.
erroredAtstring | nullISO 8601 timestamp at which the run failed, or null if it did not fail.
sensitivitySensitivity | nullSensitivity used for the run, or null for a base run.
errorstring | nullError message if the run failed, otherwise null.
containerIdstring | nullOpaque identifier of the run's execution environment, when available.
hasAggregationErrorsbooleanWhether any of the run's inputs failed to prepare before execution.
Error codes
401Unauthorized
Missing or invalid bearer token.
404Not Found
Model not found or has no matching completed runs.
GET /v1/model/:id/run/latest
curl "https://api.v2.pd4castr.com.au/v1/model/d2f4e0c0-1c1a-4f7c-9b6c-3a4f2c1c1f8d/run/latest?sensitivity={sensitivity}" \
-H "Authorization: Bearer $PD4CASTR_TOKEN"Response
{
"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,
"error": null,
"containerId": "365abb96b5f9400eb1f4b346480a9b25",
"hasAggregationErrors": false
}Get a run's output
get/v1/model/:id/run/:runId/output
Fetches the forecast output for a completed run, optionally with comparison runs.
Parameters
idstringrequired
Unique model identifier.
runIdstringrequired
Unique run identifier.
comparisonModelstringOne or more model ids to include as comparison output. Repeat the parameter to pass multiple values.
Returns
runModelRunWithOutputThe primary run and its forecast output rows.
comparisonRunsRecord<string, ModelRunWithOutput>Comparison runs, keyed by model id. Empty when no
comparisonModel query parameters were supplied.Error codes
401Unauthorized
Missing or invalid bearer token.
404Not Found
No run exists with the given id.
GET /v1/model/:id/run/:runId/output
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"Response
{
"run": {
"id": "6ee9f6b4-7d31-4d51-8f8c-bd5f9b1f0d5e",
"runDatetime": "2026-04-12T00:00:00.000Z",
"sensitivity": 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
get/v1/model/:id/run/:runId
Returns a single run by its unique id.
Parameters
idstringrequired
Unique model identifier.
runIdstringrequired
Unique run identifier.
Returns
idstringUnique run identifier.
status"pending" | "input_files_prepared" | "running" | "completed" | "failed"Current status of the run.
modelIdstringUnique identifier of the model the run belongs to.
createdAtstringISO 8601 timestamp at which the run was created.
runDatetimestringISO 8601 reference datetime that the run is forecasting from.
startedAtstring | nullISO 8601 timestamp at which execution started, or null if the run has not started.
completedAtstring | nullISO 8601 timestamp at which execution completed, or null if the run is still in progress or failed.
erroredAtstring | nullISO 8601 timestamp at which the run failed, or null if it did not fail.
sensitivitySensitivity | nullSensitivity used for the run, or null for a base run.
errorstring | nullError message if the run failed, otherwise null.
containerIdstring | nullOpaque identifier of the run's execution environment, when available.
hasAggregationErrorsbooleanWhether any of the run's inputs failed to prepare before execution.
Error codes
401Unauthorized
Missing or invalid bearer token.
404Not Found
No run exists with the given id.
GET /v1/model/:id/run/:runId
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"Response
{
"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,
"error": null,
"containerId": "365abb96b5f9400eb1f4b346480a9b25",
"hasAggregationErrors": false
}