API Reference

The Twynvex REST API lets you query simulation state, retrieve prediction horizons, and configure alert webhooks programmatically. All endpoints require Bearer token authentication.

Base URL
https://api.twynvex.com/v1  —  all endpoints are TLS 1.3 only.

Authentication

All API requests must include a Authorization: Bearer <api_key> header. API keys are scoped per workspace and generated in the dashboard under Settings → API keys.

GET /predictions/:model_id

Returns the current 4-hour prediction horizon for a unit operation model. The response includes the Monte Carlo ensemble summary (P10/P50/P90) and the Kalman filter state estimate used to initialize the current horizon.

GET /state/:model_id

Returns the current estimated physical state of the unit operation — temperatures, pressures, flow rates, and composition estimates — at the current moment, without the prediction horizon.

Alerts & webhooks

Configure webhook alerts when the model detects a predicted deviation exceeding a threshold. Webhooks are sent as HTTP POST with a JSON body to your specified URL.