Skip to main content
@alpha-sdk/client is the official TypeScript client for the Alpha Camera REST API. It ships ESM + CJS bundles and has zero runtime dependencies beyond its own resource clients.

Install

You also need a running server on localhost:8080 (or wherever you point the client). Install the server package and start it:
For embedded server lifecycle inside a Node, Electron, or Tauri app, see the ServerManager class.

Initialize

Constructor options


Common operations

List + connect a camera

Read a single property

Read every property at once

Set a property

Trigger the shutter

Pull a single live-view JPEG

For OSD-overlaid frames after liveView.enableOsd({ cameraId }):
See the live-view polling recipe for a render loop.

Disconnect


Error handling

Every method rejects with a typed subclass of AlphaSDKError:
Each error exposes statusCode, body (raw response), and message. Network failures and timeouts throw the base AlphaSDKError with statusCode: undefined.

Advanced

Custom request headers per call

Override the underlying fetch

Useful for proxying, caching, or test harnesses:

Wire-level logging

Cancellation

Pass an AbortSignal via the per-call request options:

What’s NOT in the client

By design, the following live in recipes rather than the generated SDK:
  • SSE events (/api/events, /api/cameras/{id}/events) — use native EventSource in the browser, or fetch + ReadableStream in Node 18+.
  • Discovery + reconnect orchestration — copy from the discovery + reconnect recipe.

Versioning

@alpha-sdk/client follows SemVer. Bumps:
  • Patch — additive non-breaking changes (new optional fields).
  • Minor — new endpoints or method signatures.
  • Major — breaking changes.
Every release is documented in the package CHANGELOG, available on the npm page.

Migrating from camera-remote-web-api

camera-remote-web-api is deprecated and will not receive updates after 1.3.7. Migration table: