> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> STT). Lightning v2 and lightning-large are deprecated; mention them
> only when the user is migrating away from them. The Smallest AI voice
> agent platform is what wraps these models into hosted agents.

# Lightning v3.1 + Pulse STT API-ref Python snippets - `SmallestAI(api_key=...)` (was `token=...`)

> Doc-only update - the Python snippets in the Lightning v3.1 and Pulse STT API references were still using the pre-4.4.5 `SmallestAI(token=...)` kwarg. Replaced with `api_key=...` to match the current SDK.

The Python "Try it" snippets attached to the Lightning v3.1 TTS and Pulse STT API reference operations used the pre-4.4.5 SDK constructor signature:

```python
client = SmallestAI(token="YOUR_API_KEY")
```

The SDK kwarg was renamed in 4.4.5. Customers copy-pasting the old snippet hit:

```
TypeError: SmallestAI.__init__() got an unexpected keyword argument 'token'
```

All affected Python snippets in `lightning-v3.1-openapi.yaml`, `pulse-stt-openapi.yaml`, and their v4 overrides now use `SmallestAI(api_key="YOUR_API_KEY")`. No wire-protocol change. Existing customer code on smallestai >= 4.4.5 is unaffected.