Start a simulation run (spends compute)
start_simulationStart a flood simulation run for a built scenario, then poll get_run_status to track progress. Requires a launch-level agent key and user-reviewed inputs.
Instructions
Start a flood simulation run for a built scenario.
Needs a launch-level agent key (a run spends compute); a read or draft key gets 403 AGENT_LEVEL_INSUFFICIENT — the user creates a launch key on the site's Agent keys page (/agents/).
The scenario must be in 'built' status. Returns 202 with the new run. The run transitions through: built → queued → computing → processing → complete.
After starting, poll get_run_status to track progress. Returns 409
if the scenario is not in the correct state. The returned run record has
its presigned s3_*_url links elided (6-hour capabilities).
INPUT REVIEW (Hydrata enforces it): while an input you wrote is not reviewed by
the user, the run is not started - outcome unreviewed_inputs,
error_code UNREVIEWED_INPUTS, a ui_url to the scenario's review screen.
A run built from inputs other than the ones reviewed now answers
outcome run_invalidated (RUN_INVALIDATED): build_scenario with
rebuild=true, then start it again.
SPEND CONSENT (Hydrata enforces it; you cannot): a run whose quote does not
fit your agent key's monthly spend limit (default $0), or that Hydrata
cannot price, is NOT started. The result is then a normal (non-error)
answer with outcome consent_required, error_code CONSENT_REQUIRED,
quoted_cost_usd and consent_url: give the user the link and the price
(say_to_user). Only they can approve, in their browser. Then do NOT call
start_simulation again for this run: poll get_run_status(run_id) — the run
leaves built once they press the button. (With consent_timeout_seconds > 0
this call polls the run itself and answers outcome consented, with the
run, if they approve within that time.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scenario_id | Yes | The scenario ID to run | |
| poll_interval_seconds | No | Seconds between consent polls (default 5) | |
| consent_timeout_seconds | No | When the run needs the person's consent (CONSENT_REQUIRED), how long this call keeps polling the run for their click before it returns (ceiling 200). Default 0: return the consent link at once, so you can give it to them — they cannot press a button they have not been shown. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||