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

# REST API overview

> Overview of REST endpoints. See individual endpoint pages for playground.

The Python client calls these endpoints on your behalf. Use them directly when building language-agnostic integrations.

> Models and routes
>
> * Base URL: `https://api.smlcrm.com/{modelName}/v1/*`
> * Default model is `tempo`. If your org has a fine-tuned model, replace `{modelName}` with your model's name.
> * Access the list of models available to your org at `https://app.smlcrm.com/platform/settings/models`.
> * The platform validates that the requested `{modelName}` is available to your organization and will reject unauthorized models.

## POST /tempo/v1/forecast

* **Method**: `POST`
* **Path**: `/tempo/v1/forecast`
* **Purpose**: Generate a next-step forecast for a univariate time series.

### Headers

* `Authorization: Bearer sim-key_id-secret`
* `Content-Type: application/json`

### Request body

```json theme={null}
{
  "series": [412.0, 415.5, 418.3],
  "horizon": 4
}
```

#### Body fields

* `series` (`array[]`, required): Observed values in time order.
* `horizon` (integer, required): Number of future steps to forecast.

### Responses

#### 200 OK

```json theme={null}
{
  "forecast": [419.2, 421.1, 424.0, 427.5]
}
```

#### Error codes

* `API_KEY_INVALID`, `API_KEY_INACTIVE`, `API_KEY_EXPIRED`
* `REQUEST_INVALID`
* `FORECAST_ALREADY_RUNNING`
* `API_USAGE_LIMIT`

## GET /tempo/v1/validate

* **Method**: `GET`
* **Path**: `/tempo/v1/validate`
* **Purpose**: Validate an API key and retrieve metadata.

### Headers

* `Authorization: Bearer sim-key_id-secret`

### Responses

#### 200 OK

```json theme={null}
{
  "valid": true,
  "key_id": "key_id",
  "status": "active",
  "env": "live",
  "project_id": "project_id",
  "organization_id": "org_id",
  "user_id": "user_id",
  "product_id": "platform",
  "name": "example",
  "expires_at": null,
  "rate_limit_per_minute": 60,
  "rate_limit_per_hour": 1000
}
```

When the platform cannot determine expiry, the `expires_at` field is `null`.

## Error handling

The API responds with standard HTTP status codes. 401 signals authentication issues, 429 denotes quota breaches, and 5xx errors point to transient upstream issues. The SDK converts these signals to typed exceptions documented in [Exception hierarchy](/reference/errors).
