<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->

# API Reference — Building Incident Prediction Models

## Endpoints

| Endpoint | Method | Purpose |
|---|---|---|
| `POST /api/prediction/train` | POST | Train prediction model |
| `GET /api/prediction/forecast` | GET | Generate risk forecast |
| `GET /api/prediction/models/{id}/evaluate` | GET | Evaluate model performance |
| `GET /api/prediction/models` | GET | List trained models |

## Agent Script

```bash
node agent.js train --dataset incidents.csv --model-type likelihood
node agent.js forecast --horizon-days 7
node agent.js evaluate --model-id model-2026-01
```
