Inference
Run forecasts against deployed models — by deployment, pipeline, or goal — and inspect the history.
The inference API serves forecasts from your deployed models. Everything upstream — pipelines, trainings, promotion — exists so you can call these endpoints.
Which URL should I call?
Three ways to address a model, from most to least stable:
| URL style | Survives | Use when |
|---|---|---|
POST /v1/inference/goals/{goal_id}/infer | Champion swaps and promotions | You track an outcome, not a model |
POST /v1/inference/pipelines/{pipeline_id}/infer | Promotions | You own the pipeline and want its current champion |
POST /v1/inference/deployments/{deployment_id}/infer | Nothing (version-pinned) | Reproducibility, or A/B testing a specific deployment |
Every promotion mints a new deployment ID, and a goal can swap champions
entirely. The goal and pipeline aliases resolve to the current deployment
on every request, so your integration never breaks when the model behind
it improves. The response's deployment_id always tells you which
concrete deployment served you.
Each URL style has an /infer-segment sibling where the platform prepares
model input from live segment data server-side — usually what you want.
Raw /infer takes an input tensor you build yourself.
Thirty seconds of API
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": [1250.75, 1274.1, …] }
],
"horizon": 14,
"labels": ["daily_sales"],
"deployment_id": "c4a7…",
"inference_id": "b7e6…",
"latency_ms": 245.67,
"timestamp": "2026-07-15T12:04:45.123000+00:00Z",
…
}In this section
Concepts
Addressing, raw vs segment inference, sync vs async, and logging.
Run a forecast
The task page: all three URL styles, request shapes, and errors.
Segment-based inference
What the platform prepares for you, body options, and when to go raw.
History & usage
Every inference is logged — list, audit, and chart usage.
Endpoints
Every inference route at a glance.

