Quickstart
The SequenxAI public API is available at https://api.sequenxai.com/v1. Two endpoints are live:
| Endpoint | What it does | Billing |
|---|---|---|
POST /v1/forecast | Cleans the history under the effective cleaning policy, then runs the forecast model; returns point forecasts, intervals and the cleaning report. | Observed points fed to the model + forecast points |
POST /v1/clean | Cleaning dry run (Beta): the same cleaning stage, returning the report and effective policy without calling a model. | Free, separately rate-limited |
The other OpenAPI paths (/anomaly-detection, /batch/*) and the /cn/v1 regional prefix are not open yet and return 404; the former are labelled "Not yet available" (x-availability: planned) in the OpenAPI reference and are planned, designed shapes only.
1. Create an API Key
- Sign in to the SequenxAI Platform: platform.sequenxai.com.
- On API Keys, click Create key and give it a name (1–64 characters). Workspace Owners, Admins and Members can create keys; Viewers cannot.
- The full key looks like
sqx_live_…and is shown only once. Copy it or download the.envfile before closing the dialog; a lost key can only be deleted and replaced.
2. Make your first forecast
All examples read the key from SEQUENX_API_KEY. The curl example uses the docs sample power-grid-15m.json (96 points at 15-minute steps, h = 24); the Python and JavaScript examples generate 48 hourly points locally.
export SEQUENX_API_KEY="sqx_live_..." # created at https://platform.sequenxai.com
# 96 points at 15-minute steps, h=24, level=[80, 90], model hora-1.0
curl -sSO https://docs.sequenxai.com/data/power-grid-15m.json
curl -sS -X POST "https://api.sequenxai.com/v1/forecast" \
-H "Authorization: Bearer $SEQUENX_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Request-Id: quickstart-0001" \
-d @power-grid-15m.jsonimport math
import os
import requests
API_URL = "https://api.sequenxai.com/v1/forecast"
API_KEY = os.environ["SEQUENX_API_KEY"]
# 48 hourly observations of one meter.
series = [
{
"unique_id": "meter-001",
"ds": f"2026-09-{1 + i // 24:02d}T{i % 24:02d}:00:00Z",
"y": round(140 + 8 * math.sin(2 * math.pi * i / 24), 1),
}
for i in range(48)
]
resp = requests.post(
API_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
json={"model": "hora-1.0", "series": series, "h": 24, "freq": "1h", "level": [80, 90]},
timeout=180,
)
body = resp.json()
if resp.status_code != 200:
error = body["error"]
raise SystemExit(f"{resp.status_code} {error['code']}: {error['message']} ({error['request_id']})")
print(body["request_id"], body["effective_policy"]["id"], body["usage"])
for row in body["forecast"][:3]:
print(row["ds"], row["y_hat"], row["intervals"]["80"])// Node.js 18+ (global fetch). Call from your server; never ship the key to a browser.
const API_URL = "https://api.sequenxai.com/v1/forecast";
// 48 hourly observations of one meter.
const series = Array.from({ length: 48 }, (_, i) => ({
unique_id: "meter-001",
ds: new Date(Date.UTC(2026, 8, 1, i)).toISOString().replace(".000Z", "Z"),
y: Math.round((140 + 8 * Math.sin((2 * Math.PI * i) / 24)) * 10) / 10,
}));
const resp = await fetch(API_URL, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SEQUENX_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ model: "hora-1.0", series, h: 24, freq: "1h", level: [80, 90] }),
signal: AbortSignal.timeout(180_000),
});
const body = await resp.json();
if (!resp.ok) {
const { code, message, request_id } = body.error;
throw new Error(`${resp.status} ${code}: ${message} (${request_id})`);
}
console.log(body.request_id, body.effective_policy.id, body.usage);
for (const row of body.forecast.slice(0, 3)) {
console.log(row.ds, row.y_hat, row.intervals["80"]);
}3. Read the response
A successful call returns HTTP 200. The numbers below are illustrative and cleaning_report is abridged:
{
"request_id": "req_4f1c8e2a9b7d4e0c8a3f5b6d7e8f9a0b",
"model_used": "hora-1.0",
"freq": "1h",
"forecast": [
{
"unique_id": "meter-001",
"ds": "2026-09-03T00:00:00Z",
"y_hat": 140.6,
"intervals": {
"80": {"lo": 137.9, "hi": 143.2},
"90": {"lo": 136.4, "hi": 144.8}
}
}
],
"data_quality": {
"status": "ok",
"inferred_freq": null,
"missing_ratio": 0.0,
"imputed_points": 0,
"outlier_points_suppressed": 0,
"timezone_normalized": true,
"notes": []
},
"usage": {
"series_count": 1,
"input_data_points": 48,
"forecast_data_points": 24,
"latency_ms": 812
},
"effective_policy": {
"id": "default@2026-13",
"preset": "default",
"version": "2026-13",
"source": "platform"
},
"model_input": [
{
"unique_id": "meter-001",
"context_points": 48,
"fed_points": 48,
"truncated": 0,
"missing_mode": "filled",
"covariates_used": false
}
],
"quantile_report": {
"policy": "nearest",
"requested": [0.05, 0.1, 0.5, 0.9, 0.95],
"used": [0.05, 0.1, 0.5, 0.9, 0.95],
"substitutions": []
},
"cleaning_report": {
"schema_version": "cleaning_report/1",
"policy": {"id": "default@2026-13", "...": "..."},
"overall": {"series_count": 1, "input_points": 48, "output_points": 48, "...": "..."},
"series": ["..."],
"warnings": [],
"blocking": [],
"decisions": []
}
}| Field | What to look at |
|---|---|
forecast[] | h rows per entity with ds in UTC (Z); intervals appear only when you asked for level. |
usage | input_data_points + forecast_data_points is what this call bills. |
effective_policy | The cleaning preset that applied and where it came from (request / key / organization / platform default). |
cleaning_report | The cleaning_report/1 structured report; decisions[] lists every data-changing decision. |
model_input[] | Points each entity actually handed to the model. History is never cut: an entity longer than the model's context returns SERIES_TOO_LONG. |
request_id | Same as the X-Request-Id response header; quote it when you contact support. |
Every field is described in POST /v1/forecast.
4. Dry-run the cleaning first (optional)
When you are unsure how your data will be treated, look at the report from the free /v1/clean first. It calls no model, bills nothing and does not use the daily point quota, but it is limited to 60 calls per minute per account (shared by all its keys) and 200,000 points per request.
# 12 hourly slots; 06:00 is missing. Free dry run: no model call, no points billed.
curl -sS -X POST "https://api.sequenxai.com/v1/clean" \
-H "Authorization: Bearer $SEQUENX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"freq": "1h",
"series": [
{"unique_id": "meter-001", "ds": "2026-09-01T00:00:00Z", "y": 142.5},
{"unique_id": "meter-001", "ds": "2026-09-01T01:00:00Z", "y": 141.8},
{"unique_id": "meter-001", "ds": "2026-09-01T02:00:00Z", "y": 140.9},
{"unique_id": "meter-001", "ds": "2026-09-01T03:00:00Z", "y": 139.7},
{"unique_id": "meter-001", "ds": "2026-09-01T04:00:00Z", "y": 139.2},
{"unique_id": "meter-001", "ds": "2026-09-01T05:00:00Z", "y": 138.8},
{"unique_id": "meter-001", "ds": "2026-09-01T07:00:00Z", "y": 138.2},
{"unique_id": "meter-001", "ds": "2026-09-01T08:00:00Z", "y": 139.0},
{"unique_id": "meter-001", "ds": "2026-09-01T09:00:00Z", "y": 140.4},
{"unique_id": "meter-001", "ds": "2026-09-01T10:00:00Z", "y": 141.3},
{"unique_id": "meter-001", "ds": "2026-09-01T11:00:00Z", "y": 142.0}
]
}'This series is missing the 06:00 stamp, so the report carries two decisions: grid.regrid (insert the empty slot) and gap.impute (fill it by linear interpolation). What each decision means and how to override it is in Cleaning Presets & Report.
5. Next steps
- Authentication & Headers: keys,
X-Request-Id, and headers that are not implemented yet. - Error Codes: the error envelope and every code the API returns.
- Metering, Quotas & Rate Limits: free-tier allowances, 429 headers and when the daily quota resets.