JustOnAir docs
View as Markdown

SDKs

The official Node.js and TypeScript SDK, and how to generate a client for any other language from openapi.json.

Node.js and TypeScript

Shell
npm install justonair

justonair is the official SDK: typed from the OpenAPI spec, no dependencies, ESM and CommonJS, Node 20 or newer. It also runs on Bun, Deno, edge runtimes and, for the public chat calls, in browsers.

TypeScript
import JustOnAir from 'justonair';

const joa = new JustOnAir(); // reads JOA_API_KEY
const stream = await joa.streams.create({ name: 'Town hall' });
console.log(stream.rtmp_url, stream.stream_key, stream.embed_url);

It covers the whole API:

joa.streamsCreate (with an automatic Idempotency-Key), get, list, listAll, update, end, replace the key, playback tokens, viewers
joa.recordingsDownload link, delete, waitUntilReady
joa.webhooksEndpoints, deliveries, and verify for incoming webhooks (Standard Webhooks)
joa.usage, joa.accountBalance, usage per day, email settings
joa.chatThe feed, watch (an async iterator over new messages), posts, deletes, bans, slow mode, word lists, moderator links
joa.embedThe public calls, no key needed: the embed read, viewer sessions, the chat read, posting, reactions

Errors are typed (RateLimitError, InsufficientCreditError, …) and carry the API's stable code. Network errors, 5xx and rate_limited are retried with backoff.

Source, README and examples: github.com/justonair/justonair-node. What changed: its changelog.

Other languages

There is no other official SDK. The API is plain JSON over HTTPS, so any HTTP client works; the Quickstart does everything with curl.

To generate a typed client, use openapi.json: OpenAPI 3.1, with an operationId on every endpoint (createStream, getStream, getChatFeed, …), the required fields of every response, an example for every request and response, and x-error-codes on every error. For example, with OpenAPI Generator:

Shell
npx @openapitools/openapi-generator-cli generate \
  -i https://docs.justonair.com/openapi.json -g python -o justonair-python

info.version in the spec is the API version; the Changelog says what each version added.

Agents

Agent frameworks can turn openapi.json into tools, or use the ready-made tool definitions at /agents/tools.json. See For AI agents.