Predict.aiDocs

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.

  1. In the predictAI app, open Workspace Settings → API Tokens and create a token. Copy the pa_live_... value — it's shown only once.
  2. 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"
  }'
{ "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"
  }'
{
  "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"

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 '{}'
{
  "predictions": [
    { "label": "daily_sales", "point": [13102.4, 13350.9, 13571.2] }
  ],
  "horizon": 3,
  "inference_id": "3f1a…",
  "latency_ms": 245.67
}

Go further

On this page