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

# SDK Reference

> Three language clients + a Node.js server manager — pick what matches your stack

The Alpha Camera SDK family is a set of official REST clients for the Alpha Camera REST API. Each is published independently and tracks the same versioned API surface.

| Language                | Package                                                                | Registry | Reference                         |
| ----------------------- | ---------------------------------------------------------------------- | -------- | --------------------------------- |
| TypeScript / JavaScript | [`@alpha-sdk/client`](https://www.npmjs.com/package/@alpha-sdk/client) | npm      | [TypeScript SDK](/sdk/typescript) |
| Python                  | [`alpha-sdk-client`](https://pypi.org/project/alpha-sdk-client/)       | PyPI     | [Python SDK](/sdk/python)         |
| Swift                   | [`AlphaSDK`](https://github.com/jordlee/alpha-sdk-swift)               | SwiftPM  | [Swift SDK](/sdk/swift)           |

## Example apps

Reference apps that use the published SDKs and server package:

* **Next.js / TypeScript:** [`alpha-sdk-typescript`](https://github.com/jordlee/alpha-sdk-typescript)
* **Python notebook / data collection:** [`alpha-sdk-python`](https://github.com/jordlee/alpha-sdk-python)
* **Swift SDK + macOS sample app:** [`alpha-sdk-swift`](https://github.com/jordlee/alpha-sdk-swift)

<Note>
  Every client targets the same REST server. To run that server locally, install [`@alpha-sdk/api`](/web-api/server) — it ships the native binary, the `camera-server` CLI, and (for Node.js applications) a `ServerManager` class for embedding the server lifecycle. Browser-only or mobile applications connect to a server running elsewhere on the network.
</Note>

***

## Quick orientation

Every language client follows the same shape:

```
client
  ├── server          health, status, logs
  ├── cameras         list, connect, disconnect, getConnectionStatus
  ├── properties      get, set, getAll, getPriorityKey, setPriorityKey
  ├── actions         shutter, halfPress, afShutter, zoom, focusNearFar, movieRec
  ├── liveView        enable, disable, getStatus, start, stop, getFrame
  ├── sdCard          list, download, downloadThumbnail, downloadScreennail
  └── settings        download, upload, list, importLut
```

The following are intentionally outside the generated client surface — see [recipes](#recipes) for the recommended patterns:

* **Server-Sent Events** — consume with native `EventSource` (browser), `URLSession.bytes(for:)` (Swift), or `httpx.stream` (Python).
* **Discovery, reconnect, and lifecycle helpers** — copy the recipe that fits your application.

***

## Pick your path

<CardGroup cols={3}>
  <Card title="TypeScript" href="/sdk/typescript">
    `npm install @alpha-sdk/client` — Node, Electron, Tauri, browsers.
  </Card>

  <Card title="Python" href="/sdk/python">
    `pip install alpha-sdk-client` — sync + async clients, Pydantic models.
  </Card>

  <Card title="Swift" href="/sdk/swift">
    SwiftPM — iOS 15+, macOS 12+, native async/await.
  </Card>
</CardGroup>

<Card title="Need to run the server?" href="/web-api/server">
  `@alpha-sdk/api` — installs the REST API server, the `camera-server` CLI, and a Node.js `ServerManager` class.
</Card>

***

## Recipes

Patterns that live outside the generated SDK surface. Copy and adapt — every recipe shows TypeScript, Python, and Swift side-by-side.

<CardGroup cols={2}>
  <Card title="SSE event consumer" href="/sdk/recipes/sse-events">
    React in real time to `propertyChanged`, `downloadComplete`, `transferProgress`, etc.
  </Card>

  <Card title="Live-view JPEG polling" href="/sdk/recipes/live-view-polling">
    Pull a frame every \~66ms and render it.
  </Card>

  <Card title="Server subprocess" href="/sdk/recipes/server-subprocess">
    Spawn the native server from Python or any non-Node runtime.
  </Card>

  <Card title="Discovery + reconnect" href="/sdk/recipes/discovery-reconnect">
    Poll `/api/cameras`, track which is connected, hot-plug handling.
  </Card>

  <Card title="Retry + backoff" href="/sdk/recipes/retry-backoff">
    Hand-roll exponential backoff for flaky connect / SD card calls.
  </Card>

  <Card title="React hook" href="/sdk/recipes/react-hook">
    `useCamera()` — bind one camera's connection + property state.
  </Card>
</CardGroup>
