Client SDKs
There are TypeScript and Python client SDKs, installable via npm / pip. They’re
auto-generated from api/openapi.yaml on every PR, so they always track the real
server. For any other language, generate your own client from the same spec:
https://crsdk.github.io/alpha-sdk-api/api-reference/openapi.yamlPublished clients
Section titled “Published clients”The TypeScript and Python clients are generated from the spec with Fern and published — install them like any package:
npm install @alpha-sdk/clientimport { AlphaSDKClient } from "@alpha-sdk/client";
const client = new AlphaSDKClient({ environment: "http://localhost:8080" });const { cameras } = await client.cameras.list();pip install alpha-sdk-clientfrom alpha_sdk_client import AlphaSDKClient
client = AlphaSDKClient(base_url="http://localhost:8080")cameras = client.cameras.list()Both are versioned together and released from the spec — see how the clients are generated and published.
Start from an example app
Section titled “Start from an example app”Full working apps you can run and read, each wired to the published client:
Generate for another language
Section titled “Generate for another language”TypeScript and Python are published above — for anything else, point an OpenAPI generator at the spec. A few examples:
# Add the Swift OpenAPI Generator plugin to Package.swift, drop the spec at# Sources/<Target>/openapi.yaml, then build.swift package plugin --allow-writing-to-package-directory generate-code-from-openapidotnet tool install --global Microsoft.OpenApi.Kiotakiota generate -l CSharp \ -d https://crsdk.github.io/alpha-sdk-api/api-reference/openapi.yaml \ -o ./CameraClient# openapi-generator supports ~50 languages; swap the -g target.npx @openapitools/openapi-generator-cli generate \ -i https://crsdk.github.io/alpha-sdk-api/api-reference/openapi.yaml \ -g go \ -o ./camera-clientPin the specification file into your repository rather than fetching it at build time if you want reproducible builds — it is a single YAML file.
What the API looks like
Section titled “What the API looks like”The operations are grouped by tag, and a generated client will mirror that grouping:
server health, status, logscameras list, connect, disconnect, getConnectionStatusproperties get, set, getAll, getPriorityKey, setPriorityKeyactions shutter, halfPress, afShutter, zoom, focusNearFar, movieRecliveView enable, disable, getStatus, start, stop, getFramesdCard list, download, downloadThumbnail, downloadScreennailsettings download, upload, list, importLutTwo things sit outside what a generator will give you, because they are not plain request/response operations:
- Server-Sent Events — the two event streams are long-lived and most
generators will not produce anything usable for them. Consume them with native
EventSource(browser) orhttpx.stream(Python). See the SSE recipe. - Discovery, reconnect and lifecycle handling — application concerns rather than API surface. The recipes below cover the usual patterns.
Running the server
Section titled “Running the server”Every client, generated or not, talks to the REST server running on the machine the camera is attached to.
Recipes
Section titled “Recipes”Patterns that sit outside generated code. Each works against the REST API directly, so they apply whatever language you generate for.