AVRENIX API
Programmatic access to all nine Avrenix engines. Integrate FENRIR's adversarial planning, HELIOS's ensemble forecasts, and STRIX's Monte Carlo simulation directly into your dispatch systems, trading platform, or SCADA integration.
All API requests require a JWT bearer token. Obtain your token from the portal under Settings → API Keys. Tokens are scoped to your plan — Fleet tokens access FoM engines only; Enterprise tokens access all nine engines including PHALANX and TARSIS.
Include your token in every request as Authorization: Bearer <token>. Tokens expire after 24 hours. Use POST /auth/refresh with your refresh token to obtain a new access token without re-authenticating.
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... Content-Type: application/json
// Request { "email": "[email protected]", "password": "••••••••••••" } // Response { "ok": true, "data": { "token": "eyJhbGci...", "expires_in": 86400, "user": { "email": "[email protected]", "plan": "fleet" } } }
Runs the complete differentiators cycle: adversarial scenario generation, market microstructure analysis, causal attribution, grid personality update, and autonomous negotiation. Returns a synthesised dispatch recommendation with full engine outputs.
| Field | Type | Default | Description |
|---|---|---|---|
| site_id | string | "default" | Unique site identifier |
| battery_power_mw | float | 50.0 | Rated battery power in MW |
| battery_capacity_mwh | float | 200.0 | Usable energy capacity in MWh |
| current_soc | float | 0.65 | State of charge 0–1 |
| current_price | float | — | Required. Spot price $/MWh |
| planned_dispatch_mw | float | 45.0 | Planned dispatch MW this interval |
| direction | string | "discharge" | "charge" | "discharge" | "idle" |
| horizon_hours | int | 4 | Planning horizon (1–48) |
{
"site_id": "site-001",
"battery_power_mw": 100,
"battery_capacity_mwh": 400,
"current_soc": 0.75,
"current_price": 80.00,
"planned_dispatch_mw": 80,
"direction": "discharge",
"horizon_hours": 4
}
{
"ok": true,
"data": {
"cycle_id": "...",
"recommended_dispatch_mw": 80.0,
"recommended_direction": "discharge",
"confidence": 0.88,
"estimated_revenue": /* $ over horizon */,
"regime": "peak",
"adversarial_report": { /* AdversarialReport */ },
"differentiator_insights": ["Grid regime: PEAK..."]
}
}
Four-model ensemble (LSTM, XGBoost, Prophet, TFT) with conformal prediction intervals guaranteeing calibrated coverage. Drift detection via ADWIN + PSI alerts when market regime shifts.
| Field | Type | Default | Description |
|---|---|---|---|
| values | float[] | — | Required. Historical observations (min 24, recommend 168) |
| periods | int | 48 | Forecast horizon in intervals |
| weights | object | null | Per-model weight overrides {"LSTM": 0.5, ...} |
{
"ensemble_forecast": [...], // forecast horizon values
"p10": [...], // lower prediction interval
"p90": [...], // upper prediction interval
"mape": /* error on your data */,
"coverage": /* conformal interval coverage */,
"models": {
"LSTM": { "weight": ..., "mape": ... },
"XGBoost": { "weight": ..., "mape": ... }
}
}
Bayesian Monte Carlo simulation over stochastic price and load futures. Evaluates dispatch policies (Arbitrage-Opt, Risk-Aware CVaR, RL Aggressive) across thousands of sampled paths and returns Shapley attribution of P10/P50/P90 revenue.
| Field | Type | Default | Description |
|---|---|---|---|
| policy | string | "arbitrage" | "arbitrage" | "cvar" | "rl" |
| n_paths | int | 10000 | Monte Carlo path count (1k–50k) |
| horizon_days | int | 30 | Simulation horizon in days |
| battery_power_mw | float | 50.0 | Battery power rating |
| battery_capacity_mwh | float | 200.0 | Battery energy capacity |
{
"job_id": "...",
"p10_annual_revenue": /* $ at 10th percentile */,
"p50_annual_revenue": /* $ at median */,
"p90_annual_revenue": /* $ at 90th percentile */,
"paths_per_second": /* observed sim throughput */,
"shapley": {
"forecast_accuracy": ...,
"regime_classification": ...,
"soc_management": ...,
"ancillary_revenue": ...
}
}
Probabilistic peak window forecasting for behind-the-meter facilities. Every candidate dispatch schedule is validated through STRIX before commitment — any schedule with peak miss probability above 5% is rejected. Demand-charge reduction is measured on your own billing data during a pilot.
| Field | Type | Default | Description |
|---|---|---|---|
| facility_id | string | "default" | Facility identifier |
| current_load_kw | float | — | Required. Current facility load in kW |
| temperature_f | float | 75.0 | Ambient temperature °F (weather-driven load) |
| hour_of_day | int | — | Required. Hour 0–23 |
| days_remaining | int | — | Required. Days left in billing period |
{
"peak_risk_probability": /* 0–1 */,
"window_start": "14:30",
"window_end": "16:00",
"confidence": /* 0–1 */,
"recommended_action": "discharge_full",
"demand_charge_liability":/* $ exposure */
}
Joint optimisation across all tariff components — TOU energy charges, demand tiers, NEM export compensation, EV fleet coordination, and 12-month ratchet clauses — as a single objective function. 200+ utility rate structures supported.
| Field | Type | Default | Description |
|---|---|---|---|
| facility_id | string | "default" | Facility identifier |
| tariff | string | "PG&E-BDB" | Tariff code from 200+ library (GET /tarsis/tariffs) |
| current_soc | float | 0.65 | Battery state of charge 0–1 |
| month | int | — | Required. Billing month 1–12 (affects seasonal rates) |
{
"rate_breakdown": {
"tou_savings": /* $ */,
"demand_savings": /* $ */,
"export_revenue": /* $ */,
"ev_coordination_savings": /* $ */,
"total_annual": /* $ */
},
"solve_time_ms": /* solver wall time */,
"optimality_gap_pct": /* MILP gap */
}
All error responses follow the same envelope. HTTP status codes are used conventionally. Engine-level errors include the engine name in the error field.
{
"ok": false,
"error": "Invalid SOC value: must be between 0 and 1"
}
// HTTP Status Codes
400 Bad Request — validation error in request body
401 Unauthorized — missing or invalid token
403 Forbidden — plan does not include this engine
422 Unprocessable — parameter range violation
429 Rate limited — see X-RateLimit-Reset header
500 Engine error — see error field for detail
| Plan | Requests / min | STRIX paths / day |
|---|---|---|
| Operator | 60 | — |
| Fleet | 300 | 5M |
| Enterprise | Per agreement | Per agreement |
Rate limit headers are included on every response: X-RateLimit-Remaining and X-RateLimit-Reset. The Operator and Fleet figures are the target per-plan limits; Enterprise limits are set in the partner agreement rather than fixed here. These are the intended allocations, scoped per partner — not a validated throughput guarantee at scale.
{
"gateway": "ok",
"engines": {
"differentiators": "ok",
"forecasting": "ok",
"simulation": "ok",
"phalanx": "ok",
"tarsis": "ok"
},
"version": "1.0.0"
}
// illustrative response — telemetry fields populated once live { "overall": "operational", "engines": [ { "id": "helios", "status": "operational", "latency_ms": /* live p50 */, "uptime_30d": /* live % */ }, ... ] }