> ## 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.

# Quickstart

> Install the Simulacrum SDK, authenticate, and deliver your first forecast.

# Quickstart

This quickstart walks you through installing the SDK, configuring credentials, and issuing your first request against the Simulacrum forecasting API.

## Prerequisites

* Python 3.11.13 or newer.
* A Simulacrum account at [`app.smlcrm.com`](https://app.smlcrm.com/) with an API key that has forecasting permissions.
* Network access to `https://api.smlcrm.com/`.

<Steps>
  <Step title="Create an API key" description="Sign up at `app.smlcrm.com` and generate a Simulacrum API key." />

  <Step title="Install the SDK" description="Use your preferred package manager to add `simulacrum-sdk` to the environment." />

  <Step title="Instantiate the client" description="Create the high-level `Simulacrum` client with your API key." />

  <Step title="Generate a forecast" description="Submit a 1D time series, wait for the response, and pull values out as a numpy array." />
</Steps>

## 1. Create your Simulacrum account

1. Visit [app.smlcrm.com](https://app.smlcrm.com/) and create or join your workspace.
2. Select **API Keys** on the left navigation bar and generate a key with forecasting access.
3. Store the key securely (for example in a secrets manager) and copy it for the next steps.

## 2. Install

```bash theme={null}
pip install simulacrum-sdk
```

To pin to a specific version:

```bash theme={null}
pip install "simulacrum-sdk==0.2.0"
```

## 3. Configure credentials

```python theme={null}
from simulacrum import Simulacrum

client = Simulacrum(api_key="sim-key_id-secret")
```

Replace `"sim-key_id-secret"` with the key you generated in step 1. For local development you can export it as an environment variable:

```bash theme={null}
export SIMULACRUM_API_KEY="sim-key_id-secret"
```

Then load it safely in code:

```python theme={null}
import os
from simulacrum import Simulacrum

client = Simulacrum(api_key=os.environ["SIMULACRUM_API_KEY"])
```

## 4. Send your first forecast

```python theme={null}
from simulacrum import Simulacrum
import numpy as np

client = Simulacrum(api_key="sim-key_id-secret")
series = np.array([101.2, 103.6, 106.5, 109.3])
forecast = client.forecast(series=series, horizon=3, model="tempo")
print("Forecast:", forecast.tolist())
```

You will receive a numpy array containing one value per horizon step. The SDK validates your inputs before the request is issued, so dimension mismatches throw early exceptions.

## 5. Validate the API key

```python theme={null}
validation = client.validate()
if not validation.valid:
    raise RuntimeError("API key is not active")

print("Client ID:", validation.client)
print("Expires at:", validation.expires_at)
```

Use validation in CI to ensure service accounts stay active. The response includes expiration metadata when it is exposed by the platform.

## Next steps

* Review the [forecasting guide](guides/forecasting) for batching and model selection patterns.
* Explore the [error handling guide](guides/error-handling) to harden production pipelines.
* Dive into the [Python SDK reference](reference/client) for details on every method exposed by the package.
