> ## Documentation Index
> Fetch the complete documentation index at: https://docs.smlcrm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data models

> Request and response schemas used by the Simulacrum SDK.

# Data models

The SDK relies on Pydantic models to validate payloads. Import them from `simulacrum.models` when you need structured access.

## `ForecastRequest`

```python theme={null}
from simulacrum.models import ForecastRequest

ForecastRequest(
    series: list[float],
    horizon: int,
    model: str | None = "default"
)
```

| Field     | Type          | Notes                                                    |
| --------- | ------------- | -------------------------------------------------------- |
| `series`  | `list[float]` | Automatically normalised from numpy arrays or sequences. |
| `horizon` | `int`         | Must be positive.                                        |
| `model`   | `str \| None` | Optional identifier sent to the API.                     |

Serialise with `model_dump()` before sending requests manually.

## `ForecastResponse`

```python theme={null}
from simulacrum.models import ForecastResponse

ForecastResponse(forecast: list[float], model_used: str)
```

| Field        | Type          | Notes                                      |
| ------------ | ------------- | ------------------------------------------ |
| `forecast`   | `list[float]` | Horizon-length values returned by the API. |
| `model_used` | `str`         | Backend model chosen by the service.       |

Call `get_forecast()` to convert the list into a numpy array for downstream analysis.

## `ValidateAPIKeyResponse`

```python theme={null}
from simulacrum.models import ValidateAPIKeyResponse

ValidateAPIKeyResponse(valid: bool, client: str, expires_at: datetime &#124; None)
```

Use this model to inspect key metadata. `expires_at` is optional and absent when the platform does not expose expiry information.
