Quickstart
Push a signal, create a goal, and get your first forecast — in about five minutes.
This walkthrough uses the fastest path through the platform: goals. You push some data in, tell predictAI what you want forecast, and the platform handles discovery, model selection, training, and deployment for you.
Get your credentials
You need two values: an API token and a workspace ID.
- In the predictAI app, open Workspace Settings → API Tokens and create
a token. Copy the
pa_live_...value — it's shown only once. - Your workspace ID is on the same settings page (you can also list your
workspaces with
GET /v1/workspace).
export API_BASE="https://api.predict.ai"
export TOKEN="pa_live_..."
export WORKSPACE_ID="..."https://api.predict.ai works for every account. If your data lives in
another region the API answers with a one-time redirect (the SDKs follow
it automatically); the exact base URL is shown next to your API token in
the app. See Base URL & versioning.
Push a signal
A signal is a named time series. Push a value to a key and the signal exists — no schema to define first:
curl -X POST "$API_BASE/v1/signal/push" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-Id: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"key": "daily_sales",
"value": 12841.50,
"timestamp": "2026-07-15T00:00:00Z"
}'from predictai import PredictAI
client = PredictAI(token="pa_live_…", workspace_id="ws_…")
data = client.signals.post_signal_push(json={
"key": "daily_sales",
"value": 12841.5,
"timestamp": "2026-07-15T00:00:00Z",
})
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…", workspaceId: "ws_…" });
const data = await client.signals.postSignalPush({
json: {
key: "daily_sales",
value: 12841.5,
timestamp: "2026-07-15T00:00:00Z",
},
});
{ "status": "ok" }In practice you'd push a backlog of history (one call per point, or use a bulk import for large datasets). A forecast needs history to learn from — a few hundred points is a good start.
Create a goal
A goal tells the platform what outcome you care about. Everything else — which signals drive it, which model fits best, when to retrain — is discovered automatically:
curl -X POST "$API_BASE/v1/goals" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-Id: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"target_key": "daily_sales",
"goal_type": "forecast_value"
}'from predictai import PredictAI
client = PredictAI(token="pa_live_…", workspace_id="ws_…")
data = client.goals.post_goals(json={
"target_key": "daily_sales",
"goal_type": "forecast_value",
})
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…", workspaceId: "ws_…" });
const data = await client.goals.postGoals({
json: {
target_key: "daily_sales",
goal_type: "forecast_value",
},
});
{
"data": {
"goal_id": "b7e9c2d4-…",
"run_id": "a1f3…",
"status": "queued",
"credits_charged": 25
}
}The 201 response means a discovery run is queued. The platform now
profiles your data, finds related signals, runs a model tournament, and
trains a champion. Watch progress with
GET /v1/goals/{goal_id} — or subscribe to the goal's
realtime channel instead of polling.
Get the forecast
Once the run completes and a champion is serving, the goal has a forecast:
curl "$API_BASE/v1/goals/$GOAL_ID/forecast" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-Id: $WORKSPACE_ID"from predictai import PredictAI
client = PredictAI(token="pa_live_…", workspace_id="ws_…")
data = client.goals.get_goals_by_goal_id_forecast(GOAL_ID)
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…", workspaceId: "ws_…" });
const data = await client.goals.getGoalsByGoalIdForecast(GOAL_ID);
For production integrations, call the inference alias — it always routes to the goal's current champion, so the URL survives champion swaps and re-deployments:
curl -X POST "$API_BASE/v1/inference/goals/$GOAL_ID/infer-segment" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-Id: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{}'from predictai import PredictAI
client = PredictAI(token="pa_live_…", workspace_id="ws_…")
data = client.inference.post_inference_goals_by_goal_id_infer_segment(GOAL_ID, json={})
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…", workspaceId: "ws_…" });
const data = await client.inference.postInferenceGoalsByGoalIdInferSegment(GOAL_ID, { json: {} });
{
"predictions": [
{ "label": "daily_sales", "point": [13102.4, 13350.9, 13571.2] }
],
"horizon": 3,
"inference_id": "3f1a…",
"latency_ms": 245.67
}Go further
- Want full control instead of autopilot? Build the loop yourself: create a model, set up a pipeline, deploy, and infer.
- Connect a database or upload files with Ingestion.
- Set up alerts and realtime events so the platform tells you when something changes.
- Understand what things cost before you scale up.

