Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.reactor.inc/llms.txt

Use this file to discover all available pages before exploring further.

A typed SDK is a per-model package that wraps the base Reactor class with named methods and React hooks mirroring that model’s published schema. It only adds ergonomics to aid in development, such as autocomplete, typed parameters, and named hooks. Every typed method ultimately calls sendCommand() on the base class. See the SDK Reference overview for when to reach for a typed SDK vs. the base class.
ModelPackageModel name
Helios@reactor-models/helioshelios
LingBot@reactor-models/lingbotlingbot
Each package ships two layers: an imperative class and a React layer. The examples below use Helios; LingBot is identical with the names swapped (LingbotModel, LingbotProvider, useLingbot, LingbotMainVideoView, and so on).

Imperative class

HeliosModel (and LingbotModel) extends Reactor, so it keeps every base method (connect, disconnect, uploadFile, on, …) and adds a typed method per command. The model name is set for you.
import { HeliosModel } from "@reactor-models/helios";

const helios = new HeliosModel();
await helios.connect(jwt);

await helios.setPrompt({ prompt: "A serene mountain landscape at sunrise" });
await helios.start();
Typed methods mirror the model’s commands one-to-one: helios.setPrompt(...) sends the set_prompt command. The canonical list of methods and their parameters is each model’s Commands table: Helios commands / LingBot commands.
Non-React apps can import the class from the package’s ./core entry (@reactor-models/helios/core) to skip the React dependency. The default import includes both layers.

React layer

For React apps the package also exports a provider, hooks, and a typed video component.
import {
  HeliosProvider,
  HeliosMainVideoView,
  useHelios,
  useHeliosState,
} from "@reactor-models/helios";

function App({ token }: { token: string }) {
  return (
    <HeliosProvider jwtToken={token}>
      <HeliosMainVideoView className="w-full aspect-video" />
      <Controls />
    </HeliosProvider>
  );
}

function Controls() {
  const { status, setPrompt, start } = useHelios();
  // call setPrompt({ prompt }) / start() once status === "ready"
}
  • <HeliosProvider> is <ReactorProvider> with modelName pre-set. Pass the same props (jwtToken, connectOptions, …) minus modelName.
  • useHelios() returns the base useReactor store (status, connect, disconnect, sendCommand, uploadFile, lastError, …) plus a typed method per command (setPrompt, schedulePrompt, setImage, setSeed, setSrScale, setImageStrength, start, pause, resume, reset, and setConditioning on Helios 0.9.0+).
  • Per-message hooks are typed equivalents of useReactorMessage, each filtered to one message type, plus the catch-all useHeliosMessage. Helios exposes useHeliosState, useHeliosCommandError, useHeliosImageAccepted, useHeliosPromptAccepted, useHeliosConditionsReady, useHeliosChunkComplete, useHeliosGenerationStarted / useHeliosGenerationPaused / useHeliosGenerationResumed. LingBot mirrors these and adds useLingbotGenerationComplete and useLingbotGenerationReset. Payloads match the model’s Messages table.
  • <HeliosMainVideoView> is <ReactorView> with track="main_video" pre-bound; it accepts the other ReactorView props. useHeliosTrack(name) returns a raw MediaStreamTrack for a named track.

How typed names map to the base SDK

Typed SDKBase SDK equivalent
new HeliosModel()new Reactor({ modelName: "helios" })
helios.setPrompt({ prompt })reactor.sendCommand("set_prompt", { prompt })
<HeliosProvider><ReactorProvider modelName="helios">
useHelios()useReactor((s) => s) plus typed command methods
useHeliosState(fn)useReactorMessage filtered to state messages
<HeliosMainVideoView /><ReactorView track="main_video" />

Worked examples

Each model’s reference page includes an end-to-end tutorial that uses its typed SDK throughout: Helios tutorial / LingBot tutorial.