Summarize best/median/worst scenarios
scenario_analysisRuns a simulation once and summarises a target node's worst/median/best outcomes (any percentiles), each paired with a best-effort driving input per root node. Use this when you need a quick worst-case/median/best-case narrative for a plan rather than the full distribution. Debits one credit for authenticated callers. Example: {"graph":{"root_nodes":[{"id":"root","distribution_type":"normal","distribution_params":{"mean":100,"std":15}}],"calc_nodes":[{"id":"out","formula":"{e1}"}],"edges":[{"id":"e1","source":"root","target":"out"}],"run_params":{"trials":1000,"time_periods":12}}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Optional RNG seed for a reproducible run. | |
| graph | Yes | The full simulation graph (same shape as run_simulation). | |
| api_key | No | Your API key from POST /api/v1/accounts. Debits credits per analysis (priced like one run). Omit to run anonymously (free). | |
| percentiles | No | Scenario percentiles in [0,1]. Default [0.0, 0.5, 1.0] = worst / median / best. | |
| time_period | No | 0-based time period to analyse. Defaults to the last period (time_periods - 1). | |
| target_node_id | No | The output node to summarise. Defaults to the graph's last calc node (the usual goal node). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trials | Yes | ||
| scenarios | No | ||
| time_period | Yes | ||
| runs_executed | Yes | Simulation runs the analysis cost (always 1 — one run reused). | |
| target_node_id | Yes | ||
| credits_debited | No | Credits charged to the account (0 for anonymous). |