Omnizyro

Docs / API

REST API reference

Base URL https://api.omnizyro.ca/v1. Preview, subject to change

Authentication

Send an API key as a bearer token: Authorization: Bearer <key>. Keys belong to a project and carry scopes. Test keys start with oz_test_ and run only on synthetic data. Never put keys in a form, an email or client-side code.

ScopeAllows
scenarios:readList and read scenarios, storms and versions
runs:writeStart and cancel runs
runs:readRead runs, results and metrics
webhooks:manageCreate and rotate webhook endpoints

Rate limits

Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit you get 429 with Retry-After. Limits in preview are indicative and may change.

Errors

HTTPCodeMeaning
400invalid_requestA field is missing or out of range
401unauthenticatedNo key, or the key is revoked
403insufficient_scopeThe key lacks the scope for this call
404not_foundNo such object in this project
409conflictIdempotency key reused with a different body
422scenario_incompleteThe scenario lacks an approved network or terrain version
429rate_limitedToo many requests; see Retry-After

Start a run POST /scenarios/{id}/runs

Queues a Omnizyro Flow run for a scenario. Scope runs:write. Send an Idempotency-Key so a retry never starts a second run.

POST https://api.omnizyro.ca/v1/scenarios/scn_7Qk2/runs
Authorization: Bearer oz_test_xxxxxxxxxxxxxxxx
Content-Type: application/json
Idempotency-Key: 2f1c9a0e-run-01

{
  "resolution_m": 2,
  "duration_min": 240,
  "outputs": ["depth", "velocity", "hazard"],
  "notify": true
}

Response 202 Accepted

{
  "id": "run_91Hd",
  "scenario_id": "scn_7Qk2",
  "status": "queued",
  "created_at": "2026-12-04T06:40:11Z",
  "manifest_url": "/v1/runs/run_91Hd/manifest"
}

List runs GET /runs

Filters: project_id, scenario_id, status (queued, running, succeeded, failed), created_after. Cursor pagination with limit (max 100) and cursor.

GET https://api.omnizyro.ca/v1/runs?project_id=prj_3Lm&status=succeeded&limit=20&cursor=eyJwIjoyfQ
Authorization: Bearer oz_test_xxxxxxxxxxxxxxxx
{
  "data": [
    { "id": "run_91Hd", "scenario_id": "scn_7Qk2", "status": "succeeded",
      "started_at": "2026-12-04T06:41:02Z", "finished_at": "2026-12-04T06:58:47Z" }
  ],
  "next_cursor": "eyJwIjozfQ",
  "has_more": true
}

Run metrics GET /runs/{id}/metrics

Summary metrics for one run, optionally joined to an asset layer.

GET https://api.omnizyro.ca/v1/runs/run_91Hd/metrics?asset_layer=critical
Authorization: Bearer oz_test_xxxxxxxxxxxxxxxx
{
  "run_id": "run_91Hd",
  "max_depth_m": 0.74,
  "wet_area_km2": 3.2,
  "road_km_over_0_3m": 6.8,
  "mass_balance_error_pct": 0.02,
  "assets": [
    { "id": "U1", "type": "underpass", "peak_depth_m": 0.46, "first_ponding_min": 26 }
  ],
  "note": "Example values for documentation only."
}

List scenarios GET /scenarios

Filter by project_id and storm_id; same pagination as runs.

GET https://api.omnizyro.ca/v1/scenarios?project_id=prj_3Lm&storm_id=stm_25y2h
Authorization: Bearer oz_test_xxxxxxxxxxxxxxxx

Webhooks

Register an HTTPS endpoint per project. We send POST requests with a JSON body and a Omnizyro-Signature header. Failed deliveries are retried with exponential backoff for up to 24 hours; return any 2xx to acknowledge.

run.failed

{
  "id": "evt_4tq",
  "type": "run.failed",
  "created_at": "2026-12-04T07:02:10Z",
  "data": { "run_id": "run_92Ab", "reason": "mass_balance_exceeded", "detail": "Mass balance error above project limit; results withheld." }
}

model.drift_detected

Sent when a surrogate's answers diverge from fresh solver checks. The surrogate is switched off for that project until someone reviews it.

{
  "id": "evt_4tr",
  "type": "model.drift_detected",
  "created_at": "2026-12-04T07:15:44Z",
  "data": { "model": "surrogate-prj_3Lm-v3", "check_runs": 12, "median_abs_error_m": 0.09, "threshold_m": 0.05, "action": "surrogate_disabled_until_review" }
}

Verify the signature (HMAC-SHA256)

Compute HMAC-SHA256 over timestamp + "." + raw body with your endpoint secret, compare in constant time, and reject timestamps older than five minutes.

import hmac, hashlib

def verify(secret: bytes, body: bytes, header: str) -> bool:
    # Header format: t=<unix seconds>,v1=<hex digest>
    parts = dict(p.split("=", 1) for p in header.split(","))
    signed = parts["t"].encode() + b"." + body
    expected = hmac.new(secret, signed, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts["v1"])

Model one catchment with us for 60 days

Design partners get the full platform for one catchment, a shared validation plan against observed flood marks, and direct access to the people building the solver.

Become a design partner Try the live demo