Simulacrum client
The Simulacrum class is the primary entry point for the Python SDK. It wraps authentication, request routing, and response validation.
Constructor
| Parameter | Type | Description |
|---|---|---|
api_key | str | Required API key. Example: sim-key_id-secret. |
base_url | str | Optional override for the API hostname. Defaults to the production endpoint defined in simulacrum.config.BASE_URL. Routes are model-scoped: https://api.smlcrm.com/{modelName}/v1/* (default modelName is tempo). |
TypeError when they are empty or not strings.
forecast
| Argument | Description |
|---|---|
series | One-dimensional sequence of floats. Lists and numpy arrays are accepted. |
horizon | Number of future steps to predict. |
model | Optional model identifier exposed by Simulacrum. Defaults to "tempo". |
TypeError or ValueError before issuing the request when validation fails.
Exceptions
AuthError,ApiKeyExpiredError,ApiKeyInactiveError,ApiKeyInvalidErrorInvalidRequestError,ForecastAlreadyRunningError,QuotaExceededErrorApiErrorfor all other non-2xx responses
validate
GET request to /{modelName}/v1/validate (e.g., /tempo/v1/validate) and returns a typed response with key metadata.
Response fields
| Field | Type | Meaning |
|---|---|---|
valid | bool | Whether the key is active. |
client | str | Account identifier linked to the key. |
expires_at | datetime | None | Optional expiration timestamp. |