Examples
Complete, runnable walkthroughs — from your first push to autopilot goals, scenarios, and alerts.
Every example on these pages is a complete story built with the official SDKs — run the blocks top to bottom in a notebook or a script and they work. They start trivial and build up to the platform's most powerful surfaces.
All you need is an API token:
pip install predictai # Python
npm install @predictai/sdk # NodeStart here
Hello, predictAI
The smallest possible program: push values, read them back, and see your data start to connect. Five minutes, five calls.
A forecast with zero training
Deploy a pretrained foundation model zero-shot and get a probabilistic forecast — no training run, no waiting.
CSV to live forecast
The full production loop: load history from a CSV, define a segment, train a model, deploy the winner, and serve forecasts over HTTP.
Go deeper
Race a model pool
Put a custom LSTM and a foundation model in the same pipeline, let every run train both, and deploy whichever wins.
A goal on autopilot
Name an outcome and let the platform find its drivers, train champions, and keep a forecast live — then ask it why.
What-if scenarios
Move a driver, replay an event, and watch the forecast respond — counterfactuals served by the live champion.
Alerts that watch the forecast
Put a condition on the future — get told the moment the forecast crosses it, on the channels you choose.
An anomaly goal, end to end
The capstone: one CSV upload, an anomaly goal, alerts — and every step watched live over WebSockets instead of polling.
The samples use Python and Node tabs — pick your language once and every
page on the site follows. IDs (ws_…, segment and pipeline UIDs) are
placeholders: each example tells you where its inputs come from.

