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

# factory_usage

# `synth_ai.research.factory_usage`

Typed Factory usage and event bindings for `client.research.factories`.

Backend routes (backend PR #747):

* `GET /smr/factories/&#123;factory_id&#125;/usage` → `SmrFactoryUsageResponse`
* `GET /smr/factories/&#123;factory_id&#125;/events` → `SmrFactoryEventsResponse`

Both are read via the session client's internal `_request_json` layer, the
same transport every other `/smr` binding uses.

## Functions

### `fetch_factory_usage` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L226" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
fetch_factory_usage(session: ManagedResearchClient, factory_id: str) -> FactoryUsage
```

Read the factory usage aggregate.

Backend route: `GET /smr/factories/&#123;factory_id&#125;/usage` (query `window`).

### `fetch_factory_events` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L244" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
fetch_factory_events(session: ManagedResearchClient, factory_id: str) -> FactoryEventsPage
```

Read one page of the durable factory event projection.

Backend route: `GET /smr/factories/&#123;factory_id&#125;/events`
(query `limit`, `cursor`).

## Classes

### `FactoryUsageCost` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L45" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Typed `SmrFactoryUsageCostTotals` (nominal ledger cost for the window).

**Methods:**

#### `from_wire` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L54" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
from_wire(cls, payload: object) -> FactoryUsageCost
```

### `FactoryUsageBudget` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L65" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Typed `SmrFactoryUsageBudgetResponse` (budget policy status; all optional).

**Methods:**

#### `from_wire` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L84" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
from_wire(cls, payload: object) -> FactoryUsageBudget
```

### `FactoryEffortUsage` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L105" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Typed `SmrFactoryEffortUsageResponse` (per-effort drawdown in the window).

**Methods:**

#### `from_wire` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L117" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
from_wire(cls, payload: object) -> FactoryEffortUsage
```

### `FactoryUsage` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L131" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Typed `SmrFactoryUsageResponse`.

Backend route: `GET /smr/factories/&#123;factory_id&#125;/usage`
(query `window`: `month_to_date` | `last_7_days`).

**Methods:**

#### `from_wire` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L152" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
from_wire(cls, payload: object) -> FactoryUsage
```

### `FactoryEvent` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L174" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Typed `SmrFactoryEventResponse` (one durable factory event row).

**Methods:**

#### `from_wire` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L185" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
from_wire(cls, payload: object) -> FactoryEvent
```

### `FactoryEventsPage` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L201" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Typed `SmrFactoryEventsResponse` (newest-first cursor page).

Backend route: `GET /smr/factories/&#123;factory_id&#125;/events`
(query `limit` 1-500, `cursor`; `next_cursor` is null when drained).

**Methods:**

#### `from_wire` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factory_usage.py#L214" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
from_wire(cls, payload: object) -> FactoryEventsPage
```
