eazePredict API Documentation
Build prediction workflows for sales, demand, product usage, customer behavior, capacity, revenue, business metrics, operations, and service health.
The eazePredict API helps teams train models, run predictions, analyze time-series behavior, and support trust-aware forecasting workflows across the signals their business already creates: sales history, demand movement, product usage, customer actions, revenue patterns, capacity pressure, business metrics, and service-health signals when reliability is the workflow.
Base URL
Prediction API base path
All code-verified JSON routes on this page use the v1 prediction prefix. Add the endpoint path after this prefix.
/trace/engine/v1
Authentication
Use service-to-service Basic authorization
Protected routes under /trace/engine/v1/ require an
Authorization header using the configured service token. The token value is deployment-managed
through environment configuration and must not be exposed to browser clients.
Authorization: Basic <aiml-service-token>
Request format
Send JSON bodies with endpoint-specific request shapes
Training, prediction, and time-series routes use JSON request bodies. Include
Content-Type: application/json, provide the endpoint-required model or series fields,
and use timestamps and signal arrays in the documented request shape.
customerKeyis required on train and saved-model prediction requests.featureModelidentifies supervised model artifacts for train and predict routes.timeSeriesFeatureModelidentifies time-series model artifacts.externalFeaturesandfeatureOutputdescribe inputs and target output for product, customer, sales, demand, operational, business, or service signals.
Content-Type: application/json
Example request body
{
"customerKey": "eazepredict-demo",
"externalFeatures": [
{
"label": "website_visits",
"output": [
3000,
3500
]
},
{
"label": "discount_percent",
"output": [
15,
20
]
}
],
"featureModel": "productSalesForecast",
"featureOutput": {
"label": "units_sold"
},
"startDate": "Wed, 01 Jan 2025 00:00:00 GMT",
"timeSeriesFrequency": 1,
"timeSeriesType": "d"
}
Response format
Responses are JSON and vary by route family
Successful routes return JSON with model results, forecast results, diagnostics, or error fields depending on the route. Training routes can include artifact metadata and trust summaries. Prediction routes return a model name and prediction rows. Time-series diagnostics return route-specific measurements such as suggested order, stationarity tests, decomposition parts, or forecast rows.
{
"model": "linear",
"prediction": [
{
"units_sold": 166,
"timestamp": "Wed, 01 Jan 2025 10:00:00 GMT",
"website_visits": 3000.0,
"discount_percent": 15.0
},
{
"units_sold": 181,
"timestamp": "Wed, 01 Jan 2025 10:15:00 GMT",
"website_visits": 3500.0,
"discount_percent": 20.0
}
]
}
Error handling
Handle common HTTP statuses without exposing internal traces
Error bodies are JSON. Treat validation and missing-artifact failures as application responses, and keep stack traces in server logs only.
| Status Code | Meaning | Recommended action |
|---|---|---|
| 200 / 201 | Request completed successfully. | Read the response body for model output, diagnostics, or created result details. |
| 400 | Invalid or incomplete request. | Check required JSON fields, array lengths, content type, and timestamp formatting. |
| 401 | Missing or invalid authorization header. | Verify the deployment-provided service token and header scheme. |
| 404 | Route or model artifact was not found. | Check the endpoint path, model family, tenant key, feature model, and whether training has run. |
| 500 | Internal processing error. | Retry if appropriate and inspect sanitized server logs using the request correlation id. |
Endpoint group
Model Training
Training routes fit supervised regression models and save model artifacts for later prediction.
Requests use the shared training shape with customerKey, featureModel,
externalFeatures, featureOutput, startDate, and time-series cadence fields.
The same pattern can support product usage, sales movement, demand, customer behavior, revenue, capacity, operational counts, business metrics, or service-health signals.
/train/model/linear
Train a Linear Regression model with feature arrays and a numeric target output.
Supports a simple baseline before using more expressive model families.
Open Linear guide/train/model/polynomial
Train a Polynomial Regression model using the shared training request and optional degree.
Documented as a training route only. No code-verified prediction route is exposed for this family.
Open Polynomial guide/train/model/poisson
Train a Poisson Regression model for count-style targets such as units sold, transaction counts, usage counts, capacity counts, operational totals, or service-health counts.
Targets should be non-negative counts for the best model fit.
Open Poisson guide/train/model/decision_tree
Train a Decision Tree Regressor with optional tree hyperparameters.
Useful for threshold-driven behavior and non-linear business or operational patterns.
Open Decision Tree guide/train/model/randomforest
Train a Random Forest Regressor with optional ensemble hyperparameters.
Useful when feature interactions are richer than a single model path.
Open Random Forest guideEndpoint group
Prediction
Prediction routes load previously saved model artifacts and run inference on new feature arrays.
Train the model family first for the same customerKey, featureModel, and optional
subFeatureModel.
| Method | Path | Description |
|---|---|---|
| POST | /predict/linear |
Run inference with a saved Linear model. |
| POST | /predict/decision_tree |
Run inference with a saved Decision Tree model. |
| POST | /predict/randomforest |
Run inference with a saved Random Forest model. |
| POST | /predict/poisson |
Run inference with a saved Poisson model. |
Endpoint group
Time-Series Analysis
Time-series routes support forecasting, order selection, stationarity checks, random-walk baselines, and seasonal decomposition. These routes use signal arrays or structured time-series model requests for sales, demand, product usage, customer behavior, capacity, revenue, operations, and service health.
/timeseries/arima
Fit ARIMA and generate in-sample plus forecast rows.
Also supports /timeseries/arima/predict after a model artifact exists.
/timeseries/sarima
Fit SARIMA for seasonal time-series behavior and generate forecast rows.
Use /timeseries/sarima/predict for saved-model prediction.
/timeseries/autoarima
Automatically select a practical ARIMA order and fit the model.
Useful when order parameters are not known up front.
Open AutoARIMA guide/timeseries/autoregression
Fit an AutoRegression model from lagged historical values.
Includes /timeseries/autoregression/predict for saved model inference.
Endpoint group
Model Diagnostics and Forecasting Utilities
Diagnostic routes help select time-series parameters, inspect stationarity, decompose seasonality, and tune tree-based supervised models.
| Method | Path | Use |
|---|---|---|
| POST | /train/model/decision_tree/gridsearchcv |
Return best Decision Tree hyperparameters from GridSearchCV. |
| POST | /train/model/randomforest/gridsearchcv |
Return best Random Forest hyperparameters from GridSearchCV. |
| POST | /timeseries/arima/find_d |
Find a differencing order using ADF testing. |
| POST | /timeseries/arima/find_p |
Estimate AR order from PACF analysis. |
| POST | /timeseries/arima/find_q |
Estimate MA order from ACF analysis. |
| POST | /timeseries/arima/findOrder |
Suggest a full (p,d,q) order and optional AIC grid result. |
| POST | /timeseries/autoregression/find_p |
Estimate lag order for AutoRegression. |
| POST | /timeseries/arma/find_p |
Estimate AR order for ARMA. |
| POST | /timeseries/arma/find_q |
Estimate MA order for ARMA. |
| POST | /timeseries/stationarity |
Run ADF and KPSS stationarity checks with a recommendation. |
| POST | /timeseries/seasonal/decompose |
Return observed, trend, seasonal, residual, and seasonality-strength values. |
Code examples
Copy-friendly cURL examples
These examples use verified endpoint paths and request fields. Replace the token, customer key, feature model, timestamps, and signal values with deployment-specific values.
curl -X POST "/trace/engine/v1/train/model/linear" \
-H "Authorization: Basic <aiml-service-token>" \
-H "Content-Type: application/json" \
-d '{
"customerKey": "eazepredict-demo",
"featureModel": "weekly_product_sales",
"externalFeatures": [
{ "label": "site_visits", "output": [1000, 1200, 1400, 1600, 1800] },
{ "label": "campaign_spend", "output": [420, 470, 530, 580, 640] }
],
"featureOutput": { "label": "sales_units", "output": [22, 28, 31, 37, 43] },
"startDate": "2026-04-01T00:00:00Z",
"timeSeriesType": "h",
"timeSeriesFrequency": 1,
"train": 80
}'
curl -X POST "/trace/engine/v1/predict/linear" \
-H "Authorization: Basic <aiml-service-token>" \
-H "Content-Type: application/json" \
-d '{
"customerKey": "eazepredict-demo",
"featureModel": "weekly_product_sales",
"externalFeatures": [
{ "label": "site_visits", "output": [1900, 2100] },
{ "label": "campaign_spend", "output": [660, 700] }
],
"featureOutput": { "label": "sales_units" },
"startDate": "2026-04-01T06:00:00Z",
"timeSeriesType": "h",
"timeSeriesFrequency": 1
}'
curl -X POST "/trace/engine/v1/timeseries/arima/findOrder" \
-H "Authorization: Basic <aiml-service-token>" \
-H "Content-Type: application/json" \
-d '{
"timeSeriesInput": [12, 13, 13, 14, 15, 15, 16, 19, 21, 24],
"maxD": 2,
"alpha": 0.05,
"maxLag": 4,
"gridSearch": true
}'
curl -X POST "/trace/engine/v1/timeseries/stationarity" \
-H "Authorization: Basic <aiml-service-token>" \
-H "Content-Type: application/json" \
-d '{
"timeSeriesInput": [12, 13, 13, 14, 15, 15, 16],
"significance": 0.05
}'